How to Set Up Flex Reports in IBKR for Wheelytics
Step-by-step guide to create two Flex Queries in Interactive Brokers for importing trades into Wheelytics.
1. Create Query ID (Historical activity)
-
Log in to your Interactive Brokers account
-
Navigate to Performance & Reports → Flex Queries → Create New Activity Flex Query
-
Name the query, for example "Wheelytics Activity Report"
-
Under Sections, choose: Trades
-
Make sure Execution is checked
-
Under Field Selection, click Select All or manually include the following required fields:
-
Account Id
-
Trade ID
-
Symbol
-
Underlying Symbol
-
Description
-
Strike
-
Expiry
-
Quantity
-
Trade Price
-
Proceeds
-
Net Cash
-
Trade Date
-
Buy/Sell
-
Put/Call
-
Ib Commission
-
Open Close Indicator
-
Date/Time
-
Under Period, select the range you wish to import — we recommend “Last 365 Calendar Days” for full coverage, but shorter or custom periods are also supported.
-
In the Flex Web Service Configuration, enable: Flex Web Service Status
-
Leave all other settings as default and click Continue, then Create.
This report will be used for both initial import and daily background syncs to capture delayed trades outside regular market hours.
2. Create Trade Confirmation ID (Trade Confirmation Flex Query)
-
Go to Performance & Reports → Flex Queries → Create New Trade Confirmation Flex Query
-
Name the query, for example "Wheelytics Daily Trade Confirmations"
-
Select the following fields:
-
Account Id
-
Trade ID
-
Symbol
-
Underlying Symbol
-
Description
-
Strike
-
Expiry
-
Quantity
-
Price
-
Proceeds
-
Net Cash
-
Trade Date
-
Buy/Sell
-
Put/Call
-
Commission
-
Date/Time
-
The Period is automatically set to: Today
-
In Flex Web Service Configuration, enable: Flex Web Service Status
-
Leave all other settings as default and click Continue, then Create.
This report is used for hourly syncs during market hours to keep your dashboard up to date in near real time.
Where do I enter the Query ID and Token?
Go to the Import page in your Wheelytics account:
-
Token – your current flex token from IBKR
-
Query ID – used for historical import and daily background sync
-
Trade Confirmation ID – used for real-time updates during market hours
Below is the full list of required fields for Wheelytics to process your trades correctly:
| Field | Description |
|---|---|
| Account Id | IBKR account identifier |
| Trade ID | Unique trade identifier |
| Symbol | Option or stock symbol |
| Underlying Symbol | Underlying asset symbol |
| Description | Human-readable description |
| Strike | Option strike price |
| Expiry | Expiration date of the option |
| Quantity | Number of contracts |
| Trade Price / Price | Execution price per contract (depends on report type) |
| Proceeds | Total trade value before commissions |
| Net Cash | Proceeds minus commissions |
| Trade Date | Date of the trade |
| Buy/Sell | BUY or SELL indicator |
| Put/Call | Type of option (PUT or CALL) |
| Ib Commission / Commission | IBKR commission for the trade |
| Open Close Indicator | Indicates if the trade opened or closed a position |
| Date/Time | Full timestamp of the trade |