From 9685c09c1a58ff36bf1e836a15fcdbb3ca049bc9 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sat, 15 Sep 2018 20:28:36 +0200 Subject: [PATCH] Add offset to "get_trades_for_order" --- freqtrade/exchange/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/freqtrade/exchange/__init__.py b/freqtrade/exchange/__init__.py index f663420e0..e3d51a16f 100644 --- a/freqtrade/exchange/__init__.py +++ b/freqtrade/exchange/__init__.py @@ -591,7 +591,8 @@ class Exchange(object): if not self.exchange_has('fetchMyTrades'): return [] try: - my_trades = self._api.fetch_my_trades(pair, since.timestamp()) + # Allow 5s offset to catch slight time offsets (discovered in #1185) + my_trades = self._api.fetch_my_trades(pair, since.timestamp() - 5) matched_trades = [trade for trade in my_trades if trade['order'] == order_id] return matched_trades