Skip to content

Commit 8acc05b

Browse files
committed
chore: update wording in exception message
1 parent c39f6f8 commit 8acc05b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

freqtrade/exchange/exchange.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3447,7 +3447,7 @@ def get_max_leverage(self, pair: str, stake_amount: float | None) -> float:
34473447
# else: # if on the last tier
34483448
if stake_amount > max_stake:
34493449
# If stake is > than max tradeable amount
3450-
raise InvalidOrderException(f"Amount {stake_amount} too high for {pair}")
3450+
raise InvalidOrderException(f"Stake amount {stake_amount} too high for {pair}")
34513451

34523452
raise OperationalException(
34533453
f"Looped through all tiers without finding a max leverage for {pair}. "

tests/exchange/test_exchange.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5931,7 +5931,7 @@ def test_get_max_leverage_futures(default_conf, mocker, leverage_tiers):
59315931
assert exchange.get_max_leverage("SPONGE/USDT:USDT", 200) == 1.0 # Pair not in leverage_tiers
59325932
assert exchange.get_max_leverage("BTC/USDT:USDT", 0.0) == 125.0 # No stake amount
59335933
with pytest.raises(
5934-
InvalidOrderException, match=r"Amount 1000000000.01 too high for BTC/USDT:USDT"
5934+
InvalidOrderException, match=r"Stake amount 1000000000.01 too high for BTC/USDT:USDT"
59355935
):
59365936
exchange.get_max_leverage("BTC/USDT:USDT", 1000000000.01)
59375937

0 commit comments

Comments
 (0)