HellAmbro / Trading212API

Unofficial Trading212 API
MIT License
59 stars 27 forks source link

Portfolio composition missing average price #18

Closed Adam48521 closed 1 year ago

Adam48521 commented 2 years ago

Hi,

Please could you update the portfolio function to include the (weighted) average purchase price of the share? Currently you can work out the average with the quantity of the shares purchased (y) and the total value invested (x), but x/y does not give you the weighted average purchase price. This data is provided by T212, so hopefully it can be incorporated into your scraping.

portfolio = trading212.get_portfolio_composition()

Thanks, Adam

HellAmbro commented 2 years ago

Hi, I don't want to touch Trading212 response, can you do it on your own?