Connect Interactive Brokers
A read-only sync that keeps your holdings up to date automatically, once a day, plus on demand. Takes about five minutes, entirely inside IBKR's own Client Portal.
Drift never sees your IBKR username or password. Everything below generates a separate, read-only report token, by IBKR's own design, it can produce a positions report and nothing else. There is no equivalent token for placing a trade or moving money.
- 1
Generate a Flex Web Service token
Log into IBKR's Client Portal at ibkr.com, then open Settings → User Settings → Flex Web Service. Click the edit (pencil) icon, activate it if it isn't already, and set an expiry. IBKR requires one, so pick something generous (a year is typical). Copy the token it shows you immediately; IBKR won't display it again after you navigate away.
ibkr.com → Client PortalSettingsUser SettingsFlex Web Service - 2
Create an Activity Flex Query
Still in Client Portal, open Reports → Flex Queries and create a new Activity Flex Query. Under Sections, check both Open Positions and Trades. Those are the only two sections Drift reads, so nothing else needs to be enabled. Trades is what lets Drift record your actual buy/sell history with real dates instead of estimating your whole position from a single current snapshot; Open Positions alone still works if you skip it, just with less accurate history. Save the query, then note the numeric Query ID shown next to it in your list of queries.
ibkr.com → Client PortalReportsFlex Queries+ New Activity Flex Query - 3
Paste both into Drift
Back in Drift, open Connect IBKR account (the IBKR button next to your portfolio switcher) and paste the token and query ID from the two steps above. Click Connect. Drift makes an immediate first sync to confirm both values actually work before saving the connection.
DriftConnect IBKR accountFlex Web Service tokenQuery ID - 4
Confirm it's working
A successful connection shows "Connected, Flex Query #<id>" and a "Last synced" timestamp with a position count. From here, syncing happens automatically once a day (IBKR only refreshes this report at end of day, so more frequent polling wouldn't see fresher data), or click the refresh icon next to the IBKR button any time for an on-demand sync. See below for how to verify it kept working.
DriftIBKR syncConnected, Flex Query #…Last synced …
How to double-check the sync is actually working
- Right after connecting: the modal shows "Last synced" with a real timestamp and a position count matching what you hold in IBKR. If it instead shows a red error line, that's IBKR's own message (an expired token, an invalid query), specific enough to act on directly.
- Day to day: click the small refresh icon next to the IBKR button any time; it re-syncs immediately rather than waiting for the once-daily automatic run, so you can confirm it's still connected whenever you want without needing to wait.
- On your Holdings table: a position IBKR reports shows up automatically (source "ibkr" internally); editing shares by hand is disabled for it, since IBKR is now the source of truth for that ticker. Closing a position in IBKR removes it here on the next sync.
- If a sync ever stops updating silently, the "Last synced" timestamp itself is the tell: it simply stops advancing, and the error line (if any) explains why.
Still stuck, or something above didn't match what you see in IBKR's Client Portal? Send us a message and mention which step, IBKR's own UI does shift over time, and we'd rather hear about a stale step than have you stuck on it.