Gateio allow market orders on futures markets
This commit is contained in:
parent
6bdf9c2a94
commit
fda8248d41
@ -40,7 +40,6 @@ class Gateio(Exchange):
|
||||
]
|
||||
|
||||
def validate_ordertypes(self, order_types: Dict) -> None:
|
||||
super().validate_ordertypes(order_types)
|
||||
|
||||
if self.trading_mode != TradingMode.FUTURES:
|
||||
if any(v == 'market' for k, v in order_types.items()):
|
||||
|
@ -33,6 +33,12 @@ def test_validate_order_types_gateio(default_conf, mocker):
|
||||
match=r'Exchange .* does not support market orders.'):
|
||||
ExchangeResolver.load_exchange('gateio', default_conf, True)
|
||||
|
||||
# market-orders supported on futures markets.
|
||||
default_conf['trading_mode'] = 'futures'
|
||||
default_conf['margin_mode'] = 'isolated'
|
||||
ex = ExchangeResolver.load_exchange('gateio', default_conf, True)
|
||||
assert ex
|
||||
|
||||
|
||||
@pytest.mark.usefixtures("init_persistence")
|
||||
def test_fetch_stoploss_order_gateio(default_conf, mocker):
|
||||
|
Loading…
Reference in New Issue
Block a user