gadicc / node-yahoo-finance2

Unofficial API for Yahoo Finance
https://www.npmjs.com/package/yahoo-finance2
MIT License
353 stars 58 forks source link

Failed validation: #/definitions/QuoteSummaryResult: #734

Closed martincsl closed 4 months ago

martincsl commented 4 months ago

Validation Error

Minimal Reproduction

await yahooFinance.quoteSummary('PLTR', { modules: [ "incomeStatementHistory" ] }); ## Symbol(s) that it happened for - JPM - CVX - AAPL ## Error Message "error": "Failed Yahoo Schema validation" ``` ``` ## Environment Browser or Node: Node Node version (if applicable): v16.13.0 Npm version: Browser version (if applicable): Library version (e.g. `1.10.1`): ## Additional Context
martincsl commented 4 months ago

hello friends, do you know if yahoo finance change the structure? This error is happening under the QuoteSummay. Quote seems to working poperly. I've been using wait yahooFinance.quoteSummary('PLTR', { modules: [ "incomeStatementHistory" ] }) for some time with any problem. But now i'm receiving this error message: "error": "Failed Yahoo Schema validation".

Thanks in advance!

gadicc commented 4 months ago

Thanks @martincsl, for reporting.

Yes, Yahoo do occasionally change their output, which is why we need to watch it so carefully, to ensure the library gives a catchable error before returning you a new kind of data structure which can completely break your app / code / db :D

So, thanks for reporting. This has been fixed and will be in the next release. There'll be an automatic message here when that happens.

gadicc commented 4 months ago

:tada: This issue has been resolved in version 2.9.1 :tada:

The release is available on:

Your semantic-release bot :package::rocket: