Skip to content

How to get Options for specific date in options module #286

Answered by trungisme
trungisme asked this question in Q&A
Discussion options

You must be logged in to vote

Hi!
I managed to resolve this issue by updating the queryOptions instead of the moduleOptions:

import yahooFinance from "yahoo-finance2";
import { show } from "./utils";

show(async () => {
  const queryOptions = { lang: "en-US", formatted: false, region: "US" };
  const result = await yahooFinance.options("AAPL", {
    date: 1631836800
  });
  return result;
});

I found this from here:

"OptionsOptions": {
"type": "object",
"properties": {
"formatted": {
"type": "boolean"
},
"lang": {
"type": "string"
},
"region": {
"type": "string"
},
"date": {
"yaho…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@gadicc
Comment options

@gadicc
Comment options

Answer selected by trungisme
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants