Fix exception when using okex

closes #5842
This commit is contained in:
Matthias 2021-11-05 19:47:13 +01:00
parent ae3b53014d
commit d99eaccb5a

View File

@ -1281,6 +1281,11 @@ class FreqtradeBot(LoggingMixin):
trade.update_order(order) trade.update_order(order)
if self.exchange.check_order_canceled_empty(order):
# Trade has been cancelled on exchange
# Handling of this will happen in check_handle_timeout.
return True
# Try update amount (binance-fix) # Try update amount (binance-fix)
try: try:
new_amount = self.get_real_amount(trade, order) new_amount = self.get_real_amount(trade, order)
@ -1292,10 +1297,6 @@ class FreqtradeBot(LoggingMixin):
except DependencyException as exception: except DependencyException as exception:
logger.warning("Could not update trade amount: %s", exception) logger.warning("Could not update trade amount: %s", exception)
if self.exchange.check_order_canceled_empty(order):
# Trade has been cancelled on exchange
# Handling of this will happen in check_handle_timeout.
return True
trade.update(order) trade.update(order)
Trade.commit() Trade.commit()