polygon-io / issues

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

Ability to request trades/quotes/bars within a specific timeframe between timestamps #284

Open kenaschmidt opened 5 months ago

kenaschmidt commented 5 months ago

Is your feature request related to a problem? Please describe. When requesting pricing data, can only request 'greater than' OR 'less than' timestamp, no ability to request a specific range. Closest option is to request a single day's worth. This is time consuming for tickers with hundreds of thousands of quotes and trades when you may only need a snapshot at a specific time (in my case, to calculate option pricing on contracts across a large chain).

Describe the solution you'd like Ability to combine filters in the request string; ie, timestamp.gte12345&timestamp.lte=23456. I did try this already and it doesn't seem to have an effect at the moment.

Describe alternatives you've considered As noted above, only alternative is to request an entire day's worth, which can take many minutes in some cases.

Additional context N/A

AHangstefer commented 5 months ago

Hi! Thanks for reaching out! This is possible using the Quotes and Trades endpoints. You would need to use timestamp.lt= and timestamp.gt= with nanosecond timestamps with these endpoints spesifically. If you use millisecond or second timestamps, that often returns data outside of the requested times. Let me know if you're using another endpoint. I'm happy to look into it's capabilities as well.