Auto Import Trades

Auto import trades from Interactive Brokers

blog-post-image

In this post, we will explore how to pair your TradesViz account with Interactive Brokers. This post assumes that you have read the basics about auto importing in TradesViz.

Once you select your trading account and broker as "Interactive brokers" in the trade auto-import page, a popup box will appear when you click on the "Connect account" button.

The purpose of this blog post is to guide you to get these 2 ID's from the IBKR website. Here are the steps you need to follow:

  1. Log into IBKR website: https://www.interactivebrokers.com/sso/Login
  2. Click on the user icon on the top right corner and click on "Settings"
  3. Once you see the account settings page, click on the Flex web service link.

     
  4. In the popup that appears, check the "Flex web service status box and note down the "Curren token" number. This is the token that we are going to fill in the TradesViz popup shown in the first image in this post. After you have noted down the number, click "Save".
  5. Now,  depending on whether you have 'Try new menu enabled', follow (1) or (2) below:
    1. Click on "Performance & Reports" > "Flex queries"


       
    2. Click on "Reports" > "Flex queries"

  6. Next, click on the '+' icon on the right end of the "Activity flex query" title.
  7. On the next page, enter the query name (this can be something like "TradesViz auto import") and in the sections below, select "Trades" and "Option Exercises, Assignments, and Expirations".                    
  8. In the popup that appears for "Trades", make sure "Executions" is ticked and "Select all" is ticked, and then uncheck the following options:
    • Serial Number,
    • Delivery Type
    • Commodity Type
    • Fineness
    • Weight

      Scroll to the bottom and click "Save"
  9. In the popup that appears for "Option Exercises, Assignments and Expirations" click "Select all", scroll to the bottom and click "Save"
  10. Finally, under the "Delivery configuration" section, click on the "Period" dropdown and select "Last 365 days" (for the first sync - if you are just starting out, you can use a lower range. Note: Do not use "Last <PERIOD>" where PERIOD is Quarter, year, month, week - use only days!. Leave all other following options as default and click "Continue".
  11. The next page displays a summary of all the options you've set so far - so just click on "Create" at the bottom right corner of the page. This will successfully create a flex query.
  12. As a final step, go back to the Flex queries tab and click on the pencil icon next to the flex query you just created. This will open a new page with the Query ID. This is the flex query id that we are going to enter in the second box in the TradesViz popup shown in the first image of this blog post.

  13. Now, all we have to do is to get the 2 IDs required to link with TradesViz.

 

Finally, enter the 2 IDs you got from step 4 and step 12 into the box in TradesViz and click "Connect". In a few seconds, you should receive a connection successful message which means the linking was successful. If not, please contact us at [email protected]

Note that flex queries in Interactive Brokers give only read-only access to the information selected in steps 7 and 8. We have no control over your account and cannot access ANY information other than what is given to us from Interactive Brokers. 


Update 3rd Dec 2021:

You can now add a trade confirmation flex query as another additional connection if you want to get sync your trades in near real-time.

What is "near real-time"? So far, we have been using the trade report flex query where we can only get data of your trades AFTER market hours, and sometimes there's even a delay of up to 12 hours even if you try to manually sync your trades. However, with trade confirmation flex query, you can sync your trades manually at the end of the day or a few hours after your trading and you will immediately see your trades populated in your journal. 

Here's how to set up a trade confirmation flex query. The steps are very similar to how you would set up a normal trade report flex query.

 

  1. Click on "Flex queries" in the tabs under the "Report" heading and click on the '+' icon on the right end of the "Trade confirmation flex query" title.
  2. Now enter the query name (example: tradesviz-current-day) and click on "Trade confirmation" under the "Sections" section and make sure "Executions" is selected and click on "Select all" and click "Save" at the bottom of the popup.
  3. Make sure the correct accounts are selected and the rest of the settings are exactly same as in the image below.
  4. Click "Continue" at the bottom of the page and "Create" at the bottom of the next page to complete the creation of your flex query. 
  5. As a final step, go back to the Flex queries tab and click on the pencil icon next to the flex query you just created. This will open a new page with the Query ID. This is the flex query id that we are going to enter in the second box in the TradesViz popup shown in the first image of this blog post.

You can have 1 x Trade report flex query connection + 1 x Trade confirmation flex query if you want immediate trade syncing to TradesViz. Note however that the sync is done for both connections every 24-hrs only. The additional trade confirmation query connection gives you the ability to sync whenever you want to get the trades in your journal immediately. 

 

author-avatar
Published by TradesViz

Related Posts:
blog-post-image
author-avatar
Auto import trades from PropReports
blog-post-image
author-avatar
Auto import trades from FTX (Cryptocurrency)
blog-post-image
author-avatar
Auto import trades from Gemini (Cryptocurrency)