From f711afd843cdaf62143a484743c1d603cc0f22df Mon Sep 17 00:00:00 2001 From: Matthias Date: Fri, 18 Apr 2025 14:07:04 +0200 Subject: [PATCH] chore: slight reordering within stake_amount_limit method --- freqtrade/exchange/exchange.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/freqtrade/exchange/exchange.py b/freqtrade/exchange/exchange.py index 6d0b0925c..d04600c53 100644 --- a/freqtrade/exchange/exchange.py +++ b/freqtrade/exchange/exchange.py @@ -989,6 +989,8 @@ class Exchange: except KeyError: raise ValueError(f"Can't get market information for symbol {pair}") + stake_limits = [] + limits = market["limits"] if isMin: # reserve some percent defined in config (5% default) + stoploss margin_reserve: float = 1.0 + self._config.get( @@ -1001,8 +1003,6 @@ class Exchange: margin_reserve = 1.0 stoploss_reserve = 1.0 - stake_limits = [] - limits = market["limits"] if limits["cost"][limit] is not None: stake_limits.append( self._contracts_to_amount(pair, limits["cost"][limit]) * stoploss_reserve