Back to Settings

Interactive Brokers Auto Import Instructions

Part 1: How to get your Token

  1. Log into your IBKR account on their website.
  2. Click on "Performance & Reports" in the top menu, then click "Flex Queries".
  3. Find the box that says "Flex Web Service Configuration" and click the little gear icon next to it.
  4. A popup will appear. Check the box for "Flex web service status". Make sure the Expiry is set to "1-YEAR".
  5. Highlight and copy the long string of numbers where it says "Current token". This is your Token! Click "Save".

Part 2: How to get your Query ID

Step 2.1: Setting up the query

  1. Go back to the main "Flex Queries" page.
  2. Click the '+' button next to "Activity Flex Query" to create a new one.
  3. Name your query something easy to remember, like "My Trading Journal".
  4. Under the "Sections" area, check these three options, with "Select all" checked for all of them:
    • Net Asset Value (NAV) in Base
    • Open Positions
    • Trades > Orders
  5. Under the "Delivery configuration" area, make sure the Output Format is set to "XML".
  6. Change the Period drop-down to "Year to Date" or "Last 365 Calendar Days".
  7. Click "Continue" and then "Create" to save this new query.

Step 2.2: Finding the Query ID number

  1. Go back to the main "Flex Queries" page again.
  2. Find the new query you just created and click the info icon on the left side of it.
  3. On the next screen, look for the number labeled "Query ID". Copy this number. This is your Query ID!

You're all done! Now just paste your Token and your Query ID into the Settings window in the app.