diff --git a/vn.trader/ctpGateway/ctpGateway.py b/vn.trader/ctpGateway/ctpGateway.py index 3d07c562..b76e2ba0 100644 --- a/vn.trader/ctpGateway/ctpGateway.py +++ b/vn.trader/ctpGateway/ctpGateway.py @@ -338,6 +338,11 @@ class CtpMdApi(MdApi): #---------------------------------------------------------------------- def onRtnDepthMarketData(self, data): """行情推送""" + # 忽略成交量为0的无效tick数据 + if not data['Volume']: + return + + # 创建对象 tick = VtTickData() tick.gatewayName = self.gatewayName