Don't rerun for known closed orders

This commit is contained in:
Matthias 2020-08-24 06:50:43 +02:00
parent 311b55fc24
commit 38809acde8
2 changed files with 5 additions and 1 deletions

View File

@ -306,6 +306,10 @@ class FreqtradeBot:
for order in trade.orders: for order in trade.orders:
logger.info(f"Trying to refind {order}") logger.info(f"Trying to refind {order}")
fo = None 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': if order.ft_order_side == 'buy':
# Skip buy side - this is handled by reupdate_buy_order_fees # Skip buy side - this is handled by reupdate_buy_order_fees
continue continue

View File

@ -132,7 +132,7 @@ class Order(_DECL_BASE):
def __repr__(self): def __repr__(self):
return (f'Order(id={self.id}, order_id={self.order_id}, trade_id={self.ft_trade_id}, ' 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): def update_from_ccxt_object(self, order):
""" """