Keyboard Shortcuts
Likes
Search
TWS API | Options market data request issue.
Hello!? I'm trying?to request option chain and subscribe market data, to get prices for options on a given STK contract. I do client().reqMarketDataType(DELAYED); at this moment I have a number of Put\Call contracts,? then I try? client().reqMktData(nextReqId(), optionContract, "", false, false, null); for each option contract.? Aaand after that I keep getting this message?| 10197 | No market data during competing live session, In very rare cases I could get data, but mostly errors and nothing (like 95% of requests failed). I don't have any other device with TWS, or accounts. Only one I?logged in from this computer. I'm using a paper account for development, and I don't have any subscriptions to IB, could that be a problem? Still STK market data arrives as it should for any number of requests.? Thanks! |
LS
Thanks for your reply.? I tried as you suggested, still nothing.Now I downloaded IBGateway and tried it as well, still same error.? In the log tab I could see another weird?message:? "Model is not valid: Active:true TSLA/20201127/490.0/Call TOP/PACED....."? that kept repeating. What could be the problem? Contracts to request market data are looking like this: §á§ä, 20 §ß§à§ñ§Ò. 2020 §Ô. §Ó 17:24, Mikhail Ershov <misha-ershov@...>: Probably problem fixed in 981th version, |
LS
here is the log for stable version, no "model is not valid" error, but still "competing?live session" error §ã§Ò, 21 §ß§à§ñ§Ò. 2020 §Ô. §Ó 14:57, LS <justgreey@...>:
|
Seeing the same error when requesting option prices with the following steps: Is this a known issue with option prices from paper accounts? |
How much time do you have to wait to get back again good data ? ? I will hypothesis that this is not related to connection issue but to some delay that IB introduce to pace down subscriptions. Some of them are "not within 15 sec" some others are even "10 minutes" base. (never saw anything longer than 10 min) And the problem is that I guess that when ungracefully closed, TWS doesn't reset some counters (or thing alike) so that restarting it does help (sometime, not enough case found to decide that there is a true correlation) ? Try getting an idea of how long you have to wait to cure that Try restarting TWS (or Gateway) and see ? Also be careful that TWS itself is accounted in the limitations. So depending upon what you do on TWS you may of may not encounter oddities. Gateway is safer for sake of hecking repeatability of error. But also restart it when you see such thing and check log |
On Fri, Dec 11, 2020 at 05:41 PM, rtx wrote:
Are there different recommendations to ensure proper disconnect/reconnect cycles?Your message contains an 8 step overview. I would like to emphasize that step #5 must contain two activities: 5a. cancel market data subscription for the tickerID: cancelMktData(1) 5b. disconnect socket connection: eDisconnect() Unsubscribing from all that you were subscribed to before closing the connection is necessary to ensure that IB's servers understand your intentions, and that the used tickerID values are released and can be re-used. Having said that, I sometimes also get a error "10197? ?No market data during competing live session". However, I don't use a paper trading account. Instead, I receive this in my live trading account, even though there is only one account active. Thus far this error message has not affected my automated trading, so I simply ignore it. |
TWS API team?buried in the research of the problem...
toggle quoted message
Show quoted text
I'm currently ignore that error as a warning, and it seems market data comes after some time.
|