Getting Started with Interactive Brokers Data Provider
Last updated
Last updated
In order to connect the TSLab program to Interactive Brokers, you need to install the Trader Workstation (TWS) terminal or IB Gateway on the computer where the TSLab program will be installed.
Enter the Cabinet on the TSLab website.
In the Shop section, find the Interactive Brokers data provider. To select a data provider, click the Details button.
Note! When placing an order, you must provide your Interactive Brokers account number. The account number can be found in the TWS terminal. The number has the following notation format:
D0000000 - for real account
DU0000000 - for demo account
Complete the Interactive Brokers data provider subscription form.
Enter your Interactive Brokers account number.
Specify the key expiration date for the data provider.
Confirm the User Agreement.
Click on the Purchase button. Complete the license process by paying the invoice.
After the license registration process is completed, an email with a license key will be sent to your email address. Also, the key can be found in the Contracts section. In order to get detailed information about the contract, click on the button with three dots in the line with the contract.
The window that opens provides detailed information about the contract, including the expiration date, account number, and key for the data provider.
Note! The generated key is only suitable for the specified account number. If you want to use the Interactive Brokers Data Provider for another brokerage account, you will need to create a new key.
Download and install the TSLab trading platform. You can download the latest version of the program by clicking on the link:
Launch the TSLab program. To connect to Interactive Brokers, you must set up a data provider. In the main menu of the program, select the menu item Data -> Data Providers.
In the Data Providers window that opens, click the Add button. Select provider category Online data. Press Next.
Next, in the list of providers, you need to find and select Interactive Brokers. Enter the name of the provider, which will later be displayed in the "Data Providers" window. Press Next.
In the data provider settings window that opens, enter the IB user account number.
The user account is displayed:
For the IB Gateway terminal - in the Settings window of the IB Gateway terminal.
For the TWS terminal - in the title bar of the main window of the TWS terminal
After setting up the Interactive Brokers data provider, click the Next button.
Contracts Manager
Allows you to add and remove securities (contracts).
Account
Interactive Brokers client account.
Alternative provider
Alternative data provider.
API ID
The unique API ID of the program by which the Interactive Brokers client interacts with the TWS terminal. The API ID is set by the client.
Host
The IP address of the computer running TWS.
Port
Port number.
Use local time
Allows you to output data in the local time zone, UTC is used by default.
Orders outside RTH
Activates the placement and execution of orders outside the exchange session
Use SMART always
Enables the use of the SMART site.
Use limit orders instead of market
Disables the use of the "Order by Market" broker. Activates a Limit order at the last known price +- 4%
Percentage of limit price increase
Percentage increase in price for an order when limit orders are used instead of market orders
Load trades for (max) days
Download missed ticks for N days
Load trades
Load trades when connected. If disabled, it will not load ticks.
Orders blocking timeout (sec.)
Blocks the submission of requests for a set time interval after establishing a connection with the data provider.
Cache settings
Sets the period for storing information about your transactions and orders, the following options are available:
executed order cache period;
cancelled order cache period;
trade cache period.
Offline orders/ Trades visibility
Activates the ability to see your deals and orders offline. Changing this parameter requires restarting the program.
Next, you need to enter the license key for the created data provider. Select the Interactive Brokers provider and click the Key button. In the Registration Key window, enter the key sent to you by mail (or copy the key from your TSLab personal account). Click on the OK button.
If the key is entered correctly, then in the Comment column the license validity period will be displayed, and in the Operation column, the button to connect to the exchange will become available to you.
Attention!
Before connecting to the Interactive Brokers data provider, you need to set up Trader Workstation (TWS) and IB Gateway terminals
Check the work of the supplier by clicking on the button in the Operation column. The program will inform you about the connection status in the Data Provider window and in the status bar:
red color of the button means an error in establishing connection,
yellow color means that the connection is in progress,
green color means that connections have been established and you can carry out trading operations.
Check the box in the Status bar column to activate the slider button in the Status bar. The color of the slider button in the Status bar also informs you about the connection status.
Using the Schedule manager menu, you can configure the automatic start of the data provider on the day and time you specify.
Note. To start the data provider automatically, the TSLab application must be running.
To configure the automatic start of the provider, click on the button with three dots in the Schedule manager column.
In the Edit Schedule window that opens, fill in the data for the provider's automatic launch schedule. Click on the OK button
To start the created schedule, in the Providers window, move the Schedule manager slider to the extreme right position. In this case, manual control of the launch of the data provider will be blocked.