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

Provision of bars with finer tenors (for example 10sec, 30sec) #15

Closed tr8dr closed 1 year ago

tr8dr commented 3 years ago

Is your feature request related to a problem? Please describe. Loading trades (ticks) in order to produce bars with granularities finer than 1min is expensive in terms of:

Describe the solution you'd like Would like to extend the REST api to allow queries for bar granularities of < 1min. It should be straightforward to generate and return bars of arbitrary granularity (with exception of daily bars, which are special given the auction prices and volume outside of market hours).

Bars with no trades (volume = 0) would not be returned, reducing bandwidth and avoiding computation on the server side.

Describe alternatives you've considered My current approach is to load ticks for my stock universe (~3000 stocks), save, compress, and then generate 10sec bars (the current granularity of interest). The process of loading the ticks took ~3 days and involved loading ~5 TB of data. Loading the bars would have been much more compact and time efficient.

Notes It would probably be impractical to precompute / save all possible bars of interest. Computing the bars on the fly from a tick series should have very little additional cost, relative to the cost of retrieving and and streaming ticks.

roy-themachine commented 1 year ago

Hi, Is there any eta for this enhancement? In my case I need to get the Opening price for SPX in 5 minutes intervals, with the current implementation I am only able to get the opening price of each bar in 1 minute latency, e.g. if it's 9:30am then I will only able to see the opening price for 9:30-9:35 at around 9:31:05. Assuming the granularity can be customized for 10seconds then I should be able to get the opening price at 9:30:10 or 9:30:20 to the very least. Thank you

timetraveler328 commented 1 year ago

Hey all, we've added second-level aggregates to our platform. You can access them for any time range or asset class with a paid plan by using 'second' as the granularity in our Aggs API. Here's a link to the docs: https://polygon.io/docs/stocks/get_v2_aggs_ticker__stocksticker__range__multiplier___timespan___from___to

timetraveler328 commented 1 year ago

Hi, Is there any eta for this enhancement? In my case I need to get the Opening price for SPX in 5 minutes intervals, with the current implementation I am only able to get the opening price of each bar in 1 minute latency, e.g. if it's 9:30am then I will only able to see the opening price for 9:30-9:35 at around 9:31:05. Assuming the granularity can be customized for 10seconds then I should be able to get the opening price at 9:30:10 or 9:30:20 to the very least. Thank you

@roy-themachine This feature is now released, I think this query will get you what you're looking for: https://api.polygon.io/v2/aggs/ticker/AAPL/range/300/second/1690810210000/1690811110000?adjusted=true&sort=asc&limit=50000

timetraveler328 commented 1 year ago

Closing as complete