Trandence

Interactive Brokers (IBKR)

Trandence supports two ways to import your trades from Interactive Brokers (IBKR): Automated Sync via Flex Web Service (recommended) or Manual CSV/TXT File Import.


Option 1: Automated Sync (Flex Web Service)

Automated Flex Web Service sync allows Trandence to fetch your stock and ETF executions in the background without needing to export and upload CSV files each session, and without recurring 2FA prompts.

1. Open Flex Queries in IBKR

  1. Log in to your IBKR Client Portal (such as interactivebrokers.com, interactivebrokers.ie, or interactivebrokers.co.uk).
  2. From the top navigation menu, go to Performance & ReportsFlex Queries.

IBKR Flex Queries Overview and Flex Token Configuration

2. Create an Activity Flex Query

  1. In the Activity Flex Query section, click the + button (item 1 in the screenshot above).
  2. Name your query (e.g., Trandence Sync).
  3. Under Sections, click on Trades and select Execution.
  4. Check the Select All checkbox to include all trade execution fields (Symbol, Date/Time, Quantity, Price, Commission, Currency, etc.).

IBKR Activity Flex Query Trades Configuration

  1. In Delivery Configuration:
    • Set Format to XML.
    • Set Period to Last 30 Calendar Days (or Last 365 Calendar Days).
  2. Click Save Changes / Continue at the bottom of the page.
  3. Back on the Flex Queries overview page, click the (info icon) or edit icon next to your query name to view and copy your Flex Query ID (e.g., 1604659).

3. Copy your Flex Token

  1. In the Flex Web Service Configuration box on the right side of the Flex Queries page, click the ⚙️ (settings icon, item 2 in the screenshot).
  2. Ensure the status is set to Enabled and copy your Flex Token (Current Token).

4. Connect in Trandence

  1. In Trandence, open Broker Sync from the sidebar.
  2. Click Configure IBKR on the Interactive Brokers card.
  3. Paste your Flex Token and Flex Query ID (Account ID is optional, e.g., DUR886847 for Paper Trading or U1234567 for Live).
  4. Click Test & Save Connection.
  5. Once connected, your executions will sync automatically and can be refreshed on demand with Sync Trades.

Troubleshooting & Important Notes

[!NOTE] 5–15 Minutes Activation Delay
When a new Flex Query is created or a token is generated, IBKR’s external API gateways take 5–15 minutes to activate the query. If you see Error (1003): Statement is not available, wait a few minutes and try again.

[!NOTE] End-of-Day Settlement for Today’s Trades
Activity Flex Queries in IBKR are generated following nightly End-of-Day (EOD) batch clearing (typically between 23:00 and 02:00 EST). Today’s intraday executions become available in the automated Flex statement after market settlement.


Option 2: Manual CSV File Export

If you prefer offline file exports, you can generate a custom CSV report from IBKR.

Creating a Flex Query CSV

  1. In your IBKR Client PortalPerformance & ReportsFlex Queries, create an Activity or Trade Confirmation query.
  2. Select Trade Confirmations with all available fields.
  3. Set the format to CSV and save.

Exporting & Uploading to Trandence

  1. Click Run () next to your query on the Flex Queries page.
  2. Select your desired date range (e.g., Last 365 Days) and save the .csv file.
  3. In Trandence, navigate to TradesImport TradesUpload CSV/TXT.
  4. Choose Interactive Brokers, verify your timezone (America/New_York), and select your file.
  5. Review the parsed trades and click Import & Review Summary.

What Trandence Reads

Trandence reads fields such as DataDiscriminator, Symbol, Date/Time, Quantity, T. Price, and Comm/Fee for Stocks and ETFs (STK). Multi-currency trades (e.g., EUR/CAD) are automatically normalized to USD using official historical exchange rates.

Sample file: Download a sample IBKR CSV file


Need Help?

If your connection fails or your file cannot be parsed, contact us at [email protected].

Need Help?

Questions about Interactive Brokers (IBKR)? We answer within one business day.

Contact Support