How to Import Interactive Brokers Trades into trefolio
Two ways to import your IBKR portfolio: direct API connection or CSV upload. Step-by-step instructions for both methods.
Two Ways to Import from Interactive Brokers
Interactive Brokers is the broker of choice for serious European investors. trefolio supports two import methods: direct API connection (Trefolio) and CSV upload (all tiers). The API method syncs your portfolio automatically; the CSV method works with any IBKR account.
Method 1: IBKR API (Recommended for Trefolio Users)
The API connection lets you sync your portfolio with a single click — no file exports needed.
Setup (One Time)
- Go to the Import page in trefolio and select IBKR API.
- Follow the 3-step wizard to configure your IBKR Client Portal API access.
- Enter your IBKR credentials when prompted to authorize the connection.
- trefolio fetches your positions, trades, and dividends automatically.
Re-Syncing
After the initial setup, return to the Import page and click Re-sync to pull your latest transactions. No re-authorization needed.
Method 2: CSV Upload (All Tiers)
If you prefer not to use the API, or if you're on the Folio tier, you can import via CSV. IBKR supports two CSV formats — both work with trefolio.
Option A: Activity Statement
- Log in to Client Portal at interactivebrokers.com.
- Go to Performance & Reports → Statements.
- Click Activity and set your date range.
- Choose CSV format and click Run.
- Download the file.
Option B: Flex Query (More Control)
- In Client Portal, go to Performance & Reports → Flex Queries.
- Create a new Flex Query or use an existing one. Include at minimum: Trades, Dividends, and Withholding Tax sections.
- Run the query with your desired date range.
- Download as CSV.
Uploading to trefolio
- Go to the Import page in trefolio.
- Select IBKR CSV.
- Drag and drop your Activity Statement or Flex Query CSV.
- Review the parsed transactions and click Import All.
What Gets Imported?
- Stock and ETF trades — buys and sells with exact prices and dates
- Dividends — cash dividends and dividend reinvestments
- Withholding taxes — foreign tax withheld on dividends
- Commissions — IBKR trading fees
- Multi-currency transactions — USD, EUR, GBP, and more
Tips for IBKR Users
- Use the longest date range possible when exporting — trefolio needs your full history for accurate performance metrics (TTWROR, IRR).
- API is the easiest — once set up, syncing takes one click and captures everything automatically.
- Flex Queries give you the most control — useful if you want to include or exclude specific transaction types.
- Duplicate detection is automatic — re-importing the same CSV or re-syncing via API won't create duplicate entries.
After Import
Your IBKR portfolio joins any existing holdings in trefolio. If you also have a DEGIRO or Trading 212 account, import those too — trefolio aggregates everything into a single dashboard with consolidated performance metrics.
Start importing your IBKR portfolio — free for up to 15 holdings.