chore: slight reordering within stake_amount_limit method

This commit is contained in:
Matthias
2025-04-18 14:07:04 +02:00
parent d6f58cd6cf
commit f711afd843

View File

@@ -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