Enable Interactive Brokers API to Start Algorithmic Trading

Algorithmic trading allows you to take a defined trading plan and write a piece of software to execute that plan consistently. We will go over the steps to enable Interactive Brokers API to start algorithmic trading on the Interactive Brokers (IB) Platform. You should already have an IB account setup and configured your paper trading account for use in their Trader Workstation (TWS) platform.

Enable Interactive Brokers TWS API for Algorithmic Trading

Total time to complete about 5 minutes.

Please start this configuration with your paper trading account.

  1. Launch Trader Workstation Application

    After launching Trader Workstation select paper trading tab and login to the software.

    Interactive Brokers Login Screen Paper Trading

  2. Open the Global Configuration Menu

    Select File then Global Configuration in the top menu of trader workstation.

    Interactive Brokers Global Configuration Menu

  3. Configure API Settings for Algorithmic Trading

    Expand the API section and select Settings menu.

    Check “Enable ActiveX and Socket Clients” because we will be using a socket client connection to connect to the API.

    Uncheck “Read-Only API” otherwise you will only be able to send any order into the system.

    Set “Socket Port” to 7497. This can be customized to meet your requirements.

    Check “Allow connections from localhost only”. This is an important setting because it only allows connections from the same computer TWS is running on. Otherwise you would add trusted IP addresses allowed to connect.

    Click OK to save changes.

    Interactive Brokers API Setting Page

Order Entry TWS Pro Enable API Connection

Related Posts
Connect to Interactive Brokers API
DotNet Phoenix Default Post Image

Build a C# form app to connect to Interactive Brokers API. If you read Enable Interactive Brokers API to Start Read more