diff --git a/freqtrade/exchange/exchange.py b/freqtrade/exchange/exchange.py index 9d08d3d19..c3dca43a8 100644 --- a/freqtrade/exchange/exchange.py +++ b/freqtrade/exchange/exchange.py @@ -2600,7 +2600,7 @@ class Exchange: is_short: bool, amount: float, # Absolute value of position size stake_amount: float, - wallet_balance: float = 0.0, + wallet_balance: float, mm_ex_1: float = 0.0, # (Binance) Cross only upnl_ex_1: float = 0.0, # (Binance) Cross only ) -> Optional[float]: diff --git a/tests/exchange/test_exchange.py b/tests/exchange/test_exchange.py index 5456b3098..3352019a9 100644 --- a/tests/exchange/test_exchange.py +++ b/tests/exchange/test_exchange.py @@ -4985,6 +4985,7 @@ def test_get_liquidation_price1(mocker, default_conf): is_short=False, amount=0.8, stake_amount=18.884 * 0.8, + wallet_balance=18.884 * 0.8, ) assert liq_price == 17.47 @@ -4996,6 +4997,7 @@ def test_get_liquidation_price1(mocker, default_conf): is_short=False, amount=0.8, stake_amount=18.884 * 0.8, + wallet_balance=18.884 * 0.8, ) assert liq_price == 17.540699999999998 @@ -5007,6 +5009,7 @@ def test_get_liquidation_price1(mocker, default_conf): is_short=False, amount=0.8, stake_amount=18.884 * 0.8, + wallet_balance=18.884 * 0.8, ) assert liq_price is None default_conf['trading_mode'] = 'margin' @@ -5019,6 +5022,7 @@ def test_get_liquidation_price1(mocker, default_conf): is_short=False, amount=0.8, stake_amount=18.884 * 0.8, + wallet_balance=18.884 * 0.8, )