Reenable ccxt order checks

This commit is contained in:
Matthias 2022-07-11 10:36:19 +02:00
parent f8e35d8760
commit 6ac1aa15f5
2 changed files with 7 additions and 11 deletions

View File

@ -586,13 +586,10 @@ class Exchange:
""" """
Checks if order-types configured in strategy/config are supported Checks if order-types configured in strategy/config are supported
""" """
# TODO: Reenable once ccxt fixes createMarketOrder assignment - as well as if any(v == 'market' for k, v in order_types.items()):
# Revert the change in test_validate_ordertypes. if not self.exchange_has('createMarketOrder'):
raise OperationalException(
# if any(v == 'market' for k, v in order_types.items()): f'Exchange {self.name} does not support market orders.')
# if not self.exchange_has('createMarketOrder'):
# raise OperationalException(
# f'Exchange {self.name} does not support market orders.')
if (order_types.get("stoploss_on_exchange") if (order_types.get("stoploss_on_exchange")
and not self._ft_has.get("stoploss_on_exchange", False)): and not self._ft_has.get("stoploss_on_exchange", False)):

View File

@ -1027,10 +1027,9 @@ def test_validate_ordertypes(default_conf, mocker):
'stoploss': 'market', 'stoploss': 'market',
'stoploss_on_exchange': False 'stoploss_on_exchange': False
} }
# TODO: Revert once createMarketOrder is available again. with pytest.raises(OperationalException,
# with pytest.raises(OperationalException, match=r'Exchange .* does not support market orders.'):
# match=r'Exchange .* does not support market orders.'): Exchange(default_conf)
# Exchange(default_conf)
default_conf['order_types'] = { default_conf['order_types'] = {
'entry': 'limit', 'entry': 'limit',