¿ªÔÆÌåÓý

ctrl + shift + ? for shortcuts
© 2025 Groups.io

After loss and regain of internet connection - login credentials are required


Erez Kaplan
 

Hi,

?

After I?loss and regain internet connection, the TWS login credentials are required. (see photo)

Just to be clear:

1) This is NOT the weekly Sunday issue as discussed in the past. ( simulated by disconnecting the Internet on Tuesday, re enetring credentials every time, several times)

2) Daily restart with? ¡°Auto restart¡± works fine.



 

I have talked with IB support about this. They say this pops up when the system has been attempting to reconnect for too long. I voiced my frustration to them because you cannot get an API to easily manage this error in an un-attended manner.... Perhaps if we get a few more people complaining about this "feature" they will remove it.


 

This is easily handled.
If getNextId / currentTime-Events are not responded after a few seconds, just kill the client. Implement a cron-jo to restart the api-app after 5 minutes, if it is not active.
Log the incedent

or
(this is how the ib-ruby gateway handles this pattern)
ask before every critical api-call (i.e. placing an order) to send a current-time-respond. If this is not received immediately, inform the requesting program that the action cannot be transformed.

I think this is standard for WAN-Applications.


 

We have not seen this in a very long time. It happened before and for a few months after they introduced the automatic re-login between Sundays feature.

For how long was your TWS disconnected from IB?
When did this happen?

We do see disconnect (error 1100) and reconnect (1102) events pretty much every night during the maintenance window.but TWS properly reconnects and authenticates automatically. The disconnect period is about 90sec to 3 minutes and usually starts just after 23:20 Chicago time (see data table below). During that time, TWS makes relogin attempts every few seconds (10 to 30 times) and operation continues normally as soon as login succeeds.




Count TS Duration (s) Date/Time #1100 #1102
1 1627532535165 ? 2021-07-28 23:22:15.165-0500 X ?
2 1627532541932 ? 2021-07-28 23:22:21.932-0500 X ?
3 1627532546931 ? 2021-07-28 23:22:26.931-0500 X ?
4 1627532548164 ? 2021-07-28 23:22:28.164-0500 X ?
5 1627532551936 ? 2021-07-28 23:22:31.936-0500 X ?
6 1627532554025 ? 2021-07-28 23:22:34.025-0500 X ?
7 1627532561933 ? 2021-07-28 23:22:41.933-0500 X ?
8 1627532572361 ? 2021-07-28 23:22:52.361-0500 X ?
9 1627532586941 ? 2021-07-28 23:23:06.941-0500 X ?
10 1627532610719 ? 2021-07-28 23:23:30.719-0500 X ?
11 1627532633587 98.422 2021-07-28 23:23:53.587-0500 ? X
? ? ? ? ? ?
1 1627618904085 ? 2021-07-29 23:21:44.085-0500 X ?
2 1627618907320 ? 2021-07-29 23:21:47.320-0500 X ?
3 1627618912314 ? 2021-07-29 23:21:52.314-0500 X ?
4 1627618917413 ? 2021-07-29 23:21:57.413-0500 X ?
5 1627618922310 ? 2021-07-29 23:22:02.310-0500 X ?
6 1627618925556 ? 2021-07-29 23:22:05.556-0500 X ?
7 1627618932311 ? 2021-07-29 23:22:12.311-0500 X ?
8 1627618946838 ? 2021-07-29 23:22:26.838-0500 X ?
9 1627618957312 ? 2021-07-29 23:22:37.312-0500 X ?
10 1627618973319 ? 2021-07-29 23:22:53.319-0500 X ?
11 1627618999206 95.121 2021-07-29 23:23:19.206-0500 ? X