在CTP接口层添加对无效数据的过滤
This commit is contained in:
parent
65b8551677
commit
1517117b8e
@ -338,6 +338,11 @@ class CtpMdApi(MdApi):
|
||||
#----------------------------------------------------------------------
|
||||
def onRtnDepthMarketData(self, data):
|
||||
"""行情推送"""
|
||||
# 忽略成交量为0的无效tick数据
|
||||
if not data['Volume']:
|
||||
return
|
||||
|
||||
# 创建对象
|
||||
tick = VtTickData()
|
||||
tick.gatewayName = self.gatewayName
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user