From ce13ce4b10ec8887b4fb21ccddd942aaca3eee1f Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 25 Dec 2022 09:05:53 +0100 Subject: [PATCH] Update binance stoploss order types closes #7927 an update to the most recent ccxt version (>2.4.55) would have the same effect. --- freqtrade/exchange/binance.py | 2 +- tests/exchange/test_binance.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/freqtrade/exchange/binance.py b/freqtrade/exchange/binance.py index b21e64eb2..7462e4f81 100644 --- a/freqtrade/exchange/binance.py +++ b/freqtrade/exchange/binance.py @@ -31,7 +31,7 @@ class Binance(Exchange): "ccxt_futures_name": "future" } _ft_has_futures: Dict = { - "stoploss_order_types": {"limit": "limit", "market": "market"}, + "stoploss_order_types": {"limit": "stop", "market": "stop_market"}, "tickers_have_price": False, } diff --git a/tests/exchange/test_binance.py b/tests/exchange/test_binance.py index 1fc8b4153..306a30985 100644 --- a/tests/exchange/test_binance.py +++ b/tests/exchange/test_binance.py @@ -23,7 +23,7 @@ from tests.exchange.test_exchange import ccxt_exceptionhandlers def test_stoploss_order_binance(default_conf, mocker, limitratio, expected, side, trademode): api_mock = MagicMock() order_id = 'test_prod_buy_{}'.format(randint(0, 10 ** 6)) - order_type = 'stop_loss_limit' if trademode == TradingMode.SPOT else 'limit' + order_type = 'stop_loss_limit' if trademode == TradingMode.SPOT else 'stop' api_mock.create_order = MagicMock(return_value={ 'id': order_id,