Auto sync

Auto sync

Auto sync for Interactive Brokers uses the IBKR Flex Web Service. Once set up, journl. can import historical trades for the selected range and continue pulling new trades automatically going forward.

In journl., the API Key field should contain your IBKR Flex Token, and the Query ID field should contain your Activity Flex Query ID.

1. Start the connection in journl.

  1. Open Account center by clicking your profile image and name in the top right corner.
  2. Open the Trading tab.
  3. Select Interactive Brokers as your broker.
  4. Keep this screen open. You will paste your IBKR Flex Token and Activity Flex Query ID here after creating them in IBKR.

2. Generate your Flex Token in IBKR

  1. Log in to the Interactive Brokers Client Portal.
  2. Go to Performance & Reports, then open Flex Queries.
  3. Find Flex Web Service Configuration and open its settings.
  4. Enable the Flex Web Service if it is not already enabled.
  5. Choose a long activation period that fits your workflow.
  6. Click Generate New Token, then save.
  7. Copy the generated token. This is the value you will paste into the API Key field in journl.

IBKR issues the token through the Flex Web Service configuration page. IBKR also notes that Flex Web Service access depends on a token plus one or more query IDs for the reports you want to fetch.

3. Create your Activity Flex Query ID in IBKR

  1. Stay on the Flex Queries page.
  2. Click the + icon next to Activity Flex Query.
  3. Give the query a clear name, for example journlAutoSync.
  4. Under Sections, choose Trades.
  5. Inside Trades, select Executions, then click Select All, then save that section.
  6. For delivery settings, choose CSV and keep column headers enabled.
  7. If you have multiple accounts, select the account you want to sync.
  8. Use these date and time settings:
    • Date format: yyyy-MM-dd
    • Time format: HH:mm:ss
    • Date/Time separator: single space
    • Period: Last 365 Days
  9. Continue, create the query, then reopen it and copy the Activity Flex Query ID.

4. Finish the connection in journl.

  1. Return to Account center in journl.
  2. Paste the Flex Token into the API Key field.
  3. Paste the Activity Flex Query ID into the Query ID field.
  4. Optionally set an expiration date so journl. can remind you before the token or setup needs attention.
  5. Save or connect the broker account.
At this point, journl. will attempt to connect using the values you provided. If the connection succeeds, the selected historical trades can be imported, and future trades can continue syncing automatically. Same day trades may not appear immediately because IBKR activity statement data is generally updated once per day, so a delay of up to about 24 hours can happen depending on broker reporting refresh timing.

Common issues to check

  • Make sure there is at least one day of trading data available in the IBKR account.
  • Make sure the Flex Token was copied correctly.
  • Make sure the Activity Flex Query ID was copied from the correct query.
  • Make sure the date format is yyyy-MM-dd.
  • Make sure the time format is HH:mm:ss.
  • Make sure the date/time separator is a single space.

When to use manual import instead

  • Your broker connection is not supported yet.
  • You only want to import a specific historical range.
  • You prefer working from a CSV export.
  • You want a one time backfill before relying on sync.

If auto sync is not available for your broker yet, use Manual Import as the fallback path.