Table of contents
BlogPublished June 2, 2026 · 23 min read
Last updated:
IBKR Flex Query for Options Traders: Import Trades Into Your Journal
Step-by-step IBKR Flex Query for options: which fields to include, CSV export, upload to Option Journal, and fixes for missing rolls, assignments, and stock legs.
Interactive Brokers records everything; your brain does not. Flex Query is IBKR’s way to export account activity as a customizable report, often CSV, that you can import into a journal instead of retyping fills.
Option Journal is built around IBKR Flex imports for options and stock activity. The quality of your dashboard depends on the quality of your export: right sections, right date range, consistent formats.
This guide walks through creating a Flex Query for options sellers, exporting, uploading, and reconciling common gaps, with links to journaling and spreadsheet comparisons on this blog.
You will learn Flex Query setup in Client Portal, recommended trade fields for options sellers, import workflow in Option Journal, and troubleshooting tips. Official reference: IBKR Flex Query documentation.
What is an IBKR Flex Query?
A Flex Query is a saved report template in IBKR Client Portal. You choose datasets (trades, corporate actions, etc.), columns, and period, then run or schedule exports. For journaling, most sellers want execution-level trade data with options identifiers (symbol, expiry, strike, put/call).
Why Flex beats manual copy-paste:
- Full history across months or years in one file
- Includes rolls, assignments, and stock legs when configured
- Repeatable: same template each month
- Fewer transcription errors than spreadsheet rows
Step 1: Open Flex Query in Client Portal
High-level navigation (labels may vary slightly by IBKR UI version):
- Log in to IBKR Client Portal
- Go to Performance & Reports → Flex Queries
- Create a new Activity Flex Query (trades / transactions)
- Select account(s) and date range or period template
- Choose output format CSV for upload to Option Journal
If menus differ, search IBKR help for “Flex Query” or use the official Flex guide.
Step 2: Fields options sellers should include
Include enough detail to reconstruct options lifecycle: opens, closes, rolls, assignments, and stock deliveries. Missing put/call or expiry forces guesswork later.
Commonly useful columns (names vary on IBKR):
- Trade date / date/time
- Symbol / underlying
- Asset class (STK vs OPT)
- Put/Call, strike, expiration for options
- Quantity, price, proceeds
- Commission and fees
- Buy/Sell and open/close indicators if available
- Currency
- Trade ID or exec ID for linking legs
For wheel and assignment follow-through, include stock trades tied to the same underlyings. See wheel strategy for why stock legs matter.
The two sections a seller's export must contain
A Flex export for options is not one table but two, stacked in the same CSV with different headers. Miss the second one and your assignments quietly disappear.
| Section 1: Trades | Section 2: Exercises, assignments & expirations | |
|---|---|---|
| What it records | Every fill: opens, closes, rolls | Lifecycle events at expiry: assignment, exercise, expiration |
| Marker column | Open/CloseIndicator | Transaction Type |
| Key columns | TradeID, DateTime, TradeDate, Symbol, UnderlyingSymbol, AssetClass, Put/Call, Strike, Expiry, Multiplier, Quantity, TradePrice, Buy/Sell, IBCommission, CurrencyPrimary | TradeID, Date, Symbol, AssetClass, Put/Call, Strike, Expiry, Multiplier, Quantity, Trade Price, Close Price, CurrencyPrimary |
| Notable gap | : | No UnderlyingSymbol column: only the OCC contract symbol |
Note the commission convention while you are here: IBCommission is signed: negative means you paid IB, which is the normal case. Tools that take the absolute value will overstate your premium on every single trade.
Why your assignments look like expirations
This is the single most common Flex surprise for premium sellers, and it is worth understanding because it silently distorts your statistics.
When a short put is assigned, Section 1 records it as a closing BUY at a price of 0 on the expiry date: indistinguishable, on its own, from an option that expired worthless. Only Section 2 carries the line that says Transaction Type = Assignment. Without that second section, every assignment in your history is filed as an expiration: your assignment rate reads 0%, and the wheel cycle that followed looks disconnected from the put that caused it (options assignment explained).
So when assignments are missing, check in this order:
- Is the exercises/assignments/expirations section enabled in the Flex query at all?
- Does the export actually contain a “Transaction Type” column somewhere below the trades?
- Does the date range cover the expiry date, not just the opening trade?
- Are the OCC symbols intact (e.g. LMND 260821P00055000): that root is what links the event back to your position, since this section has no UnderlyingSymbol?
Step 3: Run export and upload to Option Journal
Typical workflow:
- Run the Flex Query for your desired period
- Download CSV to your computer
- In Option Journal: Imports → upload file
- Wait for processing; review trades and positions screens
- Adjust date format in Settings if dates look wrong

