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

options.snapshotOptionContract and reference.optionsContract are not working, returning empty array. #193

Open
Finalet opened this issue Apr 23, 2024 · 2 comments
Assignees

Comments

@Finalet
Copy link

Finalet commented Apr 23, 2024

The polygon.options.snapshotOptionContract always returns an empty array.

const polygonResults = await polygon.options.snapshotOptionContract('SPY', 'O:SPY240426C00517000');

// {
//   "results": [],
//   "status": "OK",
//   "request_id": "06deb361223937c365ebae0b41320f63",
//   "count": 0,
//   "next_url": null
// }

Expected behavior: polygonResults.results should be an object containing the snapshot of the option (docs)

Running this endpoint on the docs website works fine.

https://api.polygon.io/v3/snapshot/options/SPY/O:SPY240426C00517000?apiKey=API_KEY

// {
//   "results": {
//       "day": {
//           "change": 0.09,
//           "change_percent": 150,
//           ...
@justinpolygon justinpolygon self-assigned this Apr 24, 2024
@justinpolygon
Copy link
Contributor

Thanks for reporting @Finalet. Looking into this now.

@Finalet
Copy link
Author

Finalet commented Apr 28, 2024

Same happens to the polygon.reference.optionsContract endpoint.

const polygonOption = await polygon.reference.optionsContract(`O:AMZN240426C00187500`);

// {
//   "results": [],
//   "status": "OK",
//   "request_id": "9a19fd532fb7b297eb8188c87b4d6529",
//   "count": 0,
//   "next_url": null
// }

Calling the endpoint directly and on the docs website works fine.

https://api.polygon.io/v3/reference/options/contracts/O:AMZN240426C00187500?apiKey=API_KEY

// {
//     "results": {
//         "cfi": "OCASPS",
//         "contract_type": "call",
//         "exercise_style": "american",
//			...

@Finalet Finalet changed the title snapshotOptionContract is not working, returning empty array. options.snapshotOptionContract and reference.optionsContract are not working, returning empty array. Apr 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants