Solution to keep IB Gateway alive?

Discussion in 'Interactive Brokers' started by thecalip, Apr 5, 2020.

  1. Indeed. I also use IBCAlpha, which keeps it running from Monday to Friday. But it can't prevent the weekend shutdown (unless you have an older version of Gateway and disable 2FA).
     
    #11     Apr 6, 2020
  2. FrankInLa

    FrankInLa

    Question, why do you need IBCAlpha during the week? To prevent the automatic re-load of TWS/gateway? It is automated even without the 3rd party app as of the latest IB API version.

     
    #12     Apr 6, 2020
  3. There are cases where I want to keep Gateway running from one week into the other while I am not able to access that computer. Cases where I am not able to provide 2FA during a re-login on a Sunday. In those cases do I disable 2FA before my departure and let it run (multiple weeks if so required) until my return. Then I enable 2FA again. IBCAlpha is able to keep Gateway alive during those weekends, as long as the Gateway version is older than 974. For this reason do I not upgrade Gateway to the latest version.
     
    #13     Apr 6, 2020
  4. FrankInLa

    FrankInLa

    I was asking specificially about the usage during the week. Why do you need this 3rd party app during the week? Over the weekend you have to login once anyway. But again, I am asking specifically for usage during the week. I don't see any benefit of using it to ensure operation during the week, but I may be missing something.

     
    #14     Apr 6, 2020
  5. d08

    d08

    On top of the daily I shut it down on saturday for the weekend. Running 978 which is from last year. Has been running without interference for a few months now. With newer ones, that wouldn't work?
     
    #15     Apr 6, 2020
  6. According to the IBCAlpha readme file:
    https://github.com/IbcAlpha/IBC
    I haven't tried this myself though. However, this "mantra" is often repeated at the IBCAlpha forum https://groups.io/g/ibcalpha

    Now, in regular cases I probably wouldn't need to use IBCAlpha, as I am switching Gateway off on Saturday morning and back on on Sunday evening. And then let Gateway run until the following Saturday. However, it has become my habit of not starting Gateway, but starting IBCAlpha instead. And let IBCAlpha start Gateway.
     
    #16     Apr 6, 2020
  7. d08

    d08

    True. But if you shut it down daily and restart, then set the auto logoff time between the interval in the gateway, it seems to keep working and the auto logoff dialog doesn't pop up. So every day, shut down at 23:00, auto logoff time set at 23:01, restart via IBCAlpha at 23:02.

    I also have checks in my code so the IB API error handler when receiving certain error codes will run a bash script to make sure everything is running. I haven't actually looked through all the logs if I had unexpected logoffs lately.
     
    #17     Apr 6, 2020
  8. I do something similar. Error codes are captured and sent as an email to me (besides being written to a log file). Besides checking whether Gateway is still alive does my software also check whether my internet connection is still alive. And a few more of those kind of checks. If anything is not okay will it fire an email to me. The reason for using email is that my trading computer is a separate (headless) machine which I don't monitor 24/7.
     
    #18     Apr 6, 2020
  9. d08

    d08

    I used to check for connectivity - basic approach with 1 second pings to IB server but since I moved to cloud, I haven't had the need for it, positions will be closed as the connection comes back. I monitor mostly through TWS and about once a week check the logs or when something suspect is going on.
     
    #19     Apr 6, 2020