Keyboard Shortcuts
Лайки
Пошук
No Security definition has been found for the request when running cpp sample code
reqRealTimeBars is served by the historical data server. But IBKR does not maintain ‘last price’ historical data for forex pairs. So you will never get realtime bars for any forex pair, if you have WhatToShow=”TRADES”: you’ll just get this error message 420:
Invalid Real-time Query:No historical market data for EUR/CASH@FXSUBPIP Last 0
But if you set WhatToShow=”MIDPOINT”, it works fine:
20241203 09:49:47.068 id=131072 time=20241203-09:49:40 open=0.829655 high=0.829655 low=0.82962 close=0.82964 volume=-1 WAP=-1 count=-1 20241203 09:49:50.362 id=131072 time=20241203-09:49:45 open=0.82964 high=0.82968 low=0.82964 close=0.829665 volume=-1 WAP=-1 count=-1 20241203 09:49:55.533 id=131072 time=20241203-09:49:50 open=0.829665 high=0.829665 low=0.82962 close=0.82962 volume=-1 WAP=-1 count=-1
Richard
|
Thanks for the reply richard.
When I send requests to the ib server, sometimes the data returns just fine, sometimes I get error 'Connectivity between IBKR and Trader Workstation has been lost' followed by 'No security defintion has been found for the request'. I'm wondering what's causing this? and how should I handle this?
|
Some suggestions:
Richard
From: twsapi@groups.io <twsapi@groups.io> On Behalf Of xz2872 via groups.io
Sent: 06 December 2024 02:51 To: twsapi@groups.io Subject: Re: [TWS API] No Security definition has been found for the request when running cpp sample code
runnig the test client multiple times gives different results.. |
Thank you for the suggestions richard.
I guess you're right about the third point that the connection is lost between the Gateway and the IBKR servers thus is cannot handle API requests hence the error. So I just need to figure out a way to correctly handle this situation.
Sry for the inconvience caused by the low quality pictures and again thanks for the help. |
Повідомлення
Більше