brokers
Interactive BrokersInteractive Brokers
flex
auto-sync
connection

How to Connect Interactive Brokers Using Flex Reports

Step-by-step guide to connecting your Interactive Brokers account using Flex Web Service for automatic trade syncing.

November 29, 2025
18 views

What You'll Need

  • Active Interactive Brokers account
  • Access to IBKR Account Management portal
  • 5-10 minutes to complete setup

Step 1: Create a Flex Query

  1. Log in to IBKR Account Management
  2. Go to Settings → Account Settings
  3. Click Reporting → Flex Queries
  4. Click "+" or Create to add a new query
  5. Select Trade Confirmation Flex Query

Configure Your Query

  1. Under Sections, enable:
    • ✅ Trades
  2. Select ALL available fields (Symbol, DateTime, Quantity, Price, Commission, etc.)
  3. Set Format to XML (recommended) or CSV
  4. Set Date Range to last 30-90 days
  5. Click Save
  6. Note your Query ID (e.g., 123456)

Step 2: Generate Your Flex Token

  1. In Account Management, go to Settings → API
  2. Find Flex Web Service
  3. Click "Generate Token"
  4. Copy and save this token immediately

⚠️ Important: The token is only shown once. If you lose it, you'll need to generate a new one.


Step 3: Connect in TradeRonin

  1. Go to Settings → Accounts
  2. Click "+ Add Account"
  3. Select "Connected Broker"
  4. Choose Interactive Brokers
  5. Enter your credentials:
    • Flex Token: Paste the token from Step 2
    • Flex Query ID: Enter the numeric Query ID from Step 1
  6. Click "Connect & Test"

Step 4: Verify the Connection

After connecting, TradeRonin will:

  1. ✅ Validate your Flex token
  2. ✅ Request a report using your Query ID
  3. ✅ Import your recent trades
  4. ✅ Display the import summary

Success? You should see your recent trades in the account.


Enable Auto-Sync (Optional)

With auto-sync enabled, TradeRonin will:

  • Sync trades automatically every day
  • Keep your journal up to date
  • Notify you of any sync issues

Toggle Auto-sync in your account settings.


Supported Asset Types

Asset TypeSupported
Stocks✅ Yes
Options✅ Yes
Futures✅ Yes
Forex✅ Yes
Crypto✅ Yes
CFDs✅ Yes

Troubleshooting

"Invalid Flex Token"

  • Ensure you copied the entire token without extra spaces
  • Tokens expire if not used — generate a new one if needed

"Query Not Found"

  • Verify the Query ID is correct (numbers only, e.g., 123456)
  • Ensure the query is saved, not deleted

"No Data Returned"

  • Check that you have trades in the query's date range
  • Ensure the "Trades" section is enabled in your Flex Query

"Permission Denied"

  • Verify Flex Web Service is enabled in your IBKR account
  • Contact IBKR support if the issue persists

Security & Privacy

🔒 Your IBKR password is never stored — we only use Flex tokens

🔐 Tokens are encrypted at rest using AES-256-GCM

🔑 Revoke anytime in IBKR Account Management


Alternative: Manual CSV Upload

Prefer not to connect? You can also:

  1. Export a Flex Report from IBKR as CSV
  2. Create a Manual / CSV Upload account in TradeRonin
  3. Upload the CSV file directly

Learn about manual CSV uploads →


Need Help?

Was this article helpful?

Still need help?

Can't find the answer you're looking for? Reach out to our support team.