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

Closed bmacedo closed 1 year ago

bmacedo commented 1 year ago

Validation Error

Minimal Reproduction

Symbol(s) that it happened for

Error Message

The following result did not validate with schema: #/definitions/QuoteSummaryResult
[
  {
    "instancePath": "/topHoldings",
    "schemaPath": "#/required",
    "keyword": "required",
    "params": {
      "missingProperty": "stockPosition"
    },
    "message": "must have required property 'stockPosition'",
    "data": {
      "maxAge": 1,
      "holdings": [],
      "equityHoldings": {
        "priceToEarnings": 0,
        "priceToBook": 0,
        "priceToSales": 0,
        "priceToCashflow": 0
      },
      "bondHoldings": {},
      "bondRatings": [],
      "sectorWeightings": []
    }
  },
  {
    "instancePath": "/topHoldings",
    "schemaPath": "#/required",
    "keyword": "required",
    "params": {
      "missingProperty": "bondPosition"
    },
    "message": "must have required property 'bondPosition'",
    "data": {
      "maxAge": 1,
      "holdings": [],
      "equityHoldings": {
        "priceToEarnings": 0,
        "priceToBook": 0,
        "priceToSales": 0,
        "priceToCashflow": 0
      },
      "bondHoldings": {},
      "bondRatings": [],
      "sectorWeightings": []
    }
  }
]

Environment

Browser or Node: node Node version (if applicable): Npm version: Browser verion (if applicable): Library version (e.g. 1.10.1): yahoo-finance2 v2.4.2

Additional Context

Issue reproducible when importing transactions on ghostfolio with this particular ticker

dtslvr commented 1 year ago

This looks like a duplicate of #639.

gadicc commented 1 year ago

Right you are, thanks, @dtslvr.

And thanks @bmacedo for reporting.

Fixed in the original issue above.