multiple connections to IB TWS

Discussion in 'Automated Trading' started by BuyLowSellHigh, Aug 6, 2009.

  1. Is there a way to establish multiple connections to IB TWS? I am currently using QT for charts and want to be able to save the tick-by-tick index quotes (and eventually run a automated trading in Matlab) concurrently. Saw some folks talk about bringing up multiple instances of TWS. Do I need to open a second IB account for that? TIA.
  2. each login to TWS needs it's own username.

    however, you can have multiple usernames associated with the same account. this may be dependent on the type of account you have, you should be able to create them in your online control panel if you're allowed. otherwise call IB help desk.

    once logged in, you can have multiple applications connected to same TWS instance at once, each one should have it's own session id in the IB api (or use something like tradelink which handles this for you).
  3. Yes, you can have multiple connections to TWS via the API. I think the limit is something like 9 connections. No need for separate account or multiple instances of TWS.

    Each client needs to supply a unique client ID. Read the API doc.
    fullautotrading likes this.
  4. Awesome.

    I had assumed that I can't connect two clients to single TWS because I had trouble connecting both QT and Ninja to IQ. I now realize that I just need to give a unique client ID to each!

  5. Tradelink seems to have ability to record tick data. That's terrific. I will definitely check it out. Thanks. The amount of resource available to at-home traders are pretty amazing these days. HW, SW, networks cost very little. Almost too good to be true. :)