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 “Trade Confirmation 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. “Trades.”
  5. Click on the “Trade Confirmation” button in the “Sections” section.
  6. Check “Select all”, scroll down and save the settings by clicking on “Save” button at the bottom of the modal.
  7. Click on the “Continue” button at the bottom of the page, then the “Create” button on the next page and finally “OK”.
  8. If you have multiple accounts or one of your accounts have been migrated in the past, make sure to select all your accounts.
  9. Click on the right arrow next to the new query to export it.
  10. 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.
  11. 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.
  12. To convert the exported file to a CSV/Excel file, import it to Simple Portfolio.
  13. In the portfolio overview page, scroll down to the trades table and click on the export button to export the trades.