Interactive Brokers: Overview & Setup

Excel Price Feed provides a new library of simple to use Excel formulas which bring live prices and portfolio details into Excel (and more coming soon). All formulas can be used with either an Interactive Brokers live or paper trading account.

You can easily incorporate these formulas into your existing spreadsheets; there is no complicated RTD formulas to use and there is no dependency on any VBA code.

Setup

To use the Excel Price Feed Interactive Brokers formulas you need to have installed and logged onto Trader Workstation (TWS). If you do not have TWS installed, click here to download it from the Interactive Brokers website.

Once you have installed and logged onto TWS follow the steps below to configure TWS:

Trader Workstation (TWS) Setup

1. Select the "File" menu then "Global Configuration" option:

Interactive Brokers TWS Global Configuation menu option

2. On the left side select "API" then "Settings". Ensure that "Enable ActiveX and Socket Clients" is selected. Also, ensure there is a "Socket Port" specified, usually this is set to 7496 by default, you do not need to change this.

Interactive Brokers TWS API Settings

3. Click "Apply" and then "OK" to close the Global Configuration dialogue.

Excel Price Feed Setup

1. Select the "Configuration Pane" from the Add-in toolbar in Excel:

Excel Price Feed Configuration Pane Button

2. Select the "Interactive Brokers" tab and then the "Setup" tab:

The Excel Price Feed Interactive Brokers setup screen

On this screen you can specify how Excel Price Feed will connect to TWS. Generally you can leave these settings as the default:

  • Host: This is the host address of the machine where TWS is running, usually the same machine as Excel. If so you can leave default "127.0.0.1" address as this is the local machine. If you run Excel on a different machine then enter the IP address of the TWS machine here.
  • Port: This should be the same as the "Socket Port" setting in the TWS API settings.
  • Client Id: Every client API program that connects to TWS must have a unique Client Id, so if Excel Price Feed is the only app that you connect to TWS then you can leave the default value. If you have other apps that connect then please ensure this Client Id is unique (it needs to be a positive number).


Connect to Interactive Brokers

Once you have completed setup you can connect Excel Price Feed to Interactive Brokers using either the "Connect" button on the tab bar or on the Configuration Pane and start using the Excel formulas:

Excel Price Feed Connect/Disconnect Interactive Brokers

The "Connected" icon on the tab bar show whether Excel Price Feed is connected to TWS. There is also a log which shows any messages sent from IB/TWS to Excel Price Feed.

Excel Interactive Brokers Formula Reference

Market Data Formulas
Portfolio Formulas