# Interactive Brokers Connection

*Available for Windows, macOS and Linux.*

Interactive Brokers provides real-time and historical data for stocks, options, futures, forex, bonds, CFDs, warrants and funds on 80 markets. See [www.interactivebrokers.com](http://www.interactivebrokers.com/) for more information and their pricing plans.

In order for MotiveWave® to work with Interactive Brokers, you will first need to install the Interactive Brokers’ Trader Workstation (TWS) Standalone and then create a Workspace in MotiveWave® for Interactive Brokers.

#### Data Limitations

Interactive Brokers places the following limitations on realtime and historical data accessible to 3rd party applications

1. **Pacing Violations** – TWS limits the number of requests for data. It too many requests for data occur in a short period of time, you may see error messages indicating “Pacing Violation”. If this happens you may need to wait a few minutes before trying to load data again.
2. **Real Time Quotes** – TWS does impose limits on the number of active tickers you have in MotiveWave® (typically around 100). Additional booster packs can be purchased from IB to work around this issue: [Booster Packs](https://www.interactivebrokers.com/en/index.php?f=14193).
3. **Delayed Data Not Supported** – TWS does not provide access to delayed historical data and quotes.

For more details on these limitations see [IB Data Limitations](https://interactivebrokers.github.io/tws-api/historical_limitations.html#gsc.tab=0).

#### Installing Interactive Brokers Trader Workstation (TWS) Standalone

1. **Account Setup** – If you do not have an Interactive Brokers account, you will need to create an account with Interactive Brokers through [ww](http://www.interactivebrokers.com/)[w.interactivebrokers.com](http://www.interactivebrokers.com/). If you already have an account with Interactive Brokers, have your username and password ready.
2. **Install TWS** – If you have not done this already, you will need to install Interactive Broker’s Trader Workstation (TWS). You can do this from: <https://www.interactivebrokers.com/en/index.php?f=14099>
3. **Log Into TWS** – Start TWS and enter your login credentials. (Note: TWS must be running in order for MotiveWave® to work)
4. **Configure API Settings** – You will need to click on the ‘Configure’ button on the TWS toolbar (see screenshot below). The API will need to be enabled for MotiveWave® to connect. See API Settings screen shot below.
5. Select **API > Settings** from the menu on the left.
   * Make sure the following settings match the image below
     * Enable ActiveX and Socket Clients
     * Disable Read-Only API
6. Under Trusted IP Addresses:
   \*
   * Click the **Create** button.
   * Type in **127.0.0.1** and click **OK** (This is your local machine IP address).
   * Click **OK** to save the API Settings.
7. Leave TWS running and go back to MotiveWave®.

Screenshot for Step 4 – Configure API Settings:

![](https://content.gitbook.com/content/TKkuQ4IBYTTbN0oyR7L0/blobs/EWX6xaTAXrhsSKfW0BjP/ib_connection_01.png)

![](https://content.gitbook.com/content/TKkuQ4IBYTTbN0oyR7L0/blobs/LJjOQkUkeCouyBnyoCZt/ib_connection_02.png)

#### Configuring the Workspace In MotiveWave®

The following is the **Workspace** dialog in MotiveWave®. In general you should keep the default settings unless you have modified these in TWS. The **Client ID** field should be set to **0** unless there is a conflict with another charting application.

<figure><img src="https://2457682635-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTKkuQ4IBYTTbN0oyR7L0%2Fuploads%2FKfvmo6q6TBGXWCDfcOph%2Fimage.png?alt=media&#x26;token=48aa6002-8bba-4d9e-a96b-2fc6283e8d98" alt=""><figcaption></figcaption></figure>

The Interactive Brokers Workspace setup is now complete. To run MotiveWave® with Interactive Brokers, just make sure you have started TWS and logged in before starting/running the Interactive Brokers Workspace in MotiveWave®.

**Advanced Settings**

One way to work around the data limitations with TWS is to load historical and/or real time data from a third party data service. This option can be configured by clicking on the **Advanced** button from the Workspace dialog.

<figure><img src="https://2457682635-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTKkuQ4IBYTTbN0oyR7L0%2Fuploads%2FaCmHCX9TRwe7T8ZchIDe%2Fimage.png?alt=media&#x26;token=9f02f242-4ebb-4320-86f1-1f1918420e73" alt=""><figcaption></figcaption></figure>
