You don't need a Flex Query or an API key to get your full Interactive Brokers history out. The standard Activity Statement, downloaded as a CSV, has every trade, deposit, dividend and fee, and it takes about a minute.
The short version
Activity Statements are the reports IBKR already prepares for every account. They work for any period, including years older than the 365 days a Flex report covers, and they don't need any setup in Client Portal.
Step by step
- Sign in to IBKR. Use the Client Portal website or the IBKR Mobile app. Both offer statements; the website shows the format options more clearly.
- Open Statements. Go to Performance & Reports, then Statements. In the Default Statements list, choose Activity.
- Pick the period. Choose Yearly for a past year, or a custom range from the day you opened the account to today. Longer periods give a more complete history.
- Choose CSV and download. Set the format to CSV and run the statement. IBKR prepares it in a few seconds and downloads a file named like U1234567_2025.csv.
- Add the file to BasisTrail. In the app, open Interactive Brokers and tap Choose statement file. Pick the file from Files or Downloads. You can add several years at once.
If your account is older than a year, download one statement per year. Overlapping periods are fine: a good importer recognises a trade it has already seen.
What the file contains
The CSV is a stack of sections, one per kind of activity. Each row starts with the section name, so a single file can be read section by section:
- Trades: date and time, symbol, quantity, price, proceeds, commission and realized gain.
- Deposits & Withdrawals: every transfer in and out, which is what separates money you added from money the market made.
- Dividends and Withholding Tax: income and the tax taken at source, on separate rows.
- Open Positions: what you held at the end of the period, with cost basis and value.
- Cash Report and Fees: ending cash and any account fees.
Common questions
Do I need a Flex Query to export my IBKR history?
No. The default Activity Statement already contains trades, deposits and withdrawals, dividends, withholding tax, fees and open positions. A Flex Query is only needed if you want an app to fetch new data automatically every day.
Can I download an IBKR statement on my phone?
Yes. In IBKR Mobile, open the menu, then Reports and Statements, choose Activity, a period and CSV. The file can be saved to the Files app and opened from there.
How far back can I go?
Activity Statements cover the whole life of the account. Live Flex reports stop at 365 days, which is why statement files are the usual way to bring in older years.
Is it safe to share the CSV with an app?
The file holds your account number, positions and transactions, but no password or key and no way to trade. BasisTrail reads it on your iPhone and does not upload the file.
Where BasisTrail fits
BasisTrail reads this file on your iPhone and turns it into one ledger: what you put in, what the price did, what the currency did, and what dividends and fees added or took, in your own currency and matched to the statement. If you later want daily updates without files, you can add a view-only key. It can't trade or move money.