client-js icon indicating copy to clipboard operation
client-js copied to clipboard

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

Open Finalet opened this issue 10 months ago • 2 comments

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,
//           ...

Finalet avatar Apr 23 '24 19:04 Finalet

Thanks for reporting @Finalet. Looking into this now.

justinpolygon avatar Apr 24 '24 23:04 justinpolygon

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 avatar Apr 28 '24 03:04 Finalet