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 #742

Closed currenpatel closed 3 months ago

currenpatel commented 3 months ago

Validation Error

Minimal Reproduction

Symbol(s) that it happened for

Error Message

The following result did not validate with schema: #/definitions/QuoteSummaryResult
[
  {
    keyword: 'yahooFinanceType',
    message: "Got {}->null for 'number', did you want 'number | null' ?",
    params: { schema: 'number', data: {} },
    instancePath: '/incomeStatementHistory/incomeStatementHistory/0/totalOtherIncomeExpenseNet',
    schemaPath: '#/definitions/IncomeStatementHistoryElement/properties/totalOtherIncomeExpenseNet/yahooFinanceType',
    data: {}
  },
  {
    keyword: 'yahooFinanceType',
    message: "Got {}->null for 'number', did you want 'number | null' ?",
    params: { schema: 'number', data: {} },
    instancePath: '/incomeStatementHistory/incomeStatementHistory/1/totalOtherIncomeExpenseNet',
    schemaPath: '#/definitions/IncomeStatementHistoryElement/properties/totalOtherIncomeExpenseNet/yahooFinanceType',
    data: {}
  },
  {
    keyword: 'yahooFinanceType',
    message: "Got {}->null for 'number', did you want 'number | null' ?",
    params: { schema: 'number', data: {} },
    instancePath: '/incomeStatementHistory/incomeStatementHistory/2/totalOtherIncomeExpenseNet',
    schemaPath: '#/definitions/IncomeStatementHistoryElement/properties/totalOtherIncomeExpenseNet/yahooFinanceType',
    data: {}
  },
  {
    keyword: 'yahooFinanceType',
    message: "Got {}->null for 'number', did you want 'number | null' ?",
    params: { schema: 'number', data: {} },
    instancePath: '/incomeStatementHistory/incomeStatementHistory/3/totalOtherIncomeExpenseNet',
    schemaPath: '#/definitions/IncomeStatementHistoryElement/properties/totalOtherIncomeExpenseNet/yahooFinanceType',
    data: {}
  }
]

Environment

Browser or Node: Node version (if applicable): Npm version: Browser version (if applicable): Library version (e.g. 1.10.1):

Additional Context

yahooFinance.quoteSummary('AAPL' , { modules: [ 'incomeStatementHistory' ] })

gadicc commented 3 months ago

Hi @currenpatel, this looks like #734 which was fixed in v2.9.1 and released on Feb 5th. Can you confirm what version you're using, and the issue persists with the latest release? Thanks.

currenpatel commented 3 months ago

Thanks that fixed it. I see that financial statement data still does not work though. Is there any update on that? Many Thanks

gadicc commented 3 months ago

Thanks for reporting back, and glad the original issue is working.

Re financial statements, are you talking about https://github.com/gadicc/node-yahoo-finance2/issues/733? Let's track there. I posted a quick update there but in short, no working code yet.