Interactive Brokers

PIT-38 from Interactive Brokers: a sectioned report and dates without separators

IBKR gives the richest report and the most chances to get it wrong. One file holds several separate tables with different headers. Below is exactly what our engine reads.

Where to get the report

  1. In Client Portal open Reports and pick the annual Activity Statement for the whole year.
  2. Format: CSV. PDF will not do — individual trades cannot be read from it.
  3. Alternatively: a Flex Query with Trades, Dividends and Withholding Tax sections.
  4. If you sold something bought earlier, download those years too.

What is inside

Several tables in one file
The Activity Statement is not one sheet but sections — Trades, Dividends, Withholding Tax and others — each with its own header, stacked.
Dates without separators
Written YYYYMMDD, e.g. 20250624. No dashes, no dots.
Comma separates, dot is decimal
The opposite of Polish exports — this is an American report.
TradeMoney already includes commission
Adding commission again overstates the cost.
Commission is always negative
IBCommission carries a minus. Subtracting it “again” moves the result the other way.
Options carry a multiplier
Option contracts have separate columns for multiplier, strike, expiry and type. Without the multiplier the value is understated a hundredfold.

Where it goes wrong

Commission counted twice
The commonest manual mistake with IBKR: TradeMoney already contains it, while IBCommission looks like a separate line to add.
Options without the multiplier
Price times contracts is not the trade value. Without the multiplier the amount is usually a hundred times too small.
The date read as a number
A spreadsheet turns 20250624 into a number and breaks both sorting and the NBP rate lookup.
Sections merged by naive parsing
Opening the file as a plain CSV glues tables with different headers into one — dividends land in trade columns.
Withholding tax in its own section
Withholding Tax is a separate table. Skipping it loses the credit and the tax gets paid twice — once abroad, once in Poland.

What we compute from it

Shares and ETFs — section C/D
FIFO per account, art. 30b ust. 7.
Dividends — section G
With withholding credited up to the treaty limit, art. 30a ust. 9.
PIT/ZG
Foreign income broken down by country, art. 30b ust. 5a and 5b.
Conversion to złoty
NBP rate from the day before income is realised, art. 11a ust. 1.

Run this once

claude mcp add --transport http taxroam https://taxroam.com/mcp --header "Authorization: Bearer $TAXROAM_KEY"

Documentation · How it works · Pricing

Where this export usually goes wrong

US dividends
No W-8BEN, so 30 percent instead of 15
The NBP rate
The trade-date rate
PIT/ZG
The attachment never filed

All Polish tax cases

Questions about IBKR

I have the report as a PDF. Is that enough?

No. Individual trades cannot be read reliably from a PDF, and without them there is no FIFO and no correct rate. The CSV is what is needed.

I traded options. Will you compute those?

Contract v1 accepts shares, ETFs, bonds and crypto. Derivatives not yet — we would rather refuse than compute them wrongly.

A multi-currency account. A problem?

No. The NBP rate is picked per operation, by that operation’s own currency.