diff --git a/freqtrade/exchange/exchange.py b/freqtrade/exchange/exchange.py index fac02509b..70cc3f21e 100644 --- a/freqtrade/exchange/exchange.py +++ b/freqtrade/exchange/exchange.py @@ -1079,6 +1079,9 @@ class Exchange: rate_for_order, params, ) + if order.get('status') is None: + # Map empty status to open. + order['status'] = 'open' self._log_exchange_response('create_order', order) order = self._order_contracts_to_amount(order) return order diff --git a/tests/exchange/test_exchange.py b/tests/exchange/test_exchange.py index 8826fb876..7320f1074 100644 --- a/tests/exchange/test_exchange.py +++ b/tests/exchange/test_exchange.py @@ -1447,6 +1447,7 @@ def test_buy_considers_time_in_force(default_conf, mocker, exchange_name): assert 'id' in order assert 'info' in order + assert order['status'] == 'open' assert order['id'] == order_id assert api_mock.create_order.call_args[0][0] == 'ETH/BTC' assert api_mock.create_order.call_args[0][1] == order_type