Skip to content

How to re-establish market data subscriptions after connection to TWS/Gateway lost #10

@clisztian

Description

@clisztian

I guess this is more of a general question in the direction of the API itself, but suppose that the TWS /Gateway connection is lost (internet outage, TWS crash, whatever), and by some automatic means the TWS is restarted and reinstated. How does one go about regaining the market subscription after reconnect? The obvious approach of
clientSocket.eConnect(....)
and then calling after successful connection (clientSocket.isConnected() is true)
clientSocket.reqRealTimeBars(...)
with a new id does not work. Connection is successful, but it seems any api calls are inactive/dead. I also tried instantiating a new reader = new EReader(clientSocket..) but that does nothing either.
Would you happen to have any insights on this?
Thanks for you help!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions