aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ccxt_wrapper.py8
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 @@
1from ccxt import * 1from ccxt import *
2import decimal 2import decimal
3import time
3 4
4def _cw_exchange_sum(self, *args): 5def _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))])
6Exchange.sum = _cw_exchange_sum 7Exchange.sum = _cw_exchange_sum
7 8
8class poloniexE(poloniex): 9class 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({