Back to Blog

IBKR Flex Query Setup: Choose Activity Flex and the Right Fields

Set up an IBKR Flex Query step by step: where to click in Client Portal, why most investors should choose Activity Flex, and which sections and fields matter for accurate portfolio tracking.

Posted by

IBKR Flex Query Setup: Choose Activity Flex and the Right Fields — Trackyourportfol.io

IBKR Flex Query Setup: Quick Answer

For most investors, the right path is Client Portal > Performance & Reports > Flex Queries > create a new query, then choose Activity Flex. That is the Flex type that can combine trades, positions, cash transactions, dividends, taxes, fees, and currency data in one reusable export.

For accurate portfolio tracking, include the sections that capture both holdings and cash flows: trades, positions, cash transactions, dividends, withholding tax, commissions or other fees, and interest if it applies to your account. At field level, keep trade date, settle date, symbol, ISIN when available, currency, quantity, proceeds, cost basis, commission, and net cash.

Save the query once it works and reuse the same configuration each month. Most portfolio tracking errors come from changing the setup, dropping cash-flow sections, or losing currency fields between exports.

  • Click path: Client Portal > Performance & Reports > Flex Queries > create new query
  • Flex type: choose Activity Flex for most portfolio tracking workflows
  • Sections to include: trades, positions, cash transactions, dividends, withholding tax, fees/commissions, and interest if relevant
  • Fields to keep: trade date, settle date, symbol, ISIN, currency, quantity, proceeds, cost basis, commission, and net cash
  • Save for reuse: keep one named query and run it on the same cadence each month

Before You Finalize Your IBKR Flex Query Setup

Once you have the default path above, the next step is to keep the query focused. Most investors do not need every optional section, but they do need consistent coverage of holdings, cash movements, income, taxes, fees, and currencies. Clicking everything creates noisy files without fixing the real problem.

Interactive Brokers documents Flex Queries inside Client Portal reporting, and the official guides make clear that you can choose both the statement type and the exact sections and fields included. That flexibility is powerful, but it also means a bad setup can produce exports that look complete while still being analytically useless.

For portfolio tracking, consistency matters more than maximal detail. Use one date convention, one base currency review process, and one recurring export cadence so your monthly data stays comparable.

  • Default to Activity Flex unless you have a narrow operational need for another report type
  • Use the same date range across brokers if you also track DEGIRO or Trading 212
  • Keep a simple naming convention such as ibkr-flex-2026-03.xml or ibkr-flex-2026-03.csv

How to Access IBKR Flex Query Setup in Client Portal

In Client Portal, go to Performance & Reports and then Flex Queries. In the official IBKR Client Portal guide, Flex Queries are presented as customizable reports that you can create, save, and run repeatedly. If you are using an organization or advisor structure, IBKR also documents Flex inside the Org Portal reporting area, but the setup logic is broadly the same.

The key setup choice is statement type. For most retail investors who want accurate portfolio tracking, the right starting point is Activity Flex. This is the statement family that can include trades, positions, dividends, cash, taxes, fees, and currency fields in one export instead of splitting the workflow across multiple reports.

  • Log into IBKR Client Portal on desktop
  • Open Performance & Reports
  • Click Flex Queries
  • Create a new query rather than editing a legacy one you do not trust
  • Choose Activity Flex unless you have a very narrow operational use case

IBKR Flex Query Setup Fields to Include for Accurate Portfolio Tracking

This is where most of the value is won or lost. A weak IBKR Flex Query setup often includes trades but skips cash movements, or includes positions but not income. That makes it hard to calculate true return, especially when deposits, dividends, taxes, and FX costs are all happening in parallel.

For serious portfolio tracking, include the sections that let you reconstruct the full path from cash in to portfolio value today. In practice, that usually means trades, open positions or position lots, cash transactions, dividends, withholding tax, interest where relevant, and commissions or broker fees.

The unique insight here is that return accuracy usually fails at the cash-flow layer, not the price layer. Investors obsess over whether quantities and ticker symbols are correct, but the bigger error often comes from missing dividend tax, missing FX conversion costs, or deposits and withdrawals that were never captured in the export.

  • Must-have sections: trades, positions, cash transactions, dividends, taxes, fees/commissions
  • Useful fields: trade date, settle date, symbol, ISIN when available, currency, quantity, proceeds, cost basis, commission, net cash
  • If you invest internationally, preserve currency fields instead of flattening everything too early
  • If you use margin or earn interest, include interest accrual or interest detail so net return is not overstated

