How to export your trades from Interactive Brokers

To export your trades from Interactive Brokers (IBRK):

  1. Sign in to the Client Portal.
  2. Click the “Performance & Reports” dropdown menu and then click on “Flex Queries”.
  3. In the “Activity Flex Query” section, click on the “+” (plus) sign to create a new query.
  4. Fill in a name of the query. It can be anything, e.g. “Export.”
  5. In the “Sections” section, click on “Cash Transactions”.
  6. Check “Select All” at the top, scroll down and save the settings by clicking on “Save” button at the bottom of the modal.
  7. Repeat the previous two steps for all the following sections:
    1. Corporate Actions
    2. Financial Instrument Information
    3. Incoming/Outgoing Trade Transfers
    4. Option Exercises, Assignments and Expirations
    5. Trades
    6. Transaction Fees
    7. Transfers
  8. In the “General Configuration” section, make sure that the date format is set to “yyyyMMdd”, time format to “HHmmss”, date/time separator to “;” (semicolon).
  9. Click on the “Continue” button at the bottom of the page, then the “Create” button on the next page and finally “OK”.
  10. If you have multiple accounts or one of your accounts have been migrated in the past, make sure to select all your accounts.
  11. Click on the right arrow next to the new query to export it.
  12. Select your desired period, e.g. last 365 calendar days or custom date range, keep the XML format and click on “Run” to export the trades.
  13. It allows you to export only one year at a time so if your portfolio is older, you will have to run the export for each year (with custom date range) separately.
  14. To convert the exported file to a CSV/Excel file, import it to Simple Portfolio.
  15. In the portfolio overview page, scroll down to the trades table and click on the export button to export the trades.