Fix condition for min-stake in position-adjust mode

closes #9915
This commit is contained in:
Matthias
2024-03-08 07:10:41 +01:00
parent 6f0f4f06ef
commit 2cfe993951
2 changed files with 2 additions and 1 deletions

View File

@@ -962,7 +962,7 @@ class FreqtradeBot(LoggingMixin):
# edge-case for now.
min_stake_amount = self.exchange.get_min_pair_stake_amount(
pair, enter_limit_requested,
self.strategy.stoploss if not mode != 'pos_adjust' else 0.0,
self.strategy.stoploss if not mode == 'pos_adjust' else 0.0,
leverage)
max_stake_amount = self.exchange.get_max_pair_stake_amount(
pair, enter_limit_requested, leverage)

View File

@@ -927,6 +927,7 @@ class RPC:
is_short=is_short,
enter_tag=enter_tag,
leverage_=leverage,
mode='pos_adjust' if trade else 'initial'
):
Trade.commit()
trade = Trade.get_trades([Trade.is_open.is_(True), Trade.pair == pair]).first()