fhqvst / avanza

A JavaScript client for the unofficial Avanza API
MIT License
228 stars 59 forks source link

getChartData for account #42

Open fschold opened 4 years ago

fschold commented 4 years ago

Is it possible to extend the API with a function that returns chart data for a specific account, so it's possible to display a chart of the change for a given account over time?

fhqvst commented 4 years ago

I don't think the Avanza app supports it, which means there's no endpoint for us to use. You probably have to scrape it from the website.

fschold commented 4 years ago

We'll it's possible to see a chart like that in the Avanza app if you select an account -> details. Shouldn't that data come from their mobile API?

fhqvst commented 4 years ago

Oh, then yeah, it should definitely be possible.

davidsoederberg commented 4 years ago

If you are logged in you can access the performance with this url: https://www.avanza.se/_cqbe/ff/overview/chart/ONE_YEAR

ONE_YEAR can be changed to:

I found this via the website, and you were writing about the app earlier so this might not be helpful. Do you need the endpoints the app uses?

EDIT: This is for the whole portfolio though, do you want the chartdata for a specific, for example, ISK-account?