Web service import

<< Click to Display Table of Contents >>

Navigation:  Import > Interactive Brokers >

Web service import

If you are done with the creation of the Flex Queries read on or go to the Create Flex Queries chapter.


After creation of Flex Queries you have three ID-s:

1.   Activity Flex of the last 30 days ID

2.   Activity Flex of the last 365 days ID

3.   Trade Confirms Flex ID


These three IDs define the queries but you need one more ID called Token which is a access token to the queries.


Creating web service Token and enabling statements.


Log on to the Interactive Brokers Account Management.


Go to Settings -> Account Settings -> Reporting -> Flex Web Service and click on the configure (gear) icon. You can find the box on the right side.


If the Flex Web Service is not enabled click the toggle button to enable it.


A new token will appear to initiate Flex Query Requests.


Click Generate A New Token to invalidate the prior token. Select the longest period as expiration which is currently one year.


Please note that after expiration you have to generate a new token.


Token is ready. Now you have four ID-s


1.   Activity Flex for the last 30 days ID

2.   Activity Flex for the last 365 days ID

3.   Trade Confirms Flex ID

4.   Token.


Click on the Import/Select Import Module Menu. The Import module selector window appears. Select Interactive Brokers Web Service importer.


Please click on the settings button. The following form will be shown:





Fill in the form with the previously created ID-s.


Add order type as a tag - if this check box is ticked the order type of the trade will be added as a tag. Currently two order types are reported by the Interactive Brokers: limit and market.


Add order reference as tag - if this check box is ticked the order reference will be added as tag. Please note the order reference is added to the Trade Confirms flex statements by Interactive Brokers.


Debug mode - The received xml statements will be saved in the TradingDiaryPro/Debug directory.


Save the settings and then click on the Import Statement button. All your data will be inserted into the database.