ignore cancelled order during trade state update

This commit is contained in:
gcarq 2017-12-16 02:36:43 +01:00
parent cb4ecfd3a3
commit ddd3d2d0a9

View File

@ -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)