From d52d30cfbe94cae4b631bee1eda10c02a2e681a0 Mon Sep 17 00:00:00 2001 From: Matthias Date: Thu, 28 Sep 2023 19:33:59 +0200 Subject: [PATCH] invert setting-location for stopLossPrice Slowly migrating to stopLossPrice in favor of stopPrice. --- freqtrade/exchange/binance.py | 2 ++ freqtrade/exchange/bybit.py | 1 - freqtrade/exchange/exchange.py | 4 ++-- freqtrade/exchange/gate.py | 4 +++- freqtrade/exchange/huobi.py | 2 ++ freqtrade/exchange/kraken.py | 2 ++ freqtrade/exchange/kucoin.py | 2 ++ freqtrade/exchange/okx.py | 2 -- 8 files changed, 13 insertions(+), 6 deletions(-) diff --git a/freqtrade/exchange/binance.py b/freqtrade/exchange/binance.py index e8be804cb..bd7ef9b20 100644 --- a/freqtrade/exchange/binance.py +++ b/freqtrade/exchange/binance.py @@ -21,6 +21,8 @@ class Binance(Exchange): _ft_has: Dict = { "stoploss_on_exchange": True, + "stop_price_param": "stopPrice", + "stop_price_prop": "stopPrice", "stoploss_order_types": {"limit": "stop_loss_limit"}, "order_time_in_force": ["GTC", "FOK", "IOC", "PO"], "ohlcv_candle_limit": 1000, diff --git a/freqtrade/exchange/bybit.py b/freqtrade/exchange/bybit.py index ac6efb670..187830943 100644 --- a/freqtrade/exchange/bybit.py +++ b/freqtrade/exchange/bybit.py @@ -36,7 +36,6 @@ class Bybit(Exchange): "funding_fee_timeframe": "8h", "stoploss_on_exchange": True, "stoploss_order_types": {"limit": "limit", "market": "market"}, - "stop_price_param": "stopLossPrice", # bybit response parsing fails to populate stopLossPrice "stop_price_prop": "stopPrice", "stop_price_type_field": "triggerBy", diff --git a/freqtrade/exchange/exchange.py b/freqtrade/exchange/exchange.py index 89b162c0b..4592c82a1 100644 --- a/freqtrade/exchange/exchange.py +++ b/freqtrade/exchange/exchange.py @@ -61,8 +61,8 @@ class Exchange: # or by specifying them in the configuration. _ft_has_default: Dict = { "stoploss_on_exchange": False, - "stop_price_param": "stopPrice", # Used for stoploss_on_exchange request - "stop_price_prop": "stopPrice", # Used for stoploss_on_exchange response parsing + "stop_price_param": "stopLossPrice", # Used for stoploss_on_exchange request + "stop_price_prop": "stopLossPrice", # Used for stoploss_on_exchange response parsing "order_time_in_force": ["GTC"], "ohlcv_params": {}, "ohlcv_candle_limit": 500, diff --git a/freqtrade/exchange/gate.py b/freqtrade/exchange/gate.py index d36f57da7..ffef21402 100644 --- a/freqtrade/exchange/gate.py +++ b/freqtrade/exchange/gate.py @@ -25,8 +25,10 @@ class Gate(Exchange): _ft_has: Dict = { "ohlcv_candle_limit": 1000, "order_time_in_force": ['GTC', 'IOC'], - "stoploss_order_types": {"limit": "limit"}, "stoploss_on_exchange": True, + "stoploss_order_types": {"limit": "limit"}, + "stop_price_param": "stopPrice", + "stop_price_prop": "stopPrice", "marketOrderRequiresPrice": True, } diff --git a/freqtrade/exchange/huobi.py b/freqtrade/exchange/huobi.py index fdb6050a3..207520862 100644 --- a/freqtrade/exchange/huobi.py +++ b/freqtrade/exchange/huobi.py @@ -17,6 +17,8 @@ class Huobi(Exchange): _ft_has: Dict = { "stoploss_on_exchange": True, + "stop_price_param": "stopPrice", + "stop_price_prop": "stopPrice", "stoploss_order_types": {"limit": "stop-limit"}, "ohlcv_candle_limit": 1000, "l2_limit_range": [5, 10, 20], diff --git a/freqtrade/exchange/kraken.py b/freqtrade/exchange/kraken.py index c41bb6d56..f855ed472 100644 --- a/freqtrade/exchange/kraken.py +++ b/freqtrade/exchange/kraken.py @@ -24,6 +24,8 @@ class Kraken(Exchange): _params: Dict = {"trading_agreement": "agree"} _ft_has: Dict = { "stoploss_on_exchange": True, + "stop_price_param": "stopPrice", + "stop_price_prop": "stopPrice", "ohlcv_candle_limit": 720, "ohlcv_has_history": False, "trades_pagination": "id", diff --git a/freqtrade/exchange/kucoin.py b/freqtrade/exchange/kucoin.py index 20e558513..7033f89ad 100644 --- a/freqtrade/exchange/kucoin.py +++ b/freqtrade/exchange/kucoin.py @@ -21,6 +21,8 @@ class Kucoin(Exchange): _ft_has: Dict = { "stoploss_on_exchange": True, + "stop_price_param": "stopPrice", + "stop_price_prop": "stopPrice", "stoploss_order_types": {"limit": "limit", "market": "market"}, "l2_limit_range": [20, 100], "l2_limit_range_required": False, diff --git a/freqtrade/exchange/okx.py b/freqtrade/exchange/okx.py index d52a61371..7d7c15f49 100644 --- a/freqtrade/exchange/okx.py +++ b/freqtrade/exchange/okx.py @@ -29,8 +29,6 @@ class Okx(Exchange): "funding_fee_timeframe": "8h", "stoploss_order_types": {"limit": "limit"}, "stoploss_on_exchange": True, - "stop_price_param": "stopLossPrice", - "stop_price_prop": "stopLossPrice", } _ft_has_futures: Dict = { "tickers_have_quoteVolume": False,