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

Allow the Snapshot Options API to select multiple tickers #4

Open
timothyareed opened this issue Apr 14, 2022 · 7 comments
Open

Allow the Snapshot Options API to select multiple tickers #4

timothyareed opened this issue Apr 14, 2022 · 7 comments
Assignees
Labels
enhancement New feature or request

Comments

@timothyareed
Copy link

timothyareed commented Apr 14, 2022

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

@timothyareed timothyareed added the enhancement New feature or request label Apr 14, 2022
@Domini
Copy link

Domini commented May 12, 2022

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
Copy link

at-cf commented Oct 6, 2022

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
Copy link
Collaborator

jrbell19 commented Oct 6, 2022 via email

@at-cf
Copy link

at-cf commented Oct 6, 2022

@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.

@jrbell19 jrbell19 transferred this issue from polygon-io/issues Mar 9, 2023
@JesseLimtiaco
Copy link

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
Copy link
Collaborator

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
Copy link

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants