From 61bf6bb81e949198ab492967c6571c87f1372b40 Mon Sep 17 00:00:00 2001 From: "vn.py" Date: Mon, 30 Sep 2019 11:56:38 +0800 Subject: [PATCH] [Fix] close #2099 --- vnpy/gateway/ib/ib_gateway.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vnpy/gateway/ib/ib_gateway.py b/vnpy/gateway/ib/ib_gateway.py index 795bb344..a427014c 100644 --- a/vnpy/gateway/ib/ib_gateway.py +++ b/vnpy/gateway/ib/ib_gateway.py @@ -13,7 +13,7 @@ from ibapi.contract import Contract, ContractDetails from ibapi.execution import Execution from ibapi.order import Order from ibapi.order_state import OrderState -from ibapi.ticktype import TickType +from ibapi.ticktype import TickType, TickTypeEnum from ibapi.wrapper import EWrapper from ibapi.errors import BAD_LENGTH from ibapi.common import BarData as IbBarData @@ -320,7 +320,7 @@ class IbApi(EWrapper): """ super(IbApi, self).tickString(reqId, tickType, value) - if tickType != "45": + if tickType != TickTypeEnum.LAST_TIMESTAMP: return tick = self.ticks[reqId]