From 38809acde817c27262c119b7bab157b19ad9e34a Mon Sep 17 00:00:00 2001 From: Matthias Date: Mon, 24 Aug 2020 06:50:43 +0200 Subject: [PATCH] Don't rerun for known closed orders --- freqtrade/freqtradebot.py | 4 ++++ freqtrade/persistence/models.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/freqtrade/freqtradebot.py b/freqtrade/freqtradebot.py index cb44165f4..498b3eea6 100644 --- a/freqtrade/freqtradebot.py +++ b/freqtrade/freqtradebot.py @@ -306,6 +306,10 @@ class FreqtradeBot: for order in trade.orders: logger.info(f"Trying to refind {order}") fo = None + if not order.ft_is_open: + # TODO: Does this need to be info level? + logger.info(f"Order {order} is no longer open.") + continue if order.ft_order_side == 'buy': # Skip buy side - this is handled by reupdate_buy_order_fees continue diff --git a/freqtrade/persistence/models.py b/freqtrade/persistence/models.py index c3a112828..e0b9624dd 100644 --- a/freqtrade/persistence/models.py +++ b/freqtrade/persistence/models.py @@ -132,7 +132,7 @@ class Order(_DECL_BASE): def __repr__(self): return (f'Order(id={self.id}, order_id={self.order_id}, trade_id={self.ft_trade_id}, ' - f'side={self.side}, status={self.status})') + f'side={self.side}, order_type={self.order_type}, status={self.status})') def update_from_ccxt_object(self, order): """