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.
- Delayed Data Not Supported – TWS does not provide access to delayed historical data and quotes.
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
Download Trader Workstation (TWS) or IB Gateway
- Launch TWS and enter your Username and Password into it, that you received from the broker and click on Log In button.
- Once you are logged in, open the additional settings in TWS: Configure. 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
- Select API section - > Precautions and activate all checkboxes.
- Next, check that the TWS platform is selected in the connection settings in the Quantower platform.
- Launch IB Gateway and enter your Username and Password into it, that you received from the broker and click on Log In button.
Select API type and enter Login and password for IB Gateway
- Once you are logged in, open the additional settings in IB Gateway: Configure-> Settings. Select API section - > Precautions and activate all checkboxes.
Activate all checkboxes in the IB Gateway API settings
Also necessary in the Settings section deactivate the Read-Only API to perform trading operations.
- Next, check that the IB Gateway is selected in the connection settings in the Quantower platform.
Check connection settings and Click on the Connect button once you are logged in to IB Gateway
- Wrong Connection Parameters
- Trader Workstation is not running
- 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
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.
3. 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)
Requests for trading permissions and market data subscriptions are submitted through Account Management on the IB website.
If market data is not subscribed, you will see error messages similar to the following:
To subscribe to Market data with IB, please go to the Account Management section. Open the TWS platform and from the main TWS screen by clicking the Account menu at the top of the screen and then selecting Account Management Home.
This will open the Account Management page without requiring that the account username / password be re-entered.
After this is done, restart Trader Workstation platform. Quantower will establish a new connection and you should then receive market data.