Interactive Brokers
How to export an Activity Flex Query in XML format
1Create the Flex Query
Log in to Client Portal at Interactive Brokers.
- 1.Go to Performance & Reports.
- 2.Click Flex Queries.
- 3.If you have more than one account, select the account whose statement you want to create. Each account needs its own Flex Query. If you have only one account, continue with point 4.
- 4.In the Activity Flex Query part, click the + icon ("Create").
Swipe the screenshot to the side, or tap it to make it larger.
2Enter the name and enable the required sections
A form opens, in which you enter the data. In the Sections part, enable exactly these 9 sections.
- 1.Enter the Query Name, for example "Taxify - export".
- 2.Click the name of a section. A window with its settings opens. For each section, do as its description below says.
- 3.If the window has an Options part, tick in it only what the description of the section below says.
- 4.Tick Select All. This selects all fields of the section.
- 5.Click Save.
Swipe the screenshot to the side, or tap it to make it larger.
Account Information
The data of the account. Taxify reads only the days on which the account opened, got its first money and closed, so that it does not ask IBKR for days on which the account did not exist. It does not need the name, the address or other personal data.
- Fields: tick these 3 dates: Date Opened, Date Funded and Date Closed. You can also tick Select All.

Transfers
Moves of positions and cash between IB accounts, for example when you changed your account. The option Lot adds the original purchases of each position that moved, with their dates and prices – Taxify uses them for the cost and for the time test.
- Options: tick Transfer and Lot.
- Fields: tick Select All.

3Check the settings
Set these values in Delivery Configuration and General Configuration. Most of them are correct by default. Then save the Flex Query.
- Format
- XML
- Date Format
- yyyyMMdd
- Time Format
- HHmmss
- Date/Time Separator
- ; (semi-colon)
- Profit and Loss
- Default
- Include Offsetting Trade/Cancel Pairs?
- No
- Include Currency Rates?
- No
- Include Audit Trail Fields?
- No
- Display Account Alias in Place of Account ID?
- No
- Breakout by Day?
- No
Swipe the screenshot to the side, or tap it to make it larger.
4Run the Flex Query
- 1.Go to Performance & Reports. If you have more than one account, first select the account whose statement you want to download.
- 2.Click the Flex Queries tab.
- 3.In the Activity Flex Query part, find the query that you created, "Taxify - export".
- 4.Click the arrow (Run) on the right.
Swipe the screenshot to the side, or tap it to make it larger.
5Set the period and download the statement
- 1.In the Period field, select Custom Date Range. In "From Date", enter 1 January of the year (or the date when you opened the account). In "To Date", enter 31 December of the same year.
- 2.Keep XML in "Format".
- 3.Click Run. Save the XML file. Do this again for each year of the account – one file for each year.

6Upload the statement to Taxify
- 1.In Taxify, open Accounts and select your broker account. If you do not have one yet, create it.
- 2.On the Import trades tab, drop the files into the marked area or select them with the button. Upload every year.
- 3.When the processing is complete, you see the imported trades and you can start the tax calculation.
Tips
- Periods that overlap are not a problem: Taxify finds duplicate trades and skips them.
- If a sell has no matching buy, import the earlier years.
- Taxify reads only a Flex Query in XML format. It does not support an Activity Statement in CSV yet.
- You can enter trades from platforms that Taxify does not import yet by hand, in the account detail.










