Importing from Interactive Brokers
Profit can automatically download and import your transaction history from Interactive Brokers and resellers such as CapTrader and LYNX.
On macOS, go to File → Import → Interactive Brokers.
On iOS and iPadOS, go to Portfolio → Import → Interactive Brokers.
Choosing the right import method
There are two ways to get your Interactive Brokers transactions into Profit:
-
XML file. Generate an XML report on the Interactive Brokers website and load that file into Profit. Use this option for the initial import of your transactions and whenever you have transactions that occurred more than 365 days ago.
-
Flex Query Web Service. Configure the Flex Query Web Service, which gives apps like Profit programmatic access to your transaction history. This option is typically used to import new transactions periodically.
Most users combine both options: first perform the initial import with XML files (one file per calendar year); then, going forward, periodically import new transactions via the Flex Query Web Service. For both options, you must first create and configure a Flex Query.
Creating a Flex Query
-
Log into your Interactive Brokers account, go to Performance & Reports → Flex Queries, and create a new Activity Flex Query.
-
Provide a name for the Flex Query—for example, Profit. Under Sections, select:
- Cash Transactions
- Sales Tax Details
- Trades
- Transfers
For each pop-up that appears, click Select All, then Save at the bottom of the dialog.
-
Under Delivery Configuration, set the period to Last 365 Calendar Days.
-
Under General Configuration, configure the date and time settings as follows:
- Date Format: yyyy-MM-dd
- Time Format: HH:mm:ss TimeZone
- Date/Time Separator: ; (semicolon)
-
Continue to the next page and click Create.
Performing the initial import
To import your transaction history for the first time, generate XML reports on the Interactive Brokers website using the Flex Query you just created.
-
Under Performance & Reports → Flex Queries, find the Flex Query you created and click Run (arrow icon).
-
In the pop-up that appears, choose Custom Date Range and set the From and To dates to the first calendar year you need. Keep the format set to XML.
-
Click Run and download the generated XML file.
-
In Profit, open the Interactive Brokers import dialog, select the XML file (or use drag-and-drop), and start the import process.
Repeat these steps for every calendar year (you can skip the current year, as it can be imported via the web service).
Configuring the web service
Before Profit can use the Flex Query Web Service, you need to enable it.
-
In your Interactive Brokers account, go to Performance & Reports → Flex Queries. On the right-hand side, under Flex Web Service Configuration, click the gear icon to configure the web service.
-
Copy and save the value for Current Token, then click Save.
-
Return to the list of Flex Queries and click the info icon on the left-hand side of your Flex Query. In the pop-up that appears, copy the value for Query ID.
-
In Profit, open the Interactive Brokers import dialog, choose Web Service, and enter the Token and Query ID you copied. Click Import to load your latest transactions.
Profit remembers the token and Query ID. The next time you open the import dialog for an account, these values are pre-filled, so you can import new transactions immediately.