Interactive Brokers portfolio tracker: return, dividends and tax from a Flex Query

Connect IBKR through a Flex Query, or upload an Activity Statement. hedger works out the return over any period, dividends after withholding tax, sales with the time test and the figures for a Czech tax return.

What you see

Connecting the account

  1. In the IBKR Portal open Performance & Reports → Flex Queries and click + at Activity Flex Query.
  2. Tick the sections Trades (Executions), Cash Transactions, Corporate Actions, Transfers, Grant Activity, Cash Report and Open Positions; “Select All” in each.
  3. Delivery Configuration: Format CSV, Include column headers Yes, Include section code and line descriptor Yes, Include header and trailer records No, Period Last 365 Calendar Days.
  4. General Configuration: Date Format yyyyMMdd, Time Format HHmmss, Date/Time Separator ; (semicolon). Save – the Query ID is next to the query's name.
  5. On the same page, in Flex Web Service Configuration, switch the service on and generate a token. Paste the token and the Query ID in hedger's Settings at the account.

A Flex Query reaches back a year at most. Upload older history once as an Activity Statement – what overlaps isn't counted twice. After that new activity arrives every day on its own.

Or upload a statement

  1. Log in to IBKR Client Portal and open Performance & Reports → Statements.
  2. With several accounts, first Select Accounts and pick all of them. Then Run next to Activity Statement.
  3. Period: custom range (IBKR allows at most 1 year; download older years separately). Format CSV, language English. Download.
  4. For automatic downloads set up a Flex Query in Settings → Accounts.

What we read from it

Questions

A Flex Query or an Activity Statement?

A Flex Query for the ongoing download (every day on its own), an Activity Statement once for history older than a year.

What if the token expires?

The token is valid a year at most. When it expires, hedger tells you in Needs you, and you generate a new one.

I have several accounts at IBKR.

Pick them all in the query – one connection is enough. Accounts not in hedger yet are created, and transfers between them count.

Create a free account · Tax return from Interactive Brokers · Portfolio tracker for Trading 212