Skip to main content
All posts

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.

6 min read
Share

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)

  1. Go to the Import page in trefolio and select IBKR API.
  2. Follow the 3-step wizard to configure your IBKR Client Portal API access.
  3. Enter your IBKR credentials when prompted to authorize the connection.
  4. 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

  1. Log in to Client Portal at interactivebrokers.com.
  2. Go to Performance & ReportsStatements.
  3. Click Activity and set your date range.
  4. Choose CSV format and click Run.
  5. Download the file.

Option B: Flex Query (More Control)

  1. In Client Portal, go to Performance & ReportsFlex Queries.
  2. Create a new Flex Query or use an existing one. Include at minimum: Trades, Dividends, and Withholding Tax sections.
  3. Run the query with your desired date range.
  4. Download as CSV.

Uploading to trefolio

  1. Go to the Import page in trefolio.
  2. Select IBKR CSV.
  3. Drag and drop your Activity Statement or Flex Query CSV.
  4. 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.