Interactive Brokers
ShareCalc imports the Interactive Brokers Flex Query XML format. Use Auto-detect, or explicitly select Interactive Brokers Flex Query XML.
Create the Flex Query
- Sign in to Interactive Brokers.
- Open Performance & Reports, then Flex Queries.
- In Activity Flex Query, create a new query.
- Add the following sections and select all available fields in each section:
- Cash Transactions
- Change in Dividend Accruals
- Corporate Actions
- Trades
- Transaction Fees
- Transfers
- In Delivery Configuration, select XML.
- In General Configuration, use:
- Date format:
yyyyMMdd - Time format:
HHmmss - Date/time separator:
; - Breakout by day: No
- Date format:
- Save and run the query for the period you want to import.
- Import the downloaded XML file into ShareCalc.
Other supported date formats include European slash dates (dd/MM/yyyy and dd/MM/yy), but the configuration above is recommended. Do not use a US month-first slash date: an ambiguous value cannot reliably identify which component is the day.
Coverage and Review
The parser covers trades, dividends and interest, withholding tax, deposits and withdrawals, fees, transfers, options, futures, gilts, splits, spin-offs, bond maturities, and other recognised corporate actions.
IBKR activity can be represented by several related XML rows. ShareCalc reconciles cancellations, fees, withholding, option events, and corporate-action legs where the report provides enough linking information. If it cannot do so safely, it skips or partially imports the event and records a message rather than guessing.
Check the import issues particularly for:
- unrecognised corporate actions;
- unmatched option assignment or exercise rows;
- withholding tax or fees that could not be associated with an income or cash transaction;
- accrued-income rows that could not be matched to a gilt trade; and
- cancelled or reversed activity whose related entry falls outside the imported statements.
Cash-settled option activity is not currently supported for the real-world statement shape observed by the project. Enter such activity manually after verifying the option and cash legs.
Avoid overlapping Flex Query periods. Transaction identifiers help reconcile related activity inside an import, but they are not a general guarantee against importing the same activity twice.
Skipped Transactions
The parser only processes the Flex Query sections listed in section 4 above. As a result any transactions outside of those sections are silently skipped. Transactions that can't be processed within those sections are surfaced as a message.