stoploss_price_type for gate
This commit is contained in:
parent
a2759b495b
commit
a3b4678ad6
@ -4,7 +4,7 @@ from datetime import datetime
|
|||||||
from typing import Any, Dict, List, Optional, Tuple
|
from typing import Any, Dict, List, Optional, Tuple
|
||||||
|
|
||||||
from freqtrade.constants import BuySell
|
from freqtrade.constants import BuySell
|
||||||
from freqtrade.enums import MarginMode, TradingMode
|
from freqtrade.enums import MarginMode, PriceType, TradingMode
|
||||||
from freqtrade.exceptions import OperationalException
|
from freqtrade.exceptions import OperationalException
|
||||||
from freqtrade.exchange import Exchange
|
from freqtrade.exchange import Exchange
|
||||||
from freqtrade.misc import safe_value_fallback2
|
from freqtrade.misc import safe_value_fallback2
|
||||||
@ -34,13 +34,12 @@ class Gate(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'],
|
||||||
# TODO: Reenable once https://github.com/ccxt/ccxt/issues/16749 is available
|
"stop_price_type_field": "price_type",
|
||||||
# "stop_price_type_field": "price_type",
|
"stop_price_type_value_mapping": {
|
||||||
# "stop_price_type_value_mapping": {
|
PriceType.LAST: 0,
|
||||||
# PriceType.LAST: 0,
|
PriceType.MARK: 1,
|
||||||
# PriceType.MARK: 1,
|
PriceType.INDEX: 2,
|
||||||
# PriceType.INDEX: 2,
|
},
|
||||||
# },
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_supported_trading_mode_margin_pairs: List[Tuple[TradingMode, MarginMode]] = [
|
_supported_trading_mode_margin_pairs: List[Tuple[TradingMode, MarginMode]] = [
|
||||||
|
@ -2,7 +2,7 @@ numpy==1.24.2
|
|||||||
pandas==1.5.3
|
pandas==1.5.3
|
||||||
pandas-ta==0.3.14b
|
pandas-ta==0.3.14b
|
||||||
|
|
||||||
ccxt==2.7.78
|
ccxt==2.7.80
|
||||||
# Pin cryptography for now due to rust build errors with piwheels
|
# Pin cryptography for now due to rust build errors with piwheels
|
||||||
cryptography==38.0.1; platform_machine == 'armv7l'
|
cryptography==38.0.1; platform_machine == 'armv7l'
|
||||||
cryptography==39.0.1; platform_machine != 'armv7l'
|
cryptography==39.0.1; platform_machine != 'armv7l'
|
||||||
|
@ -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', False),
|
('gate', 'last', True),
|
||||||
('gate', 'mark', False),
|
('gate', 'mark', True),
|
||||||
('gate', 'index', False),
|
('gate', 'index', True),
|
||||||
])
|
])
|
||||||
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):
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user