Interactive Brokers Import
Import your trading history from Interactive Brokers into TradeLogist
Interactive Brokers Import
Import your trades directly from Interactive Brokers (IBKR) using their Flex Query reports.
Overview
Interactive Brokers provides detailed trade data through Flex Queries, which TradeLogist can import directly.
Setting Up Flex Query
Step 1: Access Flex Queries
- Log in to IBKR Client Portal
- Go to Reports > Flex Queries
- Or navigate to Performance & Reports > Flex Queries
Step 2: Create New Query
- Click Create or + for new query
- Choose Activity Flex Query
- Name it "TradeLogist Export"
Step 3: Configure Query
Select these sections:
Trades Section:
- Symbol
- Date/Time
- Buy/Sell
- Quantity
- TradePrice
- IBCommission
- Currency
- AssetClass
Optional but recommended:
- AccountId
- Description
- Exchange
- OpenCloseIndicator
Step 4: Set Format
- Format: CSV
- Period: Custom date range or Last 30 days
- Date Format: yyyyMMdd
- Time Format: HHmmss
Step 5: Save and Generate
- Save your query
- Click Run to generate report
- Download the CSV file
Importing to TradeLogist
Step 1: Upload
- Go to Dashboard > Trades > Import
- Select Interactive Brokers
- Upload your Flex Query CSV
Step 2: Review Mapping
TradeLogist auto-maps IBKR columns:
| IBKR Column | Maps To |
|---|---|
| Symbol | Symbol |
| Date/Time | Entry Date/Time |
| Buy/Sell | Direction |
| Quantity | Quantity |
| TradePrice | Entry/Exit Price |
| IBCommission | Fees |
Step 3: Import Options
Configure import settings:
- Currency: Keep original or convert
- Duplicates: Skip, update, or create
- Strategy: Auto-assign or leave blank
Step 4: Preview and Import
- Review the preview
- Check for any warnings
- Click Import
- Confirm completion
Trade Matching
How It Works
IBKR exports individual fills. TradeLogist matches:
- Opening fills (creates new trade)
- Closing fills (closes existing trade)
- Partial fills (updates quantity)
Matching Logic
Example:
Buy 100 AAPL @ 195.50 (opening)
Buy 50 AAPL @ 196.00 (adds to position)
Sell 150 AAPL @ 198.00 (closes position)
Result: One trade with average entry, one exit
Unmatched Trades
If trades don't match:
- Created as open positions
- Review and close manually if needed
- Check for missing fills
Asset Classes
Stocks
Imports directly with:
- Symbol
- Quantity
- Prices
- Commissions
Options
Additional fields:
- Underlying symbol
- Strike price
- Expiration
- Put/Call
Futures
Includes:
- Contract symbol
- Expiration
- Multiplier
Forex
Currency pair handling:
- Base/quote currency
- Pip values
- Lot sizes
Commission Handling
What's Imported
IBKR provides detailed costs:
| Fee Type | Handling |
|---|---|
| Commission | Added to trade |
| SEC Fee | Added to trade |
| Exchange Fee | Added to trade |
| Regulatory | Added to trade |
P/L Calculation
All fees included in P/L:
Net P/L = Gross P/L - Total Fees
Date Range Imports
Initial Import
For first-time import:
- Create query for full history
- May need multiple queries (yearly)
- Import oldest first
- Then newer periods
Regular Updates
For ongoing sync:
- Set up weekly/monthly query
- Import new trades periodically
- TradeLogist handles duplicates
Troubleshooting
Common Issues
"Unrecognized symbol format"
- IBKR uses specific formats
- Check asset class selection
- May need manual mapping
"Missing trades"
- Verify date range covers period
- Check Flex Query sections
- Ensure query ran successfully
"Duplicate trades"
- Enable duplicate detection
- Check import date range
- Review existing trades
Flex Query Errors
Query not generating:
- Check IBKR permissions
- Verify account access
- Try regenerating query
Empty results:
- Check date range
- Verify trades exist for period
- Check account selection
Best Practices
Query Setup
- Create dedicated query for TradeLogist
- Include all relevant fields
- Use consistent date format
- Test with small range first
Regular Imports
- Import weekly or monthly
- Keep consistent schedule
- Review for accuracy
- Handle exceptions promptly
Data Verification
After each import:
- Spot check trade details
- Verify P/L calculations
- Check commission accuracy
- Review any warnings
API Integration
Coming Soon
Direct IBKR API integration:
- Automatic sync
- Real-time updates
- No manual export needed
Stay tuned for updates.
Next Steps
- CSV Import Guide - General import
- Other Brokers - More brokers
- Troubleshooting - Fix issues