Temporarily disable gate advanced stop orders
This commit is contained in:
parent
e964377edf
commit
8c0c2496c2
@ -34,12 +34,13 @@ class Gateio(Exchange):
|
||||
"needs_trading_fees": True,
|
||||
"fee_cost_in_contracts": False, # Set explicitly to false for clarity
|
||||
"order_props_in_contracts": ['amount', 'filled', 'remaining'],
|
||||
"stop_price_type_field": "price_type",
|
||||
"stop_price_type_value_mapping": {
|
||||
PriceType.LAST: 0,
|
||||
PriceType.MARK: 1,
|
||||
PriceType.INDEX: 2,
|
||||
},
|
||||
# TODO: Reenable once https://github.com/ccxt/ccxt/issues/16749 is available
|
||||
# "stop_price_type_field": "price_type",
|
||||
# "stop_price_type_value_mapping": {
|
||||
# PriceType.LAST: 0,
|
||||
# PriceType.MARK: 1,
|
||||
# PriceType.INDEX: 2,
|
||||
# },
|
||||
}
|
||||
|
||||
_supported_trading_mode_margin_pairs: List[Tuple[TradingMode, MarginMode]] = [
|
||||
@ -55,6 +56,8 @@ class Gateio(Exchange):
|
||||
if any(v == 'market' for k, v in order_types.items()):
|
||||
raise OperationalException(
|
||||
f'Exchange {self.name} does not support market orders.')
|
||||
else:
|
||||
super().validate_ordertypes(order_types)
|
||||
|
||||
def _get_params(
|
||||
self,
|
||||
|
@ -1070,9 +1070,9 @@ def test_validate_ordertypes(default_conf, mocker):
|
||||
# ('okx', 'last', True),
|
||||
# ('okx', 'mark', True),
|
||||
# ('okx', 'index', True),
|
||||
('gate', 'last', True),
|
||||
('gate', 'mark', True),
|
||||
('gate', 'index', True),
|
||||
('gate', 'last', False),
|
||||
('gate', 'mark', False),
|
||||
('gate', 'index', False),
|
||||
])
|
||||
def test_validate_ordertypes_stop_advanced(default_conf, mocker, exchange_name, stopadv, expected):
|
||||
|
||||
|
@ -18,8 +18,8 @@ def test_validate_order_types_gateio(default_conf, mocker):
|
||||
mocker.patch('freqtrade.exchange.Exchange.validate_timeframes')
|
||||
mocker.patch('freqtrade.exchange.Exchange.validate_stakecurrency')
|
||||
mocker.patch('freqtrade.exchange.Exchange.validate_pricing')
|
||||
mocker.patch('freqtrade.exchange.Exchange.name', 'Bittrex')
|
||||
exch = ExchangeResolver.load_exchange('gateio', default_conf, True)
|
||||
mocker.patch('freqtrade.exchange.Exchange.name', 'Gate')
|
||||
exch = ExchangeResolver.load_exchange('gate', default_conf, True)
|
||||
assert isinstance(exch, Gateio)
|
||||
|
||||
default_conf['order_types'] = {
|
||||
|
Loading…
Reference in New Issue
Block a user