Interactive Brokers export guide: Activity Statement vs Flex Query
Interactive Brokers offers many export options, and that is what makes exporting confusing. Two of them matter for portfolio tracking, the Activity Statement and the Flex Query. Both produce a complete record of your trades, dividends, taxes withheld and cash movements.
This guide covers when to use which route, what the files contain, and what to verify before you trust anything computed from them.
How to export an Activity Statement
- Go to Performance & Reports, then Statements, then Activity.
- Pick the date range and choose CSV as the format. The default range maxes out at 365 days.
- Run the statement and download the file.
- For a full history, run one statement per calendar year, or set up a Flex Query once for repeat exports (see below).
- Upload the file or files to BullBenchmark. It reads the sectioned format directly.
Do not tidy up the stacked sections in Excel, because that structure is what the parser needs. IBKR white-labels such as Lynx and Mexem export the same format.
Why there are two routes
IBKR grew out of the professional brokerage world, and its reporting shows it. Where a consumer broker gives you one export button, IBKR gives you a reporting suite with statements in several variants, customizable queries, multiple file formats, and settings most retail investors never touch.
Many people give up somewhere in the menus and go back to the app. For the job at hand, rebuilding your full history so that cost basis, time-weighted return and dividend income can be computed, only two routes matter.
The Activity Statement and the Flex Query both produce the same data. The difference between them is convenience and repeatability. Everything else in the reporting menu is either a subset of these two or aimed at tax accountants.
What the Activity Statement contains
The Activity Statement is one file with sections stacked on top of each other: Trades, Dividends, Withholding Tax, Deposits & Withdrawals, and a dozen more. It is the file most portfolio trackers, including BullBenchmark, read directly. The section format looks odd in Excel, but the file is complete, with trades and commissions, dividends and tax, and all cash movements.
One catch is the date range. The default tops out at 365 days, so for your full history you run one statement per calendar year and upload them all, or you use a Flex Query.
The file is several tables sharing one CSV, each section with its own header row. Opened in a spreadsheet it looks disordered, and many people want to clean it up before doing anything with it.
The section structure is what lets a parser tell a trade from a dividend from a fee, and hand-editing it is the fastest way to break a correct file. Download it and upload it as it is.
How to set up a Flex Query
- Go to Performance & Reports, then Flex Queries.
- Create a new Activity Flex Query.
- Tick the sections you need: Trades, Cash Transactions and Dividends.
- Set the date field format and save the query.
From then on an export for any period takes two clicks, and the column layout never changes, so your tracker never breaks on it. If you plan to upload monthly, the five minutes of setup pay off from the second export onward.
The stable column layout is the underrated part. Statement layouts can shift when a broker redesigns its reports. A Flex Query returns the fields you configured, in the order you configured them, every time you run it. For regular bookkeeping, a monthly upload or a quarterly review, that predictability removes a category of errors that show no warning.
Choosing a route
If this is a one-off, because you want to see your full history benchmarked once or you are evaluating a tracker, run Activity Statements per calendar year and you are done in ten minutes. If you intend to keep your numbers current, build the Flex Query now. The setup costs minutes, and every later export takes two clicks.
Either way you end up with the same underlying data: every trade with its commission, every dividend with its withholding, every deposit and withdrawal with its date. Those cash-flow dates are what a time-weighted return is built from, as explained in time-weighted vs money-weighted return.
The multi-currency detail
IBKR reports each trade in its native currency, and your dividends arrive in whatever currency the company pays. A US dividend is in USD, a European ETF may pay in EUR.
Your tracker has to convert everything to your base currency at the historical rate on the date of each event, not today's rate, or your cost basis drifts. BullBenchmark converts at the historical rate.
The drift is worth spelling out. Suppose you bought a US stock two years ago and the dollar has weakened since. Convert that old trade at today's rate and your cost basis in euros looks lower than what you paid, so your gain looks larger than it was.
The error moves with the exchange rate, so your return changes on days you did not trade. Converting at the historical rate pins every event to its own date, and the number stops moving with the exchange rate. There is more on this class of problem in multi-currency portfolio tracking.
What about IBKR-based brokers?
Lynx, Mexem and several other European brokers are white-label IBKR. Their exports are the same format with a different logo. If your broker's platform looks like Trader Workstation, this guide almost certainly applies to you.
That helps if you hold accounts at more than one of them, or migrated from one to another. The files line up, and a tracker that reads one reads them all. Combining an IBKR-format account with a different broker, say a DeGiro account for your ETFs, is also routine, as long as the tool converts currencies and merges the histories.
What to check after exporting
Whichever route you took, give the file a two-minute audit before relying on anything computed from it.
- Confirm the date coverage. If you ran yearly Activity Statements, check that there is no gap between one year's end and the next year's start, and that the earliest file reaches back to your first trade.
- Check that the positions in the Trades section, netted out, match what your account shows today.
- Look for the Dividends and Withholding Tax sections and confirm they are populated for periods when you know you were paid.
- Verify that Deposits & Withdrawals covers every funding event. A missing deposit makes your return look better than it was.
Gaps almost always trace back to the date range or, in a Flex Query, an unticked section. Both are fixed with one new export.
Frequently asked questions
Activity Statement or Flex Query: which does a tracker prefer? Most trackers, including BullBenchmark, read the Activity Statement CSV directly. The Flex Query earns its place through repeatability. It returns the same fields, in the same order, every time you run it.
Why is my history split across several files? The Activity Statement's default range tops out at 365 days. One statement per calendar year, uploaded together, reconstructs the full history.
Do I need to give a tracker my IBKR login? No. The export route hands over data without handing over access. The reasoning is in portfolio tracking without broker login.
My dividends arrive in three currencies. Is that a problem? Only for tools that assume one currency. The file records each payment in its native currency, and correct handling means converting each at the rate on its own payment date rather than at today's rate.
I am at Lynx or Mexem. Does any of this apply? All of it. Lynx and Mexem run on the same platform and produce the same files.
BullBenchmark reads the transaction export from your broker and shows your return next to the S&P 500 and the Nasdaq 100, fed with the same deposits on the same dates, in your own currency. The first two weeks are free and no card is needed.
Related: What we read from an Interactive Brokers file · Multi-currency portfolio tracking · Am I beating the S&P 500?