Connection to Interactive Brokers
Follow the steps in this guide to connect the Quantower platform to the Interactive Brokers. The manual contains a detailed description, which will allow you to correctly configure the connection.
Interactive Brokers places the following limitations on real-time and historical data accessible to 3rd party applications
- Pacing Violations – TWS limits the number of requests for data. If 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.
- Real-Time Quotes – TWS does impose limits on the number of active tickers (typically around 100). Additional booster packs can be purchased from IB to work around this issue: Booster Packs.
- Delayed Data Not Supported – TWS does not provide access to delayed historical data and quotes.
- IB does not currently offer full depth market data for futures.
- Market data updates are not frequent; therefore, we do not recommend using IB data (instead we recommend using dxFeed or Iqfeed as market data provider).
This guide will help you to configure the connection to the Interactive Brokers and start working on Quantower platform.
Video connection guide to Interactive Brokers
- 1.Download **and install Quantower trading platform (if you haven’t it yet) of an appropriate version (32 bit or 64 bit), and make sure that your PC complies with the [minimum requirements**](../getting-started/installation.md#pc-requirements)
- 2.After installing the platform, you need to create a demo or real account by clicking the appropriate links on the Interactive Brokers official website.
Creating a demo or real account on Interactive Brokers
- 1.Download and install IB Software — TWS (Trader Workstation) or IB Gateway on their website. The difference between IB Gateway and TWS is that IB Gateway has a lighter and less sophisticated graphical user interface (GUI) than TWS.
Download Trader Workstation (TWS) or IB Gateway
- 1.Launch TWS or IB Gateway and enter your User name and Password into it, that you received from the broker and click Login button.
For IB Gateway in the API Type section select IB API only!
Select API type and enter Login and password for IB Gateway
- 1.Once you are logged in, open the additional settings in IB Gateway or TWS: Configure-> Settings. Select API section - > Precautions and activate all checkboxes.
Also necessary in the Settings section deactivate the Read-Only API to perform trading operations.
Activate all checkboxes in the IB Gateway or TWS API settings
- 1.If you connect via the TWS platform, please select API section - > Settings and check to Enable ActiveX and Socket Clients box as well **uncheck Read-Only API**:
Diactivate Read-Only API and check Socket Clients in TWS platform
- 1.Open the Connections Manager in Quantower platform, select Interactive Brokers connection and click on the CONNECT button.
Click on the Connect button once you are logged in to TWS or IB Gateway
- Wrong Connection Parameters
- Trader Workstation is not running (below)
- The Price Does Not Conform to the minimum price variation for this contract (FOREX symbols)
There may be some problems during the connection to Interactive Brokers, for example, Wrong Connection Parameters
Wrong parameteres during connection to Interactive Brokers
In this case, you need to check the connection settings in our platform and in the TWS platform (or IB Gateway). In our platform, go to the Connection Settings.
Connection settings in Quantower for Interactive Brokers
Select the application through which you are connecting — TWS platform or IB Gateway.
Select the necessary connection port type
If the problem persists even after choosing the right application, you need to configure the Socket port in TWS (or IB Gateway) and Quantower.
This Socket port in TWS (or IB gateway) should be the same as in Quantower
Select the Custom connection port type in the Connection settings of Quantower and set the Port Value
This Socket port in Quantower should be the same as in TWS (or IB gateway)
- 1.Trader Workstation is not running
Trader Workstation is not running. Please launch it to connect to IB
Connection to Interactive Brokers is made through their TWS trading platform or the IB Gateway application. To successfully connect to IB you need to run their applications.
If you have any other problems during the connection to Interactive Brokers, please contact us in support and we will help you. https://www.quantower.com/contact-us
- 1.The Price Does Not Conform to the minimum price variation for this contract (FOREX symbols)
By default, placing orders on Forex pairs in IB is carried out at prices equal to 1/2 pip. Like on the screenshot below:
If you place orders in Quantower at prices between those specified, for example 1.19382, you will get a message: The Price Does Not Conform to the minimum price variation for this contract (FOREX symbols).
To solve this problem and to be able to place orders at any desired prices, you need to activate the setting in the TWS platform (or in IB Gateway)