From 8dc322d7f2c8717a1f5b102996a25ca396172633 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 8 Dec 2024 10:20:21 +0100 Subject: [PATCH] chore: don't allow negative stake amounts --- freqtrade/wallets.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/freqtrade/wallets.py b/freqtrade/wallets.py index 9864d0604..7fe78d935 100644 --- a/freqtrade/wallets.py +++ b/freqtrade/wallets.py @@ -339,7 +339,7 @@ class Wallets: f"lower than stake amount ({stake_amount} {self._config['stake_currency']})" ) - return stake_amount + return max(stake_amount, 0) def get_trade_stake_amount( self, pair: str, max_open_trades: IntOrInf, edge=None, update: bool = True