Setting up Flex Query

Securely connect your Interactive Brokers account using read-only reports. No trading access required.

1

Log in to IBKR

Go to interactivebrokers.com and log in to "Account Management".

2

Navigate to Flex Queries

In the menu, go to Performance & ReportsFlex Queries.

3

Create a New Query

Click the + icon next to "Activity Flex Query". Give it a name like "Personal Finance AI".

Select these sections:

  • Account Information
  • Cash Report
  • Open Positions
  • Trades
4

Generate Token

Save the query. Then go back to Flex Queries settings and ensure "Flex Web Service" is enabled to get your Token and Query ID.

🔒

Safe & Read-Only

Flex Queries are strictly read-only types of data exports. We cannot execute trades, withdraw funds, or change settings. Your primary login credentials remain private.