fhqvst / avanza

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

Cannot fetch instrument data #83

Open ludvigbolin opened 1 year ago

ludvigbolin commented 1 year ago

Similarly to how placeOrder stopped working after 221125, getting data with avanza.getInstrument() also stopped working. @dichai1983 solved placeOrder, perhaps a similar fix can be applied to getInstrument, changing constants in constant.js?

dichai1983 commented 1 year ago

Sorry, will test it when I have time...

INSTRUMENT_PATH = '/_api/market-guide/{}/{}'

fhqvst commented 1 year ago

I'm working on v4 of this package with a fresh set of paths, plus a mechanism for reading a .har file and generating paths + TypeScript types from it. Hopefully I'll be able to spend some time on this during the holidays.

dichai1983 commented 1 year ago

I'm working on v4 of this package with a fresh set of paths, plus a mechanism for reading a .har file and generating paths + TypeScript types from it. Hopefully I'll be able to spend some time on this during the holidays.

Tack så mycket! God jul!

ludvigbolin commented 1 year ago

Thanks for the help! It seems that getInstrument() now fetches different information than before. Most importantly in our case, OrderDepthLevel is not found. Any clue where we can find that now instead? Maybe getOrderbook() still have that information, in that case how would I go about changing the ORDERBOOK_PATH to the correct path?

God Jul @dichai1983 & @fhqvst !