brokers
Interactive Brokersflex
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
- Log in to IBKR Account Management
- Go to Settings → Account Settings
- Click Reporting → Flex Queries
- Click "+" or Create to add a new query
- Select Trade Confirmation Flex Query
Configure Your Query
- Under Sections, enable:
- ✅ Trades
- Select ALL available fields (Symbol, DateTime, Quantity, Price, Commission, etc.)
- Set Format to XML (recommended) or CSV
- Set Date Range to last 30-90 days
- Click Save
- Note your Query ID (e.g.,
123456)
Step 2: Generate Your Flex Token
- In Account Management, go to Settings → API
- Find Flex Web Service
- Click "Generate Token"
- 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
- Go to Settings → Accounts
- Click "+ Add Account"
- Select "Connected Broker"
- Choose Interactive Brokers
- Enter your credentials:
- Flex Token: Paste the token from Step 2
- Flex Query ID: Enter the numeric Query ID from Step 1
- Click "Connect & Test"
Step 4: Verify the Connection
After connecting, TradeRonin will:
- ✅ Validate your Flex token
- ✅ Request a report using your Query ID
- ✅ Import your recent trades
- ✅ 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 Type | Supported |
|---|---|
| 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:
- Export a Flex Report from IBKR as CSV
- Create a Manual / CSV Upload account in TradeRonin
- Upload the CSV file directly
Learn about manual CSV uploads →
