[Add] filter for empty query trade/order data

This commit is contained in:
vn.py 2019-09-03 09:57:19 +08:00
parent 5e31db27b2
commit 238b59f112

View File

@ -454,6 +454,7 @@ class DaFutureApi(FutureApi):
"""
Callback of order query.
"""
if data["TreatyCode"]:
order = OrderData(
symbol=data["TreatyCode"],
exchange=EXCHANGE_DA2VT[data["ExchangeCode"]],
@ -482,6 +483,7 @@ class DaFutureApi(FutureApi):
"""
Callback of trade query.
"""
if data["TreatyCode"]:
self.update_trade(data)
if last: