I recently discovered that some streaming market data subscriptions would randomly cease after 15-20 minutes if there were no activity over the API in any direction (such as before stock market open). I baked in regular dummy calls for TWS time (recCurrentTime I believe) as a way to pulse a keep-alive signal and had no problems since.
toggle quoted message
Show quoted text
I check each 60 seconds if there was any data that was delivered if not I resubscribe
?
sometimes this happens to scanners as well and you have to trigger a restart of IBKR
?
i use a docker container for IBKR to deal with this
?
its quite a mess but thats how it is unfortunately?
?
IBKR is the cheapest source to realtime data that has an individual friendly api
--
Best,
DS