polygon-io / feature-requests

Feature requests for the Polgon.io Platform. Any bug reports should be opened in polygon-io/issues/issuess
0 stars 0 forks source link

Allow the Snapshot Options API to select multiple tickers #4

Open timothyareed opened 2 years ago

timothyareed commented 2 years ago

Is your feature request related to a problem? Please describe. In a previous feature request, the Snapshot API was enhanced to allow users to pull snapshots for multiple stocks with one request. see previous request polygon-io/issues#29. However, this did not carry over to the options snapshot API.

Describe the solution you'd like Let's say I want to get the Options Snapshot for multiple options contracts, I would have to place separate calls to "/v3/snapshot/options/{underlyingAsset}/{optionContract}". It would be much easier to place a single call to, "/v3/snapshot/options/{underlyingAsset}/{optionContract_1}, {optionContract_2}, ...{optionContract_n}".

Describe alternatives you've considered If I want to get the snapshot for every options contract for a given stock it would take 2-5 seconds to individual call every single options ticker through the current API.

Additional context Similar to feature request polygon-io/issues#29

Domini commented 2 years ago

To put this into perspective, lacking this functionality, one has to do up to 8312 separate API queries for SPY.

On the other hand, returning 8312 elements (full option chain without any filtering) would be both an overkill for the client and waste resources for polygon.io.

I think @timothyareed's idea of allowing to pass multiple options contracts would be the most flexible solution.

I think {underlyingAsset} should not be a filter in this API request. From what I've seen, options contracts are first-class citizens in your system anyway so you don't need underlying to locate one of its option contracts. And there is reason to query options contracts of different underlyings in one API call for optimisation.

at-cf commented 1 year ago

A lot of programmatic use cases scan full chains across large universe to find targets, the lack of batch functionality is more than just an inconvenience, it makes such use cases near infeasible with Polygon (whereas e.g. TDA API does allow batch calls). Even if the batch has to be under the same underlying, it would be a big help.

jrbell19 commented 1 year ago

This is something that we are currently working on. We understand the necessity to have this. We'll provide updates as they are available.

Jack Bell Head of Business Development @.***​

https://polygon.io​​

www.linkedin.com/in/jack-polygonio

--- original message --- On October 6, 2022, 10:04 AM EDT @.*** wrote:

A lot of programmatic use cases scan full chains across large universe to find targets, the lack of batch functionality is more than just an inconvenience, it makes such use cases near infeasible with Polygon (whereas e.g. TDA API does allow batch calls). Even if the batch has to be under the same underlying, it would be a big help.

Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you were assigned.Message ID: @.***> --- end of original message ---

at-cf commented 1 year ago

@jrbell19 that is awesome. I hate to be this guy and put you on the spot, but are we talking weeks/months/years?

I'll go on the record saying Polygon is a superb service, even without batch.

JesseLimtiaco commented 4 months ago

Hi @jrbell19 ,

I'm a new polygon user and was exploring some of the capabilities. I was wondering if there are any updates on this issue. I'm running into the same problem of calling many individual option tickers and would love it if I could just send a list of them in.

Thanks!

jrbell19 commented 4 months ago

Hey, you can actually use our Universal Snapshot endpoint to query multiple option contracts at once. Here's an example request for three contracts in A's chain:

https://api.polygon.io/v3/snapshot?ticker.any_of=O:A240419C00075000,O:A240419C00080000,O:A240419C00085000&apiKey=

Is this in line with what you're looking for? @JesseLimtiaco

JesseLimtiaco commented 4 months ago

Hi @jrbell19 ,

This is the type of functionality I am looking for but I was hoping to use this for historical data as well. For example, can I get the ohlc data of multiple SPY option tickers for a particular as_of date.

Thanks for the response!