This commit is contained in:
vn.py 2019-09-30 11:56:38 +08:00
parent 98716eec55
commit 61bf6bb81e

View File

@ -13,7 +13,7 @@ from ibapi.contract import Contract, ContractDetails
from ibapi.execution import Execution from ibapi.execution import Execution
from ibapi.order import Order from ibapi.order import Order
from ibapi.order_state import OrderState from ibapi.order_state import OrderState
from ibapi.ticktype import TickType from ibapi.ticktype import TickType, TickTypeEnum
from ibapi.wrapper import EWrapper from ibapi.wrapper import EWrapper
from ibapi.errors import BAD_LENGTH from ibapi.errors import BAD_LENGTH
from ibapi.common import BarData as IbBarData from ibapi.common import BarData as IbBarData
@ -320,7 +320,7 @@ class IbApi(EWrapper):
""" """
super(IbApi, self).tickString(reqId, tickType, value) super(IbApi, self).tickString(reqId, tickType, value)
if tickType != "45": if tickType != TickTypeEnum.LAST_TIMESTAMP:
return return
tick = self.ticks[reqId] tick = self.ticks[reqId]