Import Interactive Brokers options trades
Instead of typing every trade: upload your Interactive Brokers statement as CSV or Flex XML – optionstats.io detects legs, spreads and duplicates automatically.
Why importing is more than a data upload
A broker statement lists every execution separately. For an options journal what matters is which executions belong together – and how they change your cost basis.
- A bull put spread is a put buy and a put sell in the statement – one combination in the journal.
- An assignment creates a share purchase that distorts your return unless it is linked.
- A rollover consists of several executions that form a single position.
- Without duplicate detection, the second import creates double trades.
Three ways to bring your IBKR data in
Which one fits depends on how often you import and whether you use the Flex Web Service.
- CSV import: the activity statement as CSV – fast, but without automatic updates.
- Flex XML: the Flex Query delivers structured data including cash transactions and dividends.
- Auto-sync: the Flex Web Service fetches the data in the background.
- Manual entry: for single trades or accounts without an export.
What happens automatically during the import
The import is not a plain data transfer – it sorts, links and validates.
- Combinations: spreads, strangles and Wheel cycles are built from the legs.
- Adjustment: premiums and fees flow into the cost basis.
- Duplicates: executions that were already imported are detected and skipped.
- Currencies: foreign-currency trades are converted into your base currency.
Typical pitfalls with the IBKR import
Most import problems come from the query, not from the tool.
- Wrong period: a date window that is too short cuts off open positions.
- Missing cash transactions: fees and premiums then disappear from the analysis.
- Importing the same file twice: caught by duplicate detection.
- Multiple accounts: separate portfolios keep them apart cleanly.
Set up the Flex Query in four steps
Configured once, the import runs without manual work.
-
1. Create the Flex Query
Log in to the IBKR Client Portal and create an Activity Flex Query under “Flex Queries”.
-
2. Pick the data fields
Enable trades, cash transactions, dividends and currency conversions – otherwise premiums or fees will be missing.
-
3. Generate a token
Create a Flex Web Service token in the Client Portal and note the query ID and token.
-
4. Store it in optionstats.io
Enter both in the portfolio settings and start the first sync. Further imports run automatically.
Frequently asked questions about the IBKR import
Which broker statements work?
Interactive Brokers as well as CapTrader and Lynx, which use the same statements. Other brokers can be tracked manually.
How often does it sync?
In auto-sync mode regularly in the background; alternatively you can start an import manually at any time.
Are dividends and interest imported?
Yes, as long as they are enabled in the Flex Query – they feed into the cost basis and the statistics.
What happens with duplicate imports?
Executions that already exist are detected and skipped, so your journal stays unambiguous.
Get your first import done in minutes
Create your account, store the Flex Query and review the detected combinations.