CoTrader reads your Interactive Brokers trade history through a Flex Query, a read-only report that IBKR generates on a schedule. Setup takes about five minutes, you do it once, and nothing in the process can place a trade. This guide walks through all of it.

CoTrader connects to one broker only, and that is on purpose. IBKR gives us clean, complete fill data: every entry, every exit, every commission, timestamped accurately. Callouts and your Weekly Review are only as good as the data behind them, and a trade history that's "mostly accurate" produces insights that are only "mostly useful." Going deep on one broker beat supporting a dozen at a shallower level.

Read-only, on purpose

CoTrader can see your trade history. It cannot place, modify, or cancel a single order. The Flex Query token you create below pulls one report and nothing else. It carries no trading permission of any kind, so your actual trading keeps happening in IBKR, exactly where it already does.

What you'll need

By the end you'll have two values from IBKR, a Query ID and a Flex Web Service token, pasted into CoTrader.

In IBKR Client Portal

  1. Log in at interactivebrokers.com.
  2. Open Performance & Reports in the top menu, then the Flex Queries tab.
Performance and Reports and the Flex Queries tab marked in IBKR Client Portal
Performance & Reports, then Flex Queries.
  1. In the Activity Flex Query panel, click +. Name the query CT3000 Activity.
  2. Under Sections, tick Trades and Open Positions. These two carry your fills and your current holdings, and CoTrader needs both. Tick Account Information as well so it picks up your account's base currency. Ticking Corporate Actions too does no harm.
  3. Open each section you ticked and click Select All so every field comes through.
Trades, Open Positions, Account Information and Corporate Actions selected in the Sections list
Trades and Open Positions are the ones that matter. Account Information and Corporate Actions are boxed here too.
  1. Under Delivery Configuration, set Format to XML and Period to Last 30 Calendar Days. A longer period makes the sync fail with a message telling you to change it back.
  2. Under General Configuration, leave the date and time formats at their defaults: yyyyMMdd for the date, HHmmss for the time, ; semi-colon as the separator. CoTrader reads timestamps in exactly that shape, so a changed format means trades import with the wrong time or not at all. Save the query.
Format XML and Period Last 30 Calendar Days set on the query
Format XML, Period Last 30 Calendar Days.
  1. Open the saved query's details and copy the Query ID, the number next to the name. That's your first value.
The Query ID on the Activity Flex Query details page
The Query ID, on the query's own details.
  1. Back on the Flex Queries page, click the gear on the Flex Web Service Configuration panel.
  2. Tick Flex Web Service Status, click Save, and copy the token (a long string of digits). That's your second value.
The gear icon on the Flex Web Service Configuration panel
The gear.
The status box ticked and the token on the Flex Web Service page
Tick, Save, copy the token.
Token expiry: IBKR expires the token on the schedule you pick when you enable the service. If it lapses, come back here and generate a new one.

In CoTrader

  1. Open the menu from the top right, then Trading → Manage IBKR connection.
Manage IBKR connection under Trading in the CoTrader menu
The menu, then Manage IBKR connection.
  1. Paste the Flex Web Service Token into the first field and the Query ID into the second.
  2. Click Test first to check them. A working query comes back with Connection works and a count of the trades it found.
  3. Click Connect IBKR to save, then Sync now on the screen that follows. Your last 30 days import there and then.
IBKRNot connected
Flex Web Service Token
123456789012345678901234
Query ID
1234567
Test first Connect IBKR

That's it. You never open this screen again unless the token expires.

How the sync works after that

The Flex Query is a rolling 30-day window. In practice:

The one gap: trades from more than 30 days before you connected. IBKR will not return them through this query, so they stay in IBKR and don't appear in CoTrader.

Recent activity
This week
✓
Synced 4 trades: AAPL, NVDA, CRWV, DUOL
This morning
✓
Synced. No new trades.
Yesterday
✓
Synced 1 trade: TSLA
2 days ago

The sync lands in your activity feed each day. No CSV, no manual entry.

After you're connected

Once that first 30 days is in, the rest of CoTrader starts working straight away. Callouts can scan those trades immediately, and your first Weekly Review already has real numbers behind it instead of a week of waiting. Setup is the only manual step. After that the sync runs by itself, once a day, the first time you open CoTrader.

If a sync doesn't land