Running IB Gateway remotely and Workstation locally

Discussion in 'App Development' started by nooby_mcnoob, May 30, 2019.

  1. I've got Spartan running remotely on the cloud against IB Gateway, working great so far. The problem I have is I occasionally trade manually as well in a different account which shares the same live data feeds. If I launch workstation locally, it kills the connection remotely.

    IB doesn't like sharing live data for a single account on more than one machine, and it's a huge headache because (for some reason) occasionally IBController fails to restart properly - something to do with the DISPLAY variable.

    Anyway, is there a way to have IB Trader Workstation connect to a remote IB Gateway? I've got a tunnel running that I use to run scripts against the remote gateway but would like to have Workstation connect to it so I can use the interface I know and love.

    Thank you kind sirs and madams.
  2. Can you reverse your logic?

    Maintain a file on the remote system. Normally empty or absent.

    When you need local access your process first stores you local ip & port in the remote file. Then you start tws. Remote tunnels to your tws using that file if its gateway dies & file exists.

    When tws shuts down (maybe file gone as well), reconnects to gateway.
  3. This is a good backup idea, and is what I do manually now anyway :-/
  4. traider


    Just use a 3rd party program with GUI (local pc) that connect to tws gateway remotely
  5. I'm doing this through jupyter. Kinda fun tbh
  6. traider


    anything works, it's just a tcp pipe
    nooby_mcnoob likes this.
  7. I don't think you can connect TWS on one machine to Gateway on another machine. Both of them will try to make direct contact to IB's servers, resulting in that one of them get access and the other gets disconnected.
    You want to have the TWS GUI available on your local machine? Or is any user interface sufficient for you to do the manual trading you want to do?
  8. Yeah I want the TWS GUI on my machine but I just realized I can probably use X forwarding to do so. I wonder how slow it'll be!

    I'm also toying with using Jupyter to access the server which is working well enough for now in that I can place orders and chart stuff
  9. IB's Gateway is basically "TWS without GUI". It would indeed be nice to also have "TWS without Gateway" available (thus the GUI only, connecting to Gateway running either locally or remotely). If it were available it would also be helpful to me.
  10. qlai


    #10     May 31, 2019