Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with yahoo-finance2 - maybe Yahoo interface changed #500

Closed
goshik123 opened this issue Jun 29, 2022 · 2 comments
Closed

Issue with yahoo-finance2 - maybe Yahoo interface changed #500

goshik123 opened this issue Jun 29, 2022 · 2 comments
Labels

Comments

@goshik123
Copy link

Entire parameters tables are displayed for all symbols. The issue just started today:

The following result did not validate with schema: #/definitions/QuoteSummaryResult
[
{
instancePath: '/summaryDetail',
schemaPath: '#/definitions/SummaryDetail/additionalProperties',
keyword: 'additionalProperties',
params: { additionalProperty: 'coinMarketCapLink' },
message: 'must NOT have additional properties',
data: {
maxAge: 1,
priceHint: 2,
previousClose: 27.22,
open: 27.16,
dayLow: 26.27,
dayHigh: 26.85,
regularMarketPreviousClose: 27.22,
regularMarketOpen: 27.16,
regularMarketDayLow: 26.27,
regularMarketDayHigh: 26.85,
dividendRate: 0.28,
dividendYield: 0.010299999,
exDividendDate: 2022-06-09T00:00:00.000Z,
payoutRatio: 0.059299998,
fiveYearAvgDividendYield: 1.54,
beta: 2.076225,
trailingPE: 5.6122885,
forwardPE: 5.6481876,
volume: 87493,
regularMarketVolume: 87493,
averageVolume: 768338,
averageVolume10days: 791100,
averageDailyVolume10Day: 791100,
bid: 26.52,
ask: 26.58,
bidSize: 800,
askSize: 900,
marketCap: 973176384,
fiftyTwoWeekLow: 17.82,
fiftyTwoWeekHigh: 29.94,
priceToSalesTrailing12Months: 0.338604,
fiftyDayAverage: 25.5338,
twoHundredDayAverage: 23.3798,
trailingAnnualDividendRate: 0.28,
trailingAnnualDividendYield: 0.010286555,
currency: 'USD',
fromCurrency: null,
toCurrency: null,
lastMarket: null,
coinMarketCapLink: null,
algorithm: null,
tradeable: false
}
}
]

This may happen intermittently and you should catch errors appropriately.
However: 1) if this recently started happening on every request for a symbol
that used to work, Yahoo may have changed their API. 2) If this happens on
every request for a symbol you've never used before, but not for other
symbols, you've found an edge-case. Please see if anyone has reported
this previously:

https://github.com/gadicc/node-yahoo-finance2/issues?q=is%3Aissue+Failed%20validation%3A%20%23%2Fdefinitions%2FQuoteSummaryResult

or open a new issue (and mention the symbol):

https://github.com/gadicc/node-yahoo-finance2/issues/new?labels=bug%2C+validation&template=validation.md&title=Failed%20validation%3A%20%23%2Fdefinitions%2FQuoteSummaryResult

For information on how to turn off the above logging or skip these errors,
see https://github.com/gadicc/node-yahoo-finance2/tree/devel/docs/validation.md.

c:\My\Web-development\Stock-monitor\node_modules\yahoo-finance2\dist\cjs\src\lib\validateAndCoerceTypes.js:224
throw new errors_js_1.FailedYahooValidationError("Failed Yahoo Schema validation", {
^

FailedYahooValidationError: Failed Yahoo Schema validation
at validate (c:\My\Web-development\Stock-monitor\node_modules\yahoo-finance2\dist\cjs\src\lib\validateAndCoerceTypes.js:224:15)
at Object. (c:\My\Web-development\Stock-monitor\node_modules\yahoo-finance2\dist\cjs\src\lib\moduleExec.js:90:53)
at Generator.next ()
at fulfilled (c:\My\Web-development\Stock-monitor\node_modules\yahoo-finance2\dist\cjs\src\lib\moduleExec.js:21:58)
at processTicksAndRejections (node:internal/process/task_queues:96:5) {
result: {

@gadicc
Copy link
Owner

gadicc commented Jun 29, 2022

Thanks for reporting, @goshik123! This is fixed, release will be out in a few minutes, and there'll be an automatic message here when that happens.

gadicc pushed a commit that referenced this issue Jun 29, 2022
## [2.3.4](v2.3.3...v2.3.4) (2022-06-29)

### Bug Fixes

* **quoteSummary:** 10-QA; pctChange; coinMarketCapLink (fixes [#500](#500)) ([a1119a8](a1119a8))
* **validation:** 3rd hint help text for "bad" symbols (closes [#465](#465)) ([9e84387](9e84387))
* **validation:** show pkg name and version in help text ([f27b901](f27b901))
@gadicc
Copy link
Owner

gadicc commented Jun 29, 2022

🎉 This issue has been resolved in version 2.3.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants