mirror of
https://github.com/freqtrade/freqtrade.git
synced 2025-12-17 05:11:15 +00:00
chore: update wording in exception message
This commit is contained in:
@@ -3447,7 +3447,7 @@ class Exchange:
|
|||||||
# else: # if on the last tier
|
# else: # if on the last tier
|
||||||
if stake_amount > max_stake:
|
if stake_amount > max_stake:
|
||||||
# If stake is > than max tradeable amount
|
# If stake is > than max tradeable amount
|
||||||
raise InvalidOrderException(f"Amount {stake_amount} too high for {pair}")
|
raise InvalidOrderException(f"Stake amount {stake_amount} too high for {pair}")
|
||||||
|
|
||||||
raise OperationalException(
|
raise OperationalException(
|
||||||
f"Looped through all tiers without finding a max leverage for {pair}. "
|
f"Looped through all tiers without finding a max leverage for {pair}. "
|
||||||
|
|||||||
@@ -5931,7 +5931,7 @@ def test_get_max_leverage_futures(default_conf, mocker, leverage_tiers):
|
|||||||
assert exchange.get_max_leverage("SPONGE/USDT:USDT", 200) == 1.0 # Pair not in leverage_tiers
|
assert exchange.get_max_leverage("SPONGE/USDT:USDT", 200) == 1.0 # Pair not in leverage_tiers
|
||||||
assert exchange.get_max_leverage("BTC/USDT:USDT", 0.0) == 125.0 # No stake amount
|
assert exchange.get_max_leverage("BTC/USDT:USDT", 0.0) == 125.0 # No stake amount
|
||||||
with pytest.raises(
|
with pytest.raises(
|
||||||
InvalidOrderException, match=r"Amount 1000000000.01 too high for BTC/USDT:USDT"
|
InvalidOrderException, match=r"Stake amount 1000000000.01 too high for BTC/USDT:USDT"
|
||||||
):
|
):
|
||||||
exchange.get_max_leverage("BTC/USDT:USDT", 1000000000.01)
|
exchange.get_max_leverage("BTC/USDT:USDT", 1000000000.01)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user