polygon-io / issues

Quickly track and report problems with polygon.io
29 stars 0 forks source link

Reference Options: Response contains too much data #167

Closed ghost closed 1 year ago

ghost commented 2 years ago

URL

underlyings = 'AAPL&AMZN'
url = f"https://api.polygon.io/vX/reference/options/contracts?underlying_ticker{underlyings}&limit=1000&apiKey={dep['polygon']}"

Result

I am getting more than the specified underlyings. In this case it seems that I get ALL underlyings, starting with 'A'.

Expected Result

I am expecting to receive only the options contracts for AAPL and AMZN

jrbell19 commented 2 years ago

It looks like the request may just not be accepting the underlying at all, so it thinks nothing was passed into that parameter. If you pass each ticker in individually, does the same thing happen?

ghost commented 2 years ago

The issue in the URL was that it missed an equal sign before the tickers. However, it only works when I pass a single ticker. I think it would be very useful if polygon accepts URLs containing multiple tickers and responds with the respective data.

jrbell19 commented 1 year ago

This is not a bug we are planning to fix. Our contracts endpoint only accepts a single ticker at a time. Closing