Interactive Brokers

Setup Trader Workstation

In order to connect to Interactive Brokers, the Trader Workstation program must be running. Trader Workstation must also be configured with settings that enable IQBroker to connect to it. These settings are enabled by default, so most users don't need to make any changes. However, if you are unable to use your Interactive Brokers connection then make sure that Trader Workstation is configured as follows:

Open the Global Configuration dialog:

Make sure these API Settings are used:

Setup IB Gateway

As an alternative to Trader Workstation, you can choose to run the IB Gateway program. This program isn't as full-featured as Trader Workstation, but it consumes fewer resources. If you choose to use IB Gateway then you need to configure it as follows:

On login, select the IB API:

Make sure these API Settings are used:

The only setting which must be changed from the default is "Read-Only API": it's enabled by default, and needs to be disabled.

Create a Data Connection

Create an Interactive Brokers Data Connection in IQBroker:

The following settings are used to connect to Trader Workstation, so they must match the settings in that program. Note that the default settings in IQBroker and in Trader Workstation are the same, so usually you won't have to change these settings:

  • IP / Host - the computer where Trader Workstation is running. Usually this is, i.e. the same computer as the one where IQBroker is running.
  • Port - the port that Trader Workstation is listening for connections on (the default is 7496). If you've chosen to use IB Gateway then change this to IB Gateway's port (the default is 4001).

The Data Connection Wizard contains a few additional settings:

  • Backfill Months - every Interactive Brokers customer has a package that determines how far back they can request historical data. The default is 12 months. If you have a package that allows you to load historical data more than 12 months back, then enter the number of months here.
  • News Source 1 / 2 - if you have a subscription to a News provider (or to two providers) then select them here. This will allow you to view News about symbols that you are interested in.

Create a Broker Connection

Create an Interactive Brokers Broker Connection in IQBroker:

This is similar to creating a Data Connection, with the following additional settings:

  • Account Code - enter your Interactive Brokers account code here
  • Client ID - the default value of 0 is usually best. It's possible to enter other values, in order to isolate IQBroker from orders that are created in other programs (such as Trader Workstation).