Skip to content

Commit f711afd

Browse files
committed
chore: slight reordering within stake_amount_limit method
1 parent d6f58cd commit f711afd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

freqtrade/exchange/exchange.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -989,6 +989,8 @@ def _get_stake_amount_limit(
989989
except KeyError:
990990
raise ValueError(f"Can't get market information for symbol {pair}")
991991

992+
stake_limits = []
993+
limits = market["limits"]
992994
if isMin:
993995
# reserve some percent defined in config (5% default) + stoploss
994996
margin_reserve: float = 1.0 + self._config.get(
@@ -1001,8 +1003,6 @@ def _get_stake_amount_limit(
10011003
margin_reserve = 1.0
10021004
stoploss_reserve = 1.0
10031005

1004-
stake_limits = []
1005-
limits = market["limits"]
10061006
if limits["cost"][limit] is not None:
10071007
stake_limits.append(
10081008
self._contracts_to_amount(pair, limits["cost"][limit]) * stoploss_reserve

0 commit comments

Comments
 (0)