What it is
Tessera connects to Interactive Brokers through Flex Queries: either Flex Web Service sync (token + query ID) or a manual Flex Trades CSV upload. Both paths use the same Flex report shape - Trades at Executions level of detail, with timestamps that include a timezone.
Do not upload Client Portal Transaction History CSVs; those lack the execution detail Tessera needs.
What you can do
- Live sync with a Flex Web Service token and Activity Flex Query ID
- Import Flex Trades CSV files for windows outside the live query (about 365 calendar days per query/file)
- Infer the account from `ClientAccountID` in the report (no separate account field on import)
How it works
Choose a method
| Method | Best for |
|---|---|
| Flex sync | Ongoing pulls from a saved Activity Flex Query |
| Flex CSV | Extra years of history (one file per non-overlapping window) |
Growth for IBKR is trading PnL only. See Portfolio growth.
One-time Flex Query setup (sync and CSV)
In IBKR Client Portal:
- Go to Performance & Reports → Flex Queries (or Menu → Reporting → Flex Queries).
- Create an Activity Flex Query (name it something you will recognise, e.g. “Tessera”).
- Under sections, include Trades, and set Level of Detail to Executions (not a coarser rollup).
- Under General Configuration, set:
- Date format: `yyyyMMdd`
- Time format: `HHmmss TimeZone` (timezone on each timestamp is required)
- Date/Time separator: semi-colon (typical Flex default)
- Enable delivery with column headers where the portal offers it.
- Save the query. Note the Flex Query ID (Report ID) from the query info panel.
Official Flex Web Service overview: Enable Flex Web Service · IBKR Campus - Flex Web Service.
Connect with Flex sync
- On the Flex Queries page, open Flex Web Service Configuration (gear).
- Enable Flex Web Service and Generate a token (choose a sensible expiry). Copy the token once - store it securely.
- In Tessera, choose IBKR Flex, paste the Flex token and Flex Query ID, then connect.
- Run Sync. Tessera pulls the statement for that query (typically up to ~365 days of history as configured in the portal).
If sync fails with a timezone error, edit the Flex Query so time format is `HHmmss TimeZone`, re-run the query, and sync again.
Export a Flex Trades CSV
- In Flex Queries, open the same Activity Flex Query (Executions, timezone time format).
- Choose a date range within about one year, format CSV, and Run / download.
- For longer history, export multiple non-overlapping windows (e.g. one file per year).
Import the CSV into Tessera
- Choose IBKR Flex → CSV import.
- Upload the Flex Trades CSV. Account is taken from ClientAccountID in the file.
- Import. Repeat for additional year windows if needed.
If Tessera rejects the file as Transaction History, go back to Flex Queries and export Trades / Executions, not the generic transaction history download.
After connect
- Sync when you want the Flex query refreshed.
- Use CSV imports for periods outside the live query window.
- Same-day trades can lag in Flex reports; wait for IBKR settlement/reporting or re-sync later.
Limitations
- Each Flex query / CSV is limited to roughly 365 calendar days.
- Timestamps must include a timezone label (EST, EDT, UTC, offset, etc.) or Tessera rejects the statement.
- Cash transfers, dividends, and FX conversions are not synced into Tessera’s transfer ledger.
- Portfolio growth is trading PnL only.
- Requires an active subscription.
Resources
- IBKR - Enable Flex Web Service
- IBKR Campus - Flex Web Service
- TradeZella IBKR guides (navigation reference only; Tessera requires HHmmss TimeZone and Executions detail): file upload · sync
