Interactive Brokers: import a Flex Query
Every plan; Free imports one file a day.
In the Client Portal
Section titled “In the Client Portal”Performance & Reports → Flex Queries, then create one of the two:
- an Activity Flex Query for your history (up to a year per run; IB updates it once a day, after the close), or
- a Trade Confirmation Flex Query for today’s executions (each is in it a few minutes after the fill).
In the query:
- Sections: Trades (in a Trade Confirmation query, Trade Confirmation), with Executions ticked and every field selected. The import needs the account, the asset class, the symbol, the date and time, the quantity, the price and Buy/Sell; it also reads the commission, the order and execution IDs, an option’s underlying, strike, expiry and Put/Call, and the Notes/Codes.
- Corporate Actions (in an Activity query): a stock’s splits, symbol changes and stock dividends.
- Format: XML or CSV. The dates, the times and their separator can stay as IB proposes them; every format IB offers is read.
- Period: the days you want; a file that overlaps an earlier one is fine.
Save the query, Run it and download the file.
In TakeJournal
Section titled “In TakeJournal”Import a file on the Connections or the Accounts page creates a manual account for the file and opens the import; an account that exists imports from its page → Import trades → choose the file. The account keeps the IB account number of its first file, so a later file of another account is not mixed in without asking.

What the import does with the file:
- Stocks under their ticker (
BRK BbecomesBRK.B), in the currency IB names. - Options on stocks named as you would type them in (
AAPL 2026-11-20 200 C), with the multiplier, the strike, the expiry and the right from the file; the same option typed in by hand and imported is one position. - Futures under the journal’s contract (
ESZ6; Eurex’sFDAX DEC 26becomesFDAXZ6) and options on futures on their future (ESZ6 2026-12-18 5900 P). - An expiry, an exercise or an assignment (IB’s codes Ep, Ex and A) ends the option as ending it by hand does; the shares an exercise or an assignment brings are marked as its.
- A stock’s splits, reverse splits, symbol changes and stock dividends from the Corporate Actions (splits); every other corporate action is a row not counted.
- One fill per execution, keyed by IB’s execution ID: the same days imported again, or in the other query, add nothing twice. A cancelled trade and its cancellation are left out.
- Times are read as New York time, as IB writes them, and the report says so.
- Forex, bonds, CFDs and funds are not imported yet: each such row is listed in the report with the reason.
The answer names the format, the fills in the file, the ones added and the ones already known, and lists the rows that could not be read with their line and reason. Reports →
Related
Section titled “Related”Any broker’s export · Import reports · Trades by hand, fills, deleting
The AI answers from our guide: how TakeJournal works, imports, prop accounts, the plans.
Your question goes to Anthropic to be answered. We keep the conversation for 30 days to improve the guide, then delete it. No investment advice. Privacy policy