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]