You can view my entire project in my github repository:
Trading212 Portfolio
Description
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
Information
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.