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

Historical API to get dividends event throwing validation errors #557

Closed
zenwraight opened this issue Nov 13, 2022 · 5 comments
Closed

Historical API to get dividends event throwing validation errors #557

zenwraight opened this issue Nov 13, 2022 · 5 comments
Labels
bug Something isn't working released

Comments

@zenwraight
Copy link

Bug Report

Describe the bug

I am trying to hit Historical API await yahooFinance.historical(query, queryOptions, moduleOptions); for dividends but I get validation errors.

Minimal Reproduction

Code looks like

      const query = job.data.symbol;
      const queryOptions = { period1: '2021-02-01', events: 'dividends' };
      const result = await yahooFinance.historical(query, queryOptions);

The error thrown is:-

{
  "instancePath": "/7",
  "schemaPath": "#/definitions/HistoricalRow/required",
  "keyword": "required",
  "params": {
  "missingProperty": "high"
  },
  "message": "must have required property 'high'",
  "data": {
  "date": "2022-11-04T00:00:00.000Z",
  "dividends": 0.23
  }
},

Need help fix the validation for this particular event.

Environment

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

Additional Context

@zenwraight zenwraight added the bug Something isn't working label Nov 13, 2022
@gadicc gadicc closed this as completed in 1586496 Nov 14, 2022
@gadicc
Copy link
Owner

gadicc commented Nov 14, 2022

Thanks for reporting, @zenwraight. I believe this is fixed now, but I'll leave the issue open until you can confirm. CI is running now and a new release will be out soon. An automated message will appear when when that happens, with the new version.

@gadicc gadicc reopened this Nov 14, 2022
@gadicc gadicc closed this as completed in e83ede6 Nov 14, 2022
gadicc pushed a commit that referenced this issue Nov 14, 2022
## [2.3.7](v2.3.6...v2.3.7) (2022-11-14)

### Bug Fixes

* **historical:** validation for events {dividends,split} (fixes [#557](#557)) ([e83ede6](e83ede6))
@gadicc gadicc reopened this Nov 14, 2022
@gadicc
Copy link
Owner

gadicc commented Nov 14, 2022

🎉 This issue has been resolved in version 2.3.7 🎉

The release is available on:

Your semantic-release bot 📦🚀

@zenwraight
Copy link
Author

Thanks a lot, @gadicc, for resolving the issue; I will quickly update my dependency to latest version and look into it. I will close this issue for now.

Thanks a lot for a prompt response.

@gadicc
Copy link
Owner

gadicc commented Nov 15, 2022

🙏

@gadicc
Copy link
Owner

gadicc commented Nov 16, 2022

🎉 This issue has been resolved in version 2.3.8 🎉

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
bug Something isn't working released
Projects
None yet
Development

No branches or pull requests

2 participants