Configure reconnect interval? #168
Replies: 3 comments
-
It depends heavily on your code. So it's not easy to give you something specific. Personally i use ib_async paired with tenacity it works like a charm. Regarding why it gets disconnected, again difficult to say. you ask about having api and app connected. this container does exactly that with ibgateway or tws. you can can even run paper and live in parallel. are you trying to run paper and login somewhere else to live? that could explain your issues. |
Beta Was this translation helpful? Give feedback.
-
I don't mean my client connection. I run the IB gateway with this docker compose settings:
So it's connected to my paper account in r/o mode. From time to time I need to check my positions on my paper account via the IBKR app. So when I login there, it tells me someone else is already connected (obviously the IB gateway) und I'm being asked whether to drop that other connection. I hit yes, the app drops the other connection and I can login for a second until the gateway does the same with my app when it reconnects:
My app works fine after I stopped the gateway. |
Beta Was this translation helpful? Give feedback.
-
This is a docker wrapper around ibgateway/TWS and IBC it does what they do (plus a few other things). You will have the same problem if you run ibgateway/TWS in your host. I have created another account to use with my mobile, this way i can check withtou disconnecting ibgateway/TWS. Another option is to set IBC to allow or disallow other connections taking over. That can be done with this docker image too. |
Beta Was this translation helpful? Give feedback.
-
I got it working on my paper account. However, when I want to check my positions through the app, the gateway immediately reconnects and kicks me out.
Is there a way to configure reconnect? Or, better, to have API and app connected at the same time?
I have already configured read-only.
Beta Was this translation helpful? Give feedback.
All reactions