How to import from Interactive Brokers

Here is a how-to for the IB Importer. I would be grateful for any corrections:

Also If there is a better place to host this information let me know.


Thank you, my friend. Have you also discovered a way to import dividends? Maybe you describe your proceeding briefly here, in case your blog is not available;)

Dividends can be imported. Dividends from IB are exported as “Cash Transaction” entries.

You can open the flex statement XML in a text editor and search for “<CashTransaction” to verify that IB exported this data correctly. The attributes for each element must include:


If you have complete information from IB and are still not seeing dividends after the import then there is a bug to report.

1 Like

Ok, thanks for the explanation. The export works fine. Unfortunately, all transactions are crossed out inside the import process an marked with a red X without any explanation.

Ok, I will look at the code. There are several sanity checks that I have not really looked at. But possibly one of them is rejecting your data.
Can you just paste some lines from the data you are importing - that might give me ideas.

Right click on a crossed out transaction -> there should be an explanation

I assume there is a problem with the currency of the account in PP and the currency of the IB transactions.
Did you export your account information from IB?

1 Like


sorry, forget to answer. Yes, it’s an export from IB. Actual the error says (in German) sth. like: booking currency USD is not valid for account currency EUR.

My account currency is EUR and the dividend is paid in USD. I think I exported the currency conversion. Any other advice than changing the account currency?

edit: I could edit the XML in excel and change the currency text from USD to EUR and do a currency conversion from 10 EUR to 12,4 USD (e.g.)
edit2: the row for “Withholding Tax” is automatically calculated (I would say with the value fxRateToBase) from USD to EUR during the import. Why doesn’t this work for dividends?

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

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).


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.