chore: prevent error exiting when an order is already open and due for cancelation
This commit is contained in:
@@ -1974,7 +1974,11 @@ class FreqtradeBot(LoggingMixin):
|
|||||||
return amount
|
return amount
|
||||||
|
|
||||||
trade_base_currency = self.exchange.get_pair_base_currency(pair)
|
trade_base_currency = self.exchange.get_pair_base_currency(pair)
|
||||||
wallet_amount = self.wallets.get_free(trade_base_currency)
|
# Free + Used - open orders will eventually still be canceled.
|
||||||
|
wallet_amount = self.wallets.get_free(trade_base_currency) + self.wallets.get_used(
|
||||||
|
trade_base_currency
|
||||||
|
)
|
||||||
|
|
||||||
logger.debug(f"{pair} - Wallet: {wallet_amount} - Trade-amount: {amount}")
|
logger.debug(f"{pair} - Wallet: {wallet_amount} - Trade-amount: {amount}")
|
||||||
if wallet_amount >= amount:
|
if wallet_amount >= amount:
|
||||||
return amount
|
return amount
|
||||||
|
|||||||
Reference in New Issue
Block a user