X-Git-Url: https://git.immae.eu/?p=perso%2FImmae%2FProjets%2FCryptomonnaies%2FCryptoportfolio%2FTrader.git;a=blobdiff_plain;f=ccxt_wrapper.py;fp=ccxt_wrapper.py;h=aaccc612ba036ff92123d377aed2ff208c02725d;hp=c4aa94d6cbe7ccfb5c9c38447bc9b59162a1bbe0;hb=f0001495538945af15ae0c28a07e4de4cc18cbf1;hpb=5f721612111af5c56b5757cb2f21da5f2fa388bf diff --git a/ccxt_wrapper.py b/ccxt_wrapper.py index c4aa94d..aaccc61 100644 --- a/ccxt_wrapper.py +++ b/ccxt_wrapper.py @@ -299,6 +299,10 @@ class poloniexE(poloniex): "total": decimal.Decimal(summary["totalValue"]), } + def fetch_nth_order_book(self, symbol, action, number): + book = self.fetch_order_book(symbol, limit=number) + return decimal.Decimal(book[action + "s"][-1][0]) + def nonce(self): """ Wrapped to allow nonce with other libraries