bugfix: 数据引擎排除拒单类的活动订单

This commit is contained in:
wisfern 2017-08-18 09:53:30 +08:00
parent 68a65828d7
commit 5b2a6d06ea

View File

@ -350,7 +350,7 @@ class DataEngine(object):
self.orderDict[order.vtOrderID] = order
# 如果订单的状态是全部成交或者撤销则需要从workingOrderDict中移除
if order.status == STATUS_ALLTRADED or order.status == STATUS_CANCELLED:
if order.status in [STATUS_ALLTRADED, STATUS_REJECTED, STATUS_CANCELLED]:
if order.vtOrderID in self.workingOrderDict:
del self.workingOrderDict[order.vtOrderID]
# 否则则更新字典中的数据