mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 10:21:59 +00:00
Add "catch-all" exceptionhandler for handle_onexchange_order
(it's actually a poor mans workaround) closes #9025
This commit is contained in:
parent
421a6c02a0
commit
29fbac9f96
|
@ -468,8 +468,6 @@ class FreqtradeBot(LoggingMixin):
|
|||
safe_value_fallback(order, 'lastTradeTimestamp', 'timestamp') // 1000,
|
||||
tz=timezone.utc)
|
||||
trade.orders.append(order_obj)
|
||||
# TODO: how do we handle open_order_id ...
|
||||
Trade.commit()
|
||||
prev_exit_reason = trade.exit_reason
|
||||
trade.exit_reason = ExitType.SOLD_ON_EXCHANGE.value
|
||||
self.update_trade_state(trade, order['id'], order)
|
||||
|
@ -485,7 +483,10 @@ class FreqtradeBot(LoggingMixin):
|
|||
Trade.commit()
|
||||
|
||||
except ExchangeError:
|
||||
logger.warning("Error finding onexchange order")
|
||||
logger.warning("Error finding onexchange order.")
|
||||
except Exception:
|
||||
# catching https://github.com/freqtrade/freqtrade/issues/9025
|
||||
logger.warning("Error finding onexchange order", exc_info=True)
|
||||
#
|
||||
# BUY / enter positions / open trades logic and methods
|
||||
#
|
||||
|
|
Loading…
Reference in New Issue
Block a user