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