diff --git a/freqtrade/exchange/exchange.py b/freqtrade/exchange/exchange.py index 5cadc242e..1141b0fa6 100644 --- a/freqtrade/exchange/exchange.py +++ b/freqtrade/exchange/exchange.py @@ -1288,13 +1288,9 @@ class Exchange: # since needs to be int in milliseconds _params = params if params else {} my_trades = self._api.fetch_my_trades( - pair, - int((since.replace(tzinfo=timezone.utc).timestamp() - 5) * 1000), - params=_params - ) - matched_trades = self._trades_contracts_to_amount( - trades=[trade for trade in my_trades if trade['order'] == order_id] - ) + pair, int((since.replace(tzinfo=timezone.utc).timestamp() - 5) * 1000), + params=_params) + matched_trades = [trade for trade in my_trades if trade['order'] == order_id] self._log_exchange_response('get_trades_for_order', matched_trades) diff --git a/tests/exchange/test_exchange.py b/tests/exchange/test_exchange.py index 79de1e1b2..7edc3c755 100644 --- a/tests/exchange/test_exchange.py +++ b/tests/exchange/test_exchange.py @@ -2797,7 +2797,7 @@ def test_name(default_conf, mocker, exchange_name): @pytest.mark.parametrize("trading_mode,amount", [ ('spot', 0.2340606), - ('futures', 23.40606), + ('futures', 2.340606), ]) @pytest.mark.parametrize("exchange_name", EXCHANGES) def test_get_trades_for_order(default_conf, mocker, exchange_name, trading_mode, amount):