Remove pointless default on wallet_balance argument

This commit is contained in:
Matthias 2022-09-01 06:49:51 +02:00
parent ba2eb7cf0f
commit f3c73189d5
2 changed files with 5 additions and 1 deletions

View File

@ -2600,7 +2600,7 @@ class Exchange:
is_short: bool, is_short: bool,
amount: float, # Absolute value of position size amount: float, # Absolute value of position size
stake_amount: float, stake_amount: float,
wallet_balance: float = 0.0, wallet_balance: float,
mm_ex_1: float = 0.0, # (Binance) Cross only mm_ex_1: float = 0.0, # (Binance) Cross only
upnl_ex_1: float = 0.0, # (Binance) Cross only upnl_ex_1: float = 0.0, # (Binance) Cross only
) -> Optional[float]: ) -> Optional[float]:

View File

@ -4985,6 +4985,7 @@ def test_get_liquidation_price1(mocker, default_conf):
is_short=False, is_short=False,
amount=0.8, amount=0.8,
stake_amount=18.884 * 0.8, stake_amount=18.884 * 0.8,
wallet_balance=18.884 * 0.8,
) )
assert liq_price == 17.47 assert liq_price == 17.47
@ -4996,6 +4997,7 @@ def test_get_liquidation_price1(mocker, default_conf):
is_short=False, is_short=False,
amount=0.8, amount=0.8,
stake_amount=18.884 * 0.8, stake_amount=18.884 * 0.8,
wallet_balance=18.884 * 0.8,
) )
assert liq_price == 17.540699999999998 assert liq_price == 17.540699999999998
@ -5007,6 +5009,7 @@ def test_get_liquidation_price1(mocker, default_conf):
is_short=False, is_short=False,
amount=0.8, amount=0.8,
stake_amount=18.884 * 0.8, stake_amount=18.884 * 0.8,
wallet_balance=18.884 * 0.8,
) )
assert liq_price is None assert liq_price is None
default_conf['trading_mode'] = 'margin' default_conf['trading_mode'] = 'margin'
@ -5019,6 +5022,7 @@ def test_get_liquidation_price1(mocker, default_conf):
is_short=False, is_short=False,
amount=0.8, amount=0.8,
stake_amount=18.884 * 0.8, stake_amount=18.884 * 0.8,
wallet_balance=18.884 * 0.8,
) )