A Practical IBKR Flex Query Setup for a Multi-Broker Investor

Here is a realistic example. Suppose you hold US stocks and ETFs in IBKR, European ETFs in DEGIRO, and keep part of your cash reserve elsewhere. If your IBKR export only shows positions and market value, you still cannot compare your real net return across brokers because the export is missing the cash-flow detail that explains what happened between two dates.

A better setup is to run one monthly Activity Flex query with trades, cash transactions, dividends, withholding tax, and commissions enabled. Then use the same month-end date range across your other broker exports. That gives you a clean way to compare realized cash flows, recurring fees, and true performance across accounts instead of comparing whatever headline number each broker chooses to show you.

The export itself is only the first mile. The real benefit comes when you review those broker files in one workflow so dividends, fee drag, and cash flows are visible across accounts instead of trapped in separate dashboards.

  • Month-end process: export IBKR Flex + export DEGIRO CSV + reconcile date ranges
  • Check that dividend and tax rows exist before trusting the file
  • If the row count drops sharply versus the prior month, assume the query config changed or a section was omitted

Common IBKR Flex Query Setup Mistakes That Create Bad Data

The biggest mistake is assuming that if a file exports successfully, it is analytically correct. IBKR gives you a lot of flexibility, but that also means you can create a polished-looking report that is useless for performance measurement.

Another common issue is changing field selection or date logic from one month to the next. That breaks consistency and makes trend analysis unreliable. If you want a portfolio system you can trust, treat the query as infrastructure: set it carefully, document it once, and only change it when you know why.

Finally, do not confuse gross performance with investor reality. If taxes, commissions, or FX-related cash effects are absent, the report may still be fine for operational review, but it is not enough for honest return tracking.

  • Selecting too few sections and missing cash flows
  • Using different date ranges across accounts
  • Ignoring currency fields for international portfolios
  • Overwriting a working saved query without documenting what changed
  • Comparing broker dashboard performance numbers instead of normalized export data

How Often to Run Your IBKR Flex Query Setup

For most serious retail investors, monthly is the right default. It is frequent enough to catch fee leakage, dividend activity, and unexpected cash movements, but not so frequent that the process becomes operationally noisy.

Quarterly may be enough if your activity is low, but monthly exports are better if you actively add capital, receive dividends, trade in multiple currencies, or track performance across multiple brokers. The point is not administrative perfection. The point is having a clean, recurring data trail that makes your portfolio measurable.

If you want to reduce manual work, save the query and reuse it. IBKR's official documentation also describes the Flex Web Service for programmatic retrieval, which matters if you eventually want a more automated workflow instead of repeated manual downloads.

  • Monthly: best default for most investors
  • Quarterly: acceptable for low-activity portfolios
  • After major account changes: rerun immediately if you change base settings, permissions, or reporting structure

Official Sources and the Next Step After IBKR Flex Query Setup

If you want to verify the setup path, start with the official IBKR Client Portal Flex Queries guide, the IBKR Campus Client Portal reporting lesson, and the Flex Web Service documentation. Those sources explain where Flex Queries live, how saved queries work, and how the export can be reused or automated.

If you also hold assets at DEGIRO, our DEGIRO export CSV guide is the natural companion piece because it helps you normalize the same workflow across another major retail broker. But once your IBKR export works, the more important move is to stop managing each broker in isolation. Use our guide to building a single consolidated view across brokers so the Flex Query becomes part of a repeatable month-end workflow instead of another disconnected file.

Once the query is stable, it is worth checking whether commissions, withholding tax, and FX-related cash costs are larger than you assumed. Our hidden investment fees calculator is a practical next step if you want to quantify that drag from the data you exported.

After that, separate the measurement problem from the broker-choice problem. If you are using IBKR data to understand real net returns across all accounts, read our guide to real portfolio returns after fees. If you are also questioning whether your current broker mix is cost-efficient, run your scenario through compare broker fees before changing brokers or adding another account.