From ddd3d2d0a9a1d01faecb89a1915107d7f3cac096 Mon Sep 17 00:00:00 2001 From: gcarq Date: Sat, 16 Dec 2017 02:36:43 +0100 Subject: [PATCH] ignore cancelled order during trade state update --- freqtrade/persistence.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/freqtrade/persistence.py b/freqtrade/persistence.py index 299843906..ba0ad1785 100644 --- a/freqtrade/persistence.py +++ b/freqtrade/persistence.py @@ -87,7 +87,8 @@ class Trade(_DECL_BASE): :param order: order retrieved by exchange.get_order() :return: None """ - if not order['closed']: + # Ignore open and cancelled orders + if not order['closed'] or order['rate'] is None: return logger.info('Updating trade (id=%d) ...', self.id)