您能说出TWS API是否延迟市场数据?
我启用了延迟的市场数据,
ibClient.ClientSocket.reqMarketDataType(4);
但是我的某些市场数据将被延迟,而有些则不会。 有什么方法可以告诉哪些是延迟的(理想情况下是多少)?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
当您收到tickprice消息时,请注意字段参数,该参数告诉您它是延迟还是实时。同样,注册MarketDatatype事件将为您提供另一条消息作为数据类型的标题。
类似:
上述常数可在 https://interactivebrokers.github.io/tws -api/tick_types.html 和
如果我没记错的话,请在每个tickpricemessages之前发送MarketDatatyPemessage,因此,当TWS升级您的reqmarketDataType(FrozendElayed)时,请延迟(或LIVE-订阅该工具数据, )您应该按照以下方式收到一些东西:
当然,您收到的ticktypes当然取决于输入的genertickList字符串,该字符串输入了Reqmktdata。
When you receive the tickprice message take note of the field parameter, that tells you if it is delayed or live. Also register for MarketDataType events will give you another message as a header for the data type.
Something like:
The above constants are available at https://interactivebrokers.github.io/tws-api/tick_types.html and https://interactivebrokers.github.io/tws-api/market_data_type.html
If I recall correctly a MarketDataTypeMessage is sent before each block of TickPriceMessages, so when TWS upgrades your reqMarketDataType(FrozenDelayed) to delayed (or live - if you are subscribed to that instruments' data) you should receive something along the lines of:
Of course exactly what ticktypes you receive will depend on the genericTickList string entered into reqMktData.