You can view my entire project in my github repository:
The goal of this project is to get your Trading212 portfolio, calculate your returns and show everything in a graph without having to log in to the trading 212 website. This is achieved by getting the order information from a provided csv and/or the gmail of the user and searching in yahoo finance for the current price of the stock using the ISIN.
Image example of script output
This project is designed for accounts with EURO currency. It converts Usd, GBp, and Nok to euro. You can add more conversions by adding a conversion variable in the yahooInfo function. (dont forget to use it after the “convert everything to euros if necessary” comment)
Place your (order data).csv which you can download from Trading212 (instructions here) and selecting ONLY the orders as included data. You need to name this file as orders and replace my own file.
You can also use your gmail (if it receives the emails from Trading212) in order to automatically update the orders data. Beware my script only gets the data from the “Contract Note Statement from Trading 212” so if you are informed about an order via the “Monthly statement” the code won’t know anything about it.