Spreadsheet vs. dedicated journal explains why imports beat manual grids at scale.
Troubleshooting: missing rolls, duplicates, assignments
Common issues and fixes:
- Missing options: widen date range; confirm OPT asset class included
- Rolls look like separate mysteries: ensure open/close or trade IDs present
- Assignment without stock: include stock delivery trades in export
- Duplicate rows: avoid overlapping Flex runs for same period
- Wrong dates: set user date format in app Settings to match CSV
Log manual corrections in the journal when the export is right but one lot needs a human fix. How to roll options helps you name rolls consistently in notes.
Security and hygiene
CSV files contain account activity. Store them locally only as long as needed; use strong login credentials on your journal. Option Journal does not place trades or connect live to IBKR: it processes files you upload.
Conclusion: Flex is the backbone of honest reviews
IBKR Flex Query turns history into data you can filter, chart, and learn from. Spend twenty minutes once on a solid template; save hours every tax season and every monthly review.
Explore Option Journal, read why keep a journal, or browse the blog. Educational only, not affiliated with Interactive Brokers.
Frequently asked questions
- What is an IBKR Flex Query?
A Flex Query is Interactive Brokers' customizable report builder. You select fields and date range, export CSV (or XML), and import trade history, including options legs, assignments, and stock, into external tools.
- Which Flex Query fields do options traders need?
Include symbol, asset class, buy/sell, quantity, trade price, commission, date/time, strike, expiry, put/call, underlying, and trade ID. Missing fields break roll detection and collateral views.
- How often should I export IBKR Flex Query data?
After each import session or weekly during active trading. Consistent exports keep your journal aligned with broker records and catch assignment or corporate action gaps early.
- Why are my IBKR rolls missing in the CSV?
Rolls may appear as separate close/open rows without a parent link. Ensure date range covers both legs and that option-specific fields are enabled. Some tools merge legs by symbol, time, and quantity.
- Can I import IBKR Flex Query into Option Journal?
Yes: upload the CSV export to Option Journal to normalize options and stock legs into a structured book with collateral and expiration views.
- Why don't my assignments show up after importing IBKR data?
Because assignments live in a second section of the Flex export: the exercises, assignments and expirations table with its "Transaction Type" column. In the trades section an assignment looks identical to an expiration (a closing buy at price 0 on the expiry date), so without that section every assignment is filed as an expiration.
- Why is IBCommission negative in my Flex export?
IBKR reports commissions as signed amounts: negative means you paid IB, which is the normal case, and positive means IB credited you. Keep the sign and combine it with the trade direction, taking the absolute value overstates the premium collected on every trade.
From blog to product
Request access to the private beta and we will email you after review.
Request accessRelated articles
How to Run a Monthly Options Trading Review
Key takeaway: A repeatable monthly review for option sellers: which numbers to pull, the metrics that actually matter, how to break results down by ticker and strategy, and the questions to answer each month.
Read moreTrading Psychology for Option Sellers: The Biases That Cost You
Key takeaway: Trading psychology for premium sellers: why a 90% win rate distorts judgement, the traps of revenge trading and sunk cost, discipline in drawdown, and rules that survive stress.
Read moreCovered Call ETFs vs. Selling Your Own Calls
Key takeaway: Covered call ETFs versus selling your own covered calls: how the funds work, what the fees and capped upside really cost, tax and control differences, and who each option actually suits.
Read more