To export from Interactive Brokers: Client Portal → Performance & Reports → Flex Queries → create an Activity Flex Query (tick Trades and Cash Transactions, set date format and time zone) → Run with a custom date range and CSV output. One rule to remember: the date picker tops out at 365 days per run (IBKR’s help doesn’t spell it out; import guides such as Sharesight’s do) — multi-year history means one run per year. The upside: you build the query once and reuse it forever.
Every other broker gives you a download button and decides what’s in the file. IBKR hands you a report builder: you choose the sections, the columns, the date format. It’s the most configurable export in this series — you choose sections, fields and formats — and the least discoverable, because nothing about “Flex Queries” says “this is where your CSV lives.” Here’s the recipe.
Key Takeaways
- Export path: Performance & Reports → Flex Queries → Activity Flex Query → Run (custom range, CSV output).
- The cap (per import guides): one run covers at most 365 days — a five-year history is five runs with non-overlapping ranges.
- The sections that matter: Trades and Cash Transactions — dividends, interest, fees, deposits and withdrawals live in the second one.
- Set once, reuse forever: date format and time zone are query settings — fix them at creation and every future run is consistent.
Where is the CSV export in Interactive Brokers?
Behind Flex Queries — a report you define once, then run whenever you need it. The setup, in Client Portal:
- Log in and open Performance & Reports → Flex Queries.
- Click + next to Activity Flex Query and name it (e.g. “Full history”).
- Under Sections, tick Trades (select Executions → Select All fields) and Cash Transactions — that second section carries dividends, interest, fees, deposits and withdrawals.
- In General Configuration, set the date format (e.g. yyyy-MM-dd) and your time zone — do it now, so every run matches.
- Create, then Run: pick Custom Date Range (≤ 365 days), output format CSV, and download.
Name the query once, run it forever: each January, run it for the year just ended and drop the file in that tax year’s folder. For deeper history, run one range per calendar year backwards — the 365-day cap makes year-sized files the natural unit anyway, and they line up neatly with tax records.
The 3 things that trip people up
| Trap | What happens | Fix |
|---|---|---|
| The 365-day cap | Ranges over a year fail or truncate | One run per year, non-overlapping ranges, merge in a spreadsheet |
| Trades-only queries | Dividends, interest and fees missing from the file. | Tick Cash Transactions too — it’s a separate section, easy to skip |
| Ambiguous dates & time zones | Files from different runs disagree on what “03/04” means | Set date format + time zone in the query itself, once, at creation |
What’s in the file — and what to watch
Exactly what you configured — which is the power and the responsibility. A well-built Activity query gives you one row per execution (with symbol, quantity, price, commissions, currency) plus typed cash rows for dividends, interest and fees. Two habits: keep the currency column in view — IBKR accounts are genuinely multi-currency, and mixing USD and GBP rows without noticing is the classic error; and don’t round fractional quantities, they’re your cost basis.
Isn’t my 1099 enough for taxes?
For filing, mostly yes. For proving, no. IBKR’s consolidated 1099 covers what IBKR knows for the year — but wash sales that span brokers, transferred-in basis, and any later IRS questions are yours to substantiate. Your Flex Query files — one per year, kept forever — are that evidence trail.
Using more than one platform? Our free US broker export cheat-sheet covers the export path, format and trap for 8 US platforms on one page. For the walkthroughs: Fidelity (90-day cap), Schwab (silent row limit), E*TRADE (the post-merge XLSX switch) and Robinhood (generate-and-wait).
Keep every year’s export permanently. Broker interfaces and report tools change without notice — your saved files are the record that survives. Avex AI provides software and educational content, not investment or tax advice. Avex AI is not affiliated with or endorsed by Interactive Brokers.
A reusable report definition: you choose the sections (trades, cash transactions, positions…), the fields, the date format, and time zone once — then run it for any period whenever you need a file. It’s Interactive Brokers’ intended route to a clean CSV of your activity.
Because the query only ticked Trades. Dividends, interest, fees, deposits and withdrawals live in the separate Cash Transactions section — add it to the query and re-run.
A Flex Query run covers at most 365 days (a limit import guides such as Sharesight’s document; IBKR’s own help page doesn’t state it), so a five-year history is five runs with non-overlapping custom ranges, merged afterwards in a spreadsheet. Year-sized files also map neatly onto tax years.
They’re the pre-formatted cousin: fixed layout, good as human-readable records. Flex Queries are the configurable version — better when you need consistent columns for a spreadsheet or tracker, and the format you control.
The 1099 covers filing for that broker and that year. Cross-broker wash sales, transferred cost basis and any later IRS questions need your own records — the exports are how you prove your numbers.
Sources & references
- Interactive Brokers — Flex Queries (Account Management guide: creating and running Activity Flex Queries, date range limit)
- IBKR Guides — Client Portal: Flex Queries (sections, TEXT/XML formats, saved queries available for four previous calendar years)
- Sharesight — Importing historical trades from IBKR (third-party guide: 365-day limit per query, one query per calendar year)
- IRS — Topic 409: Capital Gains and Losses
- IRS — Publication 550: Investment Income and Expenses (wash sales)
Last verified: 31 October 2026. The 365-day limit per run comes from third-party import guides; IBKR’s public help pages describe the query builder but don’t state the limit.