Due to the limitations of the
Bars GET request at 1000 bars, I’m attempting to build a function that when start & end (or after / until) is a duration larger than 1000 bars will construct multiple requests and combine the resulting data to complete the request.
I’m noticing that the bars data returned by the API is of inconsistent intervals when extracting timeframe’s of less than 1 day.
The TLRY data goes back to 2019-06-07 15:30:00 EDT, the BYND data goes back to it’s IPO date 2019-06-14 09:30:00 EDT, an the AMZN data goes back to 2019-05-30 13:30:00 EDT.
Is this expected behavior? This makes it quite difficult to build predictive models that assume the interval between each data point is the same, as the intervals appear to be quite random.
I was planning on using the
Calendar GET request to determine the intervals for forming the
Bars request, but given the inconsistent intervals it seems I might just need to iterate over the data for each ticker, extract the earliest date returned, use that as the
end of the next request, and form each new request until all of the data back to the original
from are returned.