From 34b328787b7dcf100e3be8730edb8119ea22a3e0 Mon Sep 17 00:00:00 2001 From: rbn920 Date: Sat, 27 Jan 2018 22:12:12 -0800 Subject: [PATCH] Add fetch_my_trades method to gemini --- python/ccxt/gemini.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/python/ccxt/gemini.py b/python/ccxt/gemini.py index a74a0b193567..6bbe45784a76 100644 --- a/python/ccxt/gemini.py +++ b/python/ccxt/gemini.py @@ -158,6 +158,19 @@ def fetch_balance(self, params={}): result[currency] = account return self.parse_balance(result) + def fetch_my_trades(self, symbol=None, since=None, limit=None, params={}): + if not symbol: + raise ExchangeError(self.id + ' fetchMyTrades requires a symbol argument') + self.load_markets() + market = self.market(symbol) + request = { + 'symbol': market['id'], + } + if limit: + request['limit'] = limit + response = self.privatePostMytrades(self.extend(request, params)) + return self.parse_trades(response, market, since, limit) + def create_order(self, symbol, type, side, amount, price=None, params={}): self.load_markets() if type == 'market':