X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=ccxt_wrapper.py;h=b79cd37468c4c58654288acd8bcb1a3c7f409741;hb=9f1408a3c5d6f42ae709ca16fa27e01db192fd05;hp=4ed2116a32e9a57a37027b471b1e6e38c5a65789;hpb=97922ff1826cc6b9c0329cc30e8d4621bb2644ee;p=perso%2FImmae%2FProjets%2FCryptomonnaies%2FCryptoportfolio%2FTrader.git 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 @@ from ccxt import * import decimal +import time def _cw_exchange_sum(self, *args): return sum([arg for arg in args if isinstance(arg, (float, int, decimal.Decimal))]) Exchange.sum = _cw_exchange_sum class poloniexE(poloniex): + @staticmethod + def nanoseconds(): + return int(time.time() * 1000000000) + + def nonce(self): + return self.nanoseconds() + def fetch_balance(self, params={}): self.load_markets() balances = self.privatePostReturnCompleteBalances(self.extend({