adjusted amount to trade amount if higher
This commit is contained in:
parent
14c8c6ad87
commit
f4789268bc
@ -487,6 +487,10 @@ class FreqtradeBot(LoggingMixin):
|
|||||||
if trade.amount - amount < min_stake_amount:
|
if trade.amount - amount < min_stake_amount:
|
||||||
logger.info('Remaining amount would be too small')
|
logger.info('Remaining amount would be too small')
|
||||||
return
|
return
|
||||||
|
if amount > trade.amount:
|
||||||
|
logger.info(
|
||||||
|
f"Adjusting amount to trade.amount as it is higher. {amount} > {trade.amount}")
|
||||||
|
amount = trade.amount
|
||||||
self.execute_trade_exit(trade, current_exit_rate, sell_reason=SellCheckTuple(
|
self.execute_trade_exit(trade, current_exit_rate, sell_reason=SellCheckTuple(
|
||||||
sell_type=SellType.CUSTOM_SELL), sub_trade_amt=amount)
|
sell_type=SellType.CUSTOM_SELL), sub_trade_amt=amount)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user