Interactive Brokers
Track your Interactive Brokers account
IBKR gives you everything in a Flex Query — and leaves you to make sense of it. Drop the reports in, or connect once: Miw turns them into your real return, dividends and tax position, and checks the result against IBKR’s own figures.
Import your statementSign in with Google to import. The file is read in your browser; your account keeps the result so every device you sign in on has it.
What you get
- Your real returnTime-weighted, counting dividends, fees and currency moves — not the number on the broker’s front page.
- Dividends, paid and forecastWhat you were paid, what was withheld and in which country, and what the next twelve months look like at today’s rates.
- A tax report already worked outRealized gains by year, FIFO-matched, with dividends and withholding by country. Portugal also gets Anexo G and Anexo J line items.
- Several brokers, one portfolioImport DEGIRO, XTB and Trading 212 together and they merge — the same share held in two places becomes one position.
Or connect Interactive Brokers once
Generate a Flex Web Service token in Client Portal and give Miw the token and your Flex Query ID. Reports are fetched in the background, a year at a time for the history and every few hours after that. A Flex token can only read reports — it cannot trade — and is stored encrypted.
How to export your Interactive Brokers statement
- 1Open Flex QueriesIn Client Portal (web): Performance & Reports → Flex Queries. Under Activity Flex Query, press +.
- 2Choose the sectionsAccount Information, Trades (Executions), Cash Transactions, Corporate Actions, Transfers, Open Positions, Cash Report and Financial Instrument Information — Select All fields in each.
- 3Delivery settingsFormat XML, Include Currency Rates: Yes, date format yyyyMMdd (the default). Save it.
- 4Run one year at a timeRun the query with a custom period of up to 365 days per report, back to when you opened the account, and download each XML.
- 5Drop them all at onceMiw checks the result against IBKR’s own positions and cash, and tells you if anything differs. Or connect by API above and skip the files.
Questions
- Which Interactive Brokers report does Miw need?
- An Activity Flex Query in XML, with the sections listed in the guide below. A query runs at most 365 days, so run it once per year back to when you opened the account and drop all the files in together — overlapping rows are recognised, not counted twice.
- How do I know the import is right?
- The report states IBKR’s own open positions and cash per currency. After every import Miw compares what it built from your transactions with those figures and says so: “every position and cash balance matches”, or exactly which line differs.
- Does it handle options, futures and other currencies?
- Stocks, ETFs and funds are tracked in full, in any currency, with the euro rate IBKR booked. Options, futures, bonds and CFDs are counted and listed as not tracked rather than half-read into the figures.
The Portuguese tax report
If you are taxed in Portugal, the statement you just exported already holds everything the IRS annexes need. Miw arranges it into the lines each one asks for.