Multi-Broker Integration

IBKR CSV Export: Flex Queries, the 365-Day Cap & the Setup That Lasts (2026)

The most powerful export of any US broker — once you set it up. The Flex Query recipe, the cap, and the settings people miss.

Catalina Dimofte

September 30, 2026

A blueprint beside a laptop illustrating building an IBKR Flex Query once and running it every year
Quick answer

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: a run covers at most 365 days — 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 powerful export in this series — 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: 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:

  1. Log in and open Performance & Reports → Flex Queries.
  2. Click + next to Activity Flex Query and name it (e.g. “Full history”).
  3. Under Sections, tick Trades (select Executions → Select All fields) and Cash Transactions — that second section carries dividends, interest, fees, deposits and withdrawals.
  4. In General Configuration, set the date format (e.g. yyyy-MM-dd) and your time zone — do it now, so every run matches.
  5. Create, then Run: pick Custom Date Range (≤ 365 days), output format CSV, and download.
💡 Pro Tip

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

TrapWhat happensFix
The 365-day capRanges over a year fail or truncateOne run per year, non-overlapping ranges, merge in a spreadsheet
Trades-only queriesDividends, interest and fees silently missingTick Cash Transactions too — it’s a separate section, easy to skip
Ambiguous dates & time zonesFiles from different runs disagree on what “03/04” meansSet 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).

⚠️ Important Note

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.

What is an IBKR Flex Query?

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.

Why is my export missing dividends and fees?

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.

How do I export more than one year from IBKR?

One run per year: each Flex Query run covers at most 365 days, 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.

Are IBKR’s Activity Statements the same thing?

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.

Do I even need exports if IBKR sends me a 1099?

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.

PRIVATE WEALTH COPILOT

One operating view for your wealth

Avex AI helps self-directed investors unify accounts, parse statements, spot concentration risk, and model what to add, trim, or rebalance next. Built for sophisticated retail investors.

Avex AI provides software for portfolio analysis, scenario modeling, and stress-testing. We are not a regulated investment advisor, broker, or financial planner. Nothing in this article constitutes investment advice, a recommendation, or a solicitation to buy or sell any security. Past performance does not guarantee future results. Consult an authorized financial advisor before making investment decisions. Capital at risk. See our full Editorial Standards for details.

Table of Contents