What are you yapping about? I am not working for IB nor defending them. I am goal oriented and hence look for workarounds and solutions. Bitching does not help. And yes, their API sucks in many areas. But that is all we got for the time being. I gave you a specific way how to minimize the current problems with the gateway re-connect.
From the point of view of an automated trader, most of the time, it makes no sense that the Gateway takes the initiative to shut down at a given time.
There should be no point of doing that on a daily basis if it were programmed properly. It only makes people laugh about their coding skills.
Anyway. Now, I will tell you the proper way to implement a relogin or autorestart feature.
Talking of API automation, in general, the king rule is that the gateway is a tool for the client to communicate with IB and absolutely all communications and actions must happen through that channel.
So if you add a relogin autostart feature, there has to be a command via API to trigger that, so that the client application can decide when and if to do that, in case it is necessary.
In any case, the relogin or autostart process must be seamless, require no security device to relogin to the same account and absolutely raise no prompts.
The blocking window warning about paper trading account should also be removed, or else nobody will be able to even start trying automation.
Under no circumstance, a blocking window must ever appear. Use API to tell things!
And the type of account should be communicated via API (we should not be forced to make arbitrary inference based on letters of account code). It is ridiculous that along so much unnecessary pieces of information transmitted, that one is not.
In brief.
- Absolutely no prompts at any time (repeat no prompts! Do not open warning windows! Use the API channel to tell things: there is a client listening, not humans!).
- Everything must happen via API, including possible re-login and/or auto restart commands. There must be proper API commands, to do so.
- Re-login to same account (triggered by client application) must be possible without requiring any (security) device and without any warning or prompt, outside of API communications, no matter what it is the type of account (paper/real).