I am trying to incorporate my trading212 portfolio into a wider system and would like to have access to my trading history such that I can keep a record of the market price, prices that I paid, the exchange rate at the time that I made the purchase. The exchange rate being my main stumbling block.
I have written a basic script to read through my contract note emails (I only have the last month or so of these, If I had them all, this wouldn’t be a problem) and the Monthly Statement. The Monthly Statement has the Price and Market Price, but these are mostly in USD instead of GBP. Applying an exchange rate at this point would be inaccurate regardless. What I need really is a deposit/investment total in GBP for each instrument.
I have seen others post things like this link but the data there is just what is shown on the Monthly Statement. I am wondering if there is something like that but for purchase history or anything that would help at all?
I could potentially build a webscraper to pull out the history for each investment, but I would like to avoid this if possible.
Sorry if this is a bit waffly, It’s super late over here right now.
Scrape it. Look at the network calls through your browser when logged in. Look at the ‘orders?’ API call and date parameters… throw them at your browser and pull out the json … works well enough for me…
Im not sure, trying to figure out if i can get a sessionID using requests? There is always selenium of course, I’m just trying to not use that so I learn something new.
I did think I had just blocked my IP or something, but i think my internet is just being tempermental.