martenmatrix / capital-gains-trading-calculator

Calculate your realized gains from Trading 212 with the FIFO method.
MIT License
2 stars 0 forks source link

TypeError due to Trading212's architectural re-design #10

Open sasesi93 opened 3 months ago

sasesi93 commented 3 months ago

from_2024-02-12_to_2024-08-12_MTcyMzQ2Mzc4MDQ2Nw.csv from_2024-03-01_to_2024-08-09_MTcyMzE4ODMzMzcxOQ.csv

Unfortunately the website says "TypeError: Cannot read properties of undefined (reading 'match')" from either one of the files. I haven't opened nor modified them after exporting.

martenmatrix commented 3 months ago

Hi @sasesi93. I've taken an excerpt from a mail I've written to another user who experienced the same issue:

“I have some bad news. Trading212 completely changed its CSV format. Shares can be purchased in any currency, exchange rates are stated completely differently now, all the actions were renamed, and completely new columns were created.

I have minimal time because I will start an internship the following Monday, and the exams are coming up at the end of next month. Unfortunately, this is more than a simple fix and would require a whole re-design of the application's architecture. I also do not like the code I’ve written anymore, so it probably would be a complete rewrite.

You should also change your broker, as they do not care about their users. They completely redesigned their interface and, assumably, their internal data storage logic; however, they do not want to spend a minute on tax reporting functions.

Thanks again for sharing your data! Marten”

sasesi93 commented 3 months ago

Hey Marten!

Thanks for the reply - good luck on your internship and all the best :)