I'm quite new at IB API so my quiestion could be obvios for someone. I'm looking how to keep IB Gateway connected to IB 24/7. I'm trying to test algo strategy on demo account (edemo/demouser) but Gateway unexpectedly disconnects (gateway keeps working) from IB. After I press reconnect buttom everything works fine but i can't do this all the time. Is there any possibility to catch this event and incapsulate it into my programm or this is due to demo account and I should use real one? Any help would be appreciated.