allow adjust trade position, even if there is an open order

This commit is contained in:
Axel-CH
2024-04-15 15:40:57 -04:00
parent 05cf4cab8e
commit 910b3ad536

View File

@@ -608,16 +608,13 @@ class FreqtradeBot(LoggingMixin):
""" """
# Walk through each pair and check if it needs changes # Walk through each pair and check if it needs changes
for trade in Trade.get_open_trades(): for trade in Trade.get_open_trades():
# If there is any open orders, wait for them to finish. # Do a wallets update (will be ratelimited to once per hour)
# TODO Remove to allow mul open orders self.wallets.update(False)
if not trade.has_open_orders: try:
# Do a wallets update (will be ratelimited to once per hour) self.check_and_call_adjust_trade_position(trade)
self.wallets.update(False) except DependencyException as exception:
try: logger.warning(
self.check_and_call_adjust_trade_position(trade) f"Unable to adjust position of trade for {trade.pair}: {exception}")
except DependencyException as exception:
logger.warning(
f"Unable to adjust position of trade for {trade.pair}: {exception}")
def check_and_call_adjust_trade_position(self, trade: Trade): def check_and_call_adjust_trade_position(self, trade: Trade):
""" """