Interactive BrokersBroker · Automatic

How to connect Interactive Brokers

Allown reads your IBKR account through Flex Web Service, IBKR's own read-only reports. You set up one report and a token once, paste two codes into Allown, and it keeps your account in sync from then on.

Brings in
Stocks, ETFs, Options, Bonds, Cash
How it connects
Read-only token
Time
About 10 minutes

What you need

  • An Interactive Brokers account you can log in to on the website
  • About 10 minutes
  • Your phone, in case IBKR asks you to confirm the login

Step by step

  1. Open Flex Queries

    1. Performance & Reports
    2. Flex Queries

    Log in to IBKR's website (the Client Portal, not the trading app). In the top menu, open Performance & Reports, then Flex Queries.

    This is where IBKR lets you design reports about your own account.

  2. Create an Activity Flex Query

    1. Activity Flex Query
    2. +

    Find Activity Flex Query and press the + next to it. Name it something you'll recognise, such as Allown.

    A Flex Query is a saved recipe for a report: which parts of your account go into it, and in what form.

  3. Choose the sections

    IBKR lists many sections. Allown needs the ones below. Open each, pick the option shown, tick Select All for its fields and save the section. Extra sections do no harm.

    SettingChoose
    Account InformationSelect All
    Open PositionsSummary
    TradesExecution
    Cash TransactionsDeposits & Withdrawals, Dividends, Payment in Lieu of Dividends, Withholding Tax; Detail
    Cash ReportCurrency level
    TransfersInclude
    Corporate ActionsDetail

    Ticking Select All matters most for ISIN and Listing Exchange: they tell Allown exactly which share you own when two companies share a ticker.

  4. Set delivery and dates

    Under the sections, set how the report is delivered and how dates are written, so the file comes out in a shape Allown reads.

    SettingChoose
    FormatXML
    PeriodLast 365 Calendar Days
    Date FormatyyyyMMdd
    Time FormatHHmmss
    Date/Time Separator; (semi-colon)
  5. Save and note the Query ID

    Press Continue, then Create. The query appears in the list with a number next to its name: the Query ID (for example 987654). Allown uses it to ask for the right report.

  6. Switch on Flex Web Service and copy the token

    1. Flex Web Service Configuration
    2. Generate New Token

    On the same page, open Flex Web Service Configuration (the gear icon). Switch the service on and press Generate New Token. Choose how long it lasts (the longest saves you renewing it) and copy the long number it shows: your Flex token.

    The token only downloads reports. It can't log in, trade or move money.

  7. Paste both into Allown

    In Allown, open the account you want to fill, choose Add connection and pick Interactive Brokers. Paste the Flex token and the Query ID, then press Connect. Allown checks them with IBKR before saving anything.

Why it’s safe

  • Flex Web Service only produces reports. Nothing in it can place an order, change your account or withdraw money.
  • Allown stores the token encrypted and never shows it again, not even to you.
  • You can switch the token off in IBKR at any time, and Allown stops reading at once.

After you connect

The first sync starts right away and usually takes a minute or two: your holdings appear first, then the year of history behind them. After that Allown syncs every few hours on its own.

A query reaches back one year. For older years, run the same query in IBKR with a custom date range, download each year as XML and upload the files on the connection (Upload statements). They slot in without doubling anything.

Questions

Why does the history stop after a year?

Flex Web Service returns at most 365 days per report. Older years come from statement files you upload, as described above.

I have several IBKR accounts under one login. What happens?

One query covers them all. Allown asks which Allown account each one should fill, or keeps them together.

Allown says a section is missing.

Open the query in IBKR, add the section it names, save, and press Sync now in Allown. Nothing needs typing again.

My token stopped working.

Tokens expire after the time you chose. Generate a new one in Flex Web Service Configuration and use Update keys on the connection.

Other integrations

See all of it in one place

Add an account by hand, from a CSV or with a read-only connection. It takes a couple of minutes.

Get started