This script lets you export your Trading 212 portfolio to a Google sheet.
- The script opens a "nearly" headless chrome (the GUI is shown at execution time).
- Login to Trading 212 and save this device (where 2FA is switched on).
- Read and extract data using css selectors and place into a dataframe.
- Save the dataframe into a Google sheet and close chrome.
- Clone this repository onto your computer.
- Download and install the relevant Chrome WebDriver from here.
- Create a Google sheet and setup a service account for pygsheets.
- Copy sample.config.ini to config.ini and set your options.
- run
python get_portfolio.py