# 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:

![](/files/-MJ-3JUL4_F0CR0v0kc_)

![](/files/-MJ-3OZd0huUe4WLyvCL)

#### 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="/files/wNnLdp8z3gXk8vvokljw" 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="/files/QdtaqSltM9ZI4mBUKdDv" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.motivewave.com/knowledge-base/connection/interactive-brokers-connection.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
