Interactive Brokers
Export trade confirmations from Interactive Brokers and import them into Tradeways.
Interactive Brokers
Import stock, ETF, and broker-marked forex executions from Trade Confirmation Flex Query CSV files. Tradeways combines yearly files before it builds trades. It keeps partial fills separate and uses the Interactive Brokers execution ID to detect duplicates.
Create the Flex Query
- Sign in to the Interactive Brokers Client Portal.
- Open Performance & Reports, then open Flex Queries.
- Create a Trade Confirmation Flex Query.
- Select all available trade confirmation fields.
- Set the date format to
yyyyMMdd. - Set the time format to
HHmmss. - Set the date and time separator to a semicolon.
- Set the output format to CSV.
- Run the query for each available year and download every file.
Keep the original column names. Tradeways accepts extra selected columns.
Upload to Tradeways


- In the Trade Log, click Add Trades, then click File Upload.
- Select Interactive Brokers.
- Select the timezone used by the report. The file does not contain a timezone.
- Select all yearly CSV files in one upload.
- If the files contain several Interactive Brokers accounts, map each one to a Tradeways account. A single source account imports into the current Tradeways account.
- Review each account preview.
- Confirm the import.
One Interactive Brokers file can contain several accounts. Several yearly files can also overlap. Tradeways removes repeated execution IDs before preview. Each included source account needs a different Tradeways destination account.
File Requirements
- Use a Trade Confirmation Flex Query CSV file.
- Tradeways supports
STKrows for stocks and ETFs. - Tradeways imports
CASHrows only when Interactive Brokers marks them as opening or closing forex trades. - Tradeways excludes AutoFX, cash clean-up, and unmarked currency conversion rows from the trade journal.
- Options, futures, bonds, CFDs, crypto, and unknown asset codes are not supported in this import.
- The query must include these fields:
ClientAccountID,CurrencyPrimary,AssetClass,Symbol,Conid,TradeID,OrderID,ExecID,Date/Time,Buy/Sell,Quantity,Price,Commission,CommissionCurrency,Code, andLevelOfDetail. A missing field blocks the file, and the error names the columns that are missing. - Summary rows are skipped.
- An unsupported asset class blocks its source account before any trades are written.
The report timezone applies to every account in the file. Tradeways converts all execution times to UTC before preview.
Tradeways uses the Interactive Brokers contract ID to follow an instrument when its exchange symbol changes. A closing execution blocks its source account when the selected files do not contain the earlier opening execution. Add the earlier yearly file instead of importing the sale as a new short position.
Missing opening history returns you to file selection. The files already selected stay in place. Add the earlier yearly export and Tradeways checks the complete set again. You can remove any selected file before you continue. Account mapping appears only after the selected files pass this check.
Tradeways also blocks a stock execution when the report does not include an opening or closing code. It does not guess whether a sale is a short position. Cancelled executions are removed even when the cancellation appears in another selected file.