diff options
-rw-r--r-- | ccxt_wrapper.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/ccxt_wrapper.py b/ccxt_wrapper.py index 4ed2116..b79cd37 100644 --- a/ccxt_wrapper.py +++ b/ccxt_wrapper.py | |||
@@ -1,11 +1,19 @@ | |||
1 | from ccxt import * | 1 | from ccxt import * |
2 | import decimal | 2 | import decimal |
3 | import time | ||
3 | 4 | ||
4 | def _cw_exchange_sum(self, *args): | 5 | def _cw_exchange_sum(self, *args): |
5 | return sum([arg for arg in args if isinstance(arg, (float, int, decimal.Decimal))]) | 6 | return sum([arg for arg in args if isinstance(arg, (float, int, decimal.Decimal))]) |
6 | Exchange.sum = _cw_exchange_sum | 7 | Exchange.sum = _cw_exchange_sum |
7 | 8 | ||
8 | class poloniexE(poloniex): | 9 | class poloniexE(poloniex): |
10 | @staticmethod | ||
11 | def nanoseconds(): | ||
12 | return int(time.time() * 1000000000) | ||
13 | |||
14 | def nonce(self): | ||
15 | return self.nanoseconds() | ||
16 | |||
9 | def fetch_balance(self, params={}): | 17 | def fetch_balance(self, params={}): |
10 | self.load_markets() | 18 | self.load_markets() |
11 | balances = self.privatePostReturnCompleteBalances(self.extend({ | 19 | balances = self.privatePostReturnCompleteBalances(self.extend({ |