skip "supports market order" for now until CCXT fixes their assignemnt bugs.
This commit is contained in:
parent
7d6b3d0e02
commit
523d8a84a8
@ -64,7 +64,6 @@ EXCHANGE_HAS_REQUIRED = [
|
|||||||
'fetchOrder',
|
'fetchOrder',
|
||||||
'cancelOrder',
|
'cancelOrder',
|
||||||
'createOrder',
|
'createOrder',
|
||||||
# 'createLimitOrder', 'createMarketOrder',
|
|
||||||
'fetchBalance',
|
'fetchBalance',
|
||||||
|
|
||||||
# Public endpoints
|
# Public endpoints
|
||||||
@ -74,6 +73,7 @@ EXCHANGE_HAS_REQUIRED = [
|
|||||||
EXCHANGE_HAS_OPTIONAL = [
|
EXCHANGE_HAS_OPTIONAL = [
|
||||||
# Private
|
# Private
|
||||||
'fetchMyTrades', # Trades for order - fee detection
|
'fetchMyTrades', # Trades for order - fee detection
|
||||||
|
# 'createLimitOrder', 'createMarketOrder', # Either OR for orders
|
||||||
# 'setLeverage', # Margin/Futures trading
|
# 'setLeverage', # Margin/Futures trading
|
||||||
# 'setMarginMode', # Margin/Futures trading
|
# 'setMarginMode', # Margin/Futures trading
|
||||||
# 'fetchFundingHistory', # Futures trading
|
# 'fetchFundingHistory', # Futures trading
|
||||||
|
@ -586,10 +586,13 @@ class Exchange:
|
|||||||
"""
|
"""
|
||||||
Checks if order-types configured in strategy/config are supported
|
Checks if order-types configured in strategy/config are supported
|
||||||
"""
|
"""
|
||||||
if any(v == 'market' for k, v in order_types.items()):
|
# TODO: Reenable once ccxt fixes createMarketOrder assignment - as well as
|
||||||
if not self.exchange_has('createMarketOrder'):
|
# Revert the change in test_validate_ordertypes.
|
||||||
raise OperationalException(
|
|
||||||
f'Exchange {self.name} does not support market orders.')
|
# if any(v == 'market' for k, v in order_types.items()):
|
||||||
|
# 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)):
|
||||||
|
@ -1027,9 +1027,9 @@ def test_validate_ordertypes(default_conf, mocker):
|
|||||||
'stoploss': 'market',
|
'stoploss': 'market',
|
||||||
'stoploss_on_exchange': False
|
'stoploss_on_exchange': False
|
||||||
}
|
}
|
||||||
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',
|
||||||
|
Loading…
Reference in New Issue
Block a user