How to import from Interactive Brokers

Thank you, Charles for this import filter. Some of my transactions aren’t imported without error message - some wrong. Is there a logfile to check or sth else?

With kind regards

…moved to https://minddumpdotblog.wordpress.com/portfolio-performance/.

TL;TR
In your Interactive Brokers (or LYNX) account, under „Reports“ go into tab „Flex Queries“ (not „Statements“).
Check the bars

  • Cash Transactions
  • Corporate Actions
  • Trades
    …in each internally just „SELECT ALL“ and click [SAVE] at the end.
    Do not change the „General Configuration“ part (like date/time format and separator);
    Click [Continue], [Save Changes] [Ok].

To run it use the (->) icon, maximum period is „Last 365 days“, save as XML (default).

2 Likes

I have just downloaded and installed this program. Then downloaded the Flex. query from IBKR as it is in the forum. When I try to import it, only the stocks/ETFs that have the same currency as the base currency get imported, all the others are crossed out and don’t get imported. If the base currency is EUR, then the non-EUR transactions are not imported, if I set USD as the base currency, all the non-USD transactions are not imported. How can I fix this?

1 Like

Hi, i have the same problem…did you find a solution ?

No, I didn’t find a solution, nor did I get a response, so I can’t use the app, I gave up.
I found Stonksfolio instead. It is still new, some stocks/ETFs are missing, but if someone requests any, it will be added to the database in a day or two. I will see how it works once all my requested stocks and ETFs are added. If it doesn’t work well, there are many other similar apps/websites.
Portfolio Performance just doesn’t work. I don’t know how people with more than one currency can use the IBKR import function.

1 Like

For people who are still struggling, I advise you to create separate deposit accounts. For example, I have IB GBP and IB USD, each linked to separate securities accounts and each in their own currency.

Then, you can import twice the XML and the transactions will import correctly.

Hi palcu, just to make sure I understood correctly, you have one Flex Query in IBKR and you import the resulting XML file twice into PP, one time against the “IB GBP” securities account, the other time against “IB USD” and each time it will just import the transactions in the same (reference) currency as the securities account?

Yes, that’s correct. My setup is that I have an IB XYZ cash account and an IB XYZ securities account for each currency that I trade.

I actually have several currencies USD, EUR, HKD, GBP and CNY. I run the IB flex query for a month and get one XML file. Then, I select my cash account as IB USD and my securities account as the matching IB USD securities account. All the non-USD transactions will be crossed out with a “currency XYZ does not match account currency USD”. But that’s exactly what I expect and I’m easily able to import all my transactions. I do this for each currency and then I’m done.

As the securities accounts do not have a currency attached to them: Would it also be possible to use just one security account and only switch the deposit account once per corresponding currency? The currency is directly linked to the security.

Hello,

I have been using PP for quite a while. I have been tracking my investments in T212 with my custom import templates for CSV, which took me some time to figure out but works like a charm now.

A few weeks ago I opened an account with IBKR, hoping to buy some ETFs, Mutual Funds that were unavailable at T212.

Now came the time to add my portfolio in IBKR to PP, but I am facing an issue with the flex query importer. From what I can see this Flex Query is the best way to export data from the IB platform, but the integrated importer in PP is not correctly reading my Fund trades. I am not getting any errors, I can see my deposits, but the fund trade (that is available in the XML file) is not recognized!

Has someone else had similar issues with mutual funds? Has anyone found a workaround? Or is this a bug I need to submit to PP devs?

Thank you!

Hello @VVarbanov
Please provide a test file here and we can take a look.

Regards Alex

The settings according to this guide helped me.
Check if you have everything set up correctly.

1 Like

Thank you @segi , this is the exact guide I followed! I think I am not missing anything, but you never know!

I will attach a test XML file below. Thank you for the assistance, Alex (@Nirus )!
2023-04-test.xml (4.0 KB)

Hello @VVarbanov
If everything is ok, this should be included in the next release.

Regards
Alex

1 Like

Thank you so much Alex!

Have a great one!

I handle it the same way, but it does not track currency exchanges. How did you solve this for you?

I insert the exchange manually into PP

1 Like

Hi, thank you everyone for this super helpful thread! I imported most of my transactions from IB to PP. only getting error (“java.lang.IllegalArgumentException”) on pursing data from the following:

CashTransaction accountId="U61*****" acctAlias="" model="" currency="USD" fxRateToBase="1" assetCategory="OPT" subCategory="" symbol="SPXW 221202C04140000" description="COMMISS COMPUTED AFTER TRADE REPORTED (SPXW 221202C04140000)" conid="597111688" securityID="" securityIDType="" cusip="" isin="" listingExchange="CBOE" underlyingConid="416904" underlyingSymbol="SPX" underlyingSecurityID="" underlyingListingExchange="" issuer="" multiplier="100" strike="0" expiry="20221202" putCall="C" principalAdjustFactor="" dateTime="20221201;132536" settleDate="20221201" amount="1.84065" type="Commission Adjustments" tradeID="5135991921" code="" transactionID="22509304863" reportDate="20221219" clientReference="" actionID="" levelOfDetail="DETAIL" serialNumber="" deliveryType="" commodityType="" fineness="0.0" weight="0.0 ()"

Can anyone please let me know which parameter is causing this error?

Thank you in advance.

//Nazmul

1 Like

Hello @Nazmul_Hassan
it would be quite cool if you provide us more than just one line from the *.xml.
So a complete one, with please with some transactions and all existing elements.
(FlexQueryResponse , FlexStatements , CashReport, Trades, CashTransactions, InterestAccruals etc).

Also it would be interesting for me to know what should be the result in the transaction.

Regards
Alex

1 Like

Does it still work for you like this? My case currency of IBKR is EUR and I have both USD/EUR activity. I’m trying to import the Activity Flex Query via the IBKR XML importer but all the USD activity (deposit/trades) seem to be converted to EUR in the importer. Selecting USD cash account + securities account in the importer results in the error “Transaction currency EUR does not match account currency USD”

Wondering what your current way of working is.