How to connect Interactive Brokers
Interactive Brokers connects with a Flex Query and a token. They are for reports only: they cannot trade or withdraw.
Step by step
- At IBKR go to Client Portal → Performance & Reports → Flex Queries and create an Activity Flex Query with the + button.
- Include the sections Account Information, Trades, Cash Transactions, Corporate Actions, Transfers, Open Positions and Cash Report. Format CSV. The period does not matter: Asterholm asks for your full history, year by year.
- In Flex Web Service Configuration turn the service on and generate the Token. Choose the longest validity.
- In Asterholm go to Connect → Connect your brokerage → Interactive Brokers.
- Paste the Token and your query's Query ID, click Test connection and then Save and import.
What you will see
- The first time, your whole history since you opened the account comes in. It can take several minutes: IBKR only allows a few queries per minute.
- After that the connection updates twice a day.
Your buys and sells from today
IBKR delivers trades the next day. To see them the same day, create a second query of type Trade Confirmation:
- In Flex Queries, under Trade Confirmation Flex Query, click + and give it a name.
- Tick the trade fields (or «Select All»), level of detail Execution, format CSV and period Today.
- Copy its Query ID. In Asterholm open your IBKR connection, click Today's trades, paste it and click Test and enable.
Use the same token. Trades arrive every 15 minutes during US market hours and at night the official statement replaces them.
Common problems and questions
- It says «That is the Query ID of your activity query».
- For today's trades you need a separate Trade Confirmation query, with its own Query ID.
- The token expired.
- Generate a new one in Flex Web Service Configuration and paste it into the connection.
- Can I upload the CSV instead of connecting?
- Yes. Run the Flex Query, download the CSV and upload it. One file per year if you want more history.
Related
Updated:
Still stuck? Write to us · See the frequently asked questions
Asterholm is a read-only portfolio viewer. Nothing in this guide is financial advice.