polygon-io / issues

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

Crypto aggregates (bars) is returning a cut off time window #203

Closed mjwweb closed 1 year ago

mjwweb commented 2 years ago

URL https://api.polygon.io/v2/aggs/ticker/X:BTCUSD/range/5/minute/2021-03-18/2022-03-18?adjusted=true&sort=asc&limit=50000&apiKey=

Result The time window of the results set returns aggregates from 2021-03-18 to 2021-04-21

Expected Result The time window of the results set should return aggregates from 2021-03-18 to 2022-03-18

Screenshots first result (2021-03-18) firstAggregate last result (2021-04-21) lastAggregate

Desktop (please complete the following information):

Additional Information

matichenor commented 2 years ago

Thanks for reporting this issue @mjwweb . I've been able to reproduce and we are investigating the problem.

jrbell19 commented 1 year ago

Cleaning up some issues in the backlog. This is expected functionality given the limit parameter's functionality. The limit of 50k query's the underlying aggregate, in this case, minutes to stitch together the 5-minute bars. 50,000 minutes returns around a month of data. https://polygon.io/knowledge-base/article/how-does-polygon-limit-parameter-work-for-the-aggregates

You'll need to paginate according to the last result to obtain the next set of results. Apologies for the confusion/delay.