# Bars / Timeframes less than 1 day return data with inconsistent time intervals?

**URL:** <https://forum.alpaca.markets/t/bars-timeframes-less-than-1-day-return-data-with-inconsistent-time-intervals/131>\
**Category:** Alpaca Questions\
**Created:** [August 5, 2019, 7:21pm UTC](https://forum.alpaca.markets/t/bars-timeframes-less-than-1-day-return-data-with-inconsistent-time-intervals/131 "2019-08-05T19:21:34Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![synchronicity](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.alpaca.markets/synchronicity/32/824_2.png) [@synchronicity](https://forum.alpaca.markets/u/synchronicity)\
**Post date:** [August 5, 2019, 7:21pm UTC](https://forum.alpaca.markets/t/bars-timeframes-less-than-1-day-return-data-with-inconsistent-time-intervals/131/1 "2019-08-05T19:21:34Z")

</div>

### Intro

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.

### Specific Question

I’m noticing that the bars data returned by the API is of inconsistent intervals when extracting timeframe’s of less than 1 day.

### Reprex

Here’s the request URL:  
[https://data.alpaca.markets/v1/bars/15Min?symbols=TLRY,BYND,AMZN&limit=1000&start=2019-05-13T15:02:04-0400&end=2019-08-05T15:02:04-0400](https://data.alpaca.markets/v1/bars/15Min?symbols=TLRY,BYND,AMZN&limit=1000&start=2019-05-13T15:02:04-0400&end=2019-08-05T15:02:04-0400)

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.

---

<div class="post-metadata">

**Author:** ![coins](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.alpaca.markets/coins/32/62_2.png) [@coins](https://forum.alpaca.markets/u/coins)\
**Post date:** [August 7, 2019, 12:02am UTC](https://forum.alpaca.markets/t/bars-timeframes-less-than-1-day-return-data-with-inconsistent-time-intervals/131/2 "2019-08-07T00:02:31Z")

</div>

Try the v2 api.

[https://data.alpaca.markets/v2/bars/15Min?symbols=TLRY,BYND,AMZN&limit=1000&start=2019-05-13T15:02:04-0400&end=2019-08-05T15:02:04-0400](https://data.alpaca.markets/v2/bars/15Min?symbols=TLRY,BYND,AMZN&limit=1000&start=2019-05-13T15:02:04-0400&end=2019-08-05T15:02:04-0400)

---

<div class="post-metadata">

**Author:** ![synchronicity](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.alpaca.markets/synchronicity/32/824_2.png) [@synchronicity](https://forum.alpaca.markets/u/synchronicity)\
**Post date:** [August 16, 2019, 7:08pm UTC](https://forum.alpaca.markets/t/bars-timeframes-less-than-1-day-return-data-with-inconsistent-time-intervals/131/3 "2019-08-16T19:08:04Z")

</div>

Will do, thanks for the tip!

---

<div class="post-metadata">

**Author:** ![jatofr](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.alpaca.markets/jatofr/32/534_2.png) [@jatofr](https://forum.alpaca.markets/u/jatofr)\
**Post date:** [March 18, 2020, 2:48am UTC](https://forum.alpaca.markets/t/bars-timeframes-less-than-1-day-return-data-with-inconsistent-time-intervals/131/4 "2020-03-18T02:48:19Z")

</div>

Endpoint not found… Is this still a thing?

---

<div class="post-metadata">

**Author:** ![synchronicity](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.alpaca.markets/synchronicity/32/824_2.png) [@synchronicity](https://forum.alpaca.markets/u/synchronicity)\
**Post date:** [March 18, 2020, 4:28pm UTC](https://forum.alpaca.markets/t/bars-timeframes-less-than-1-day-return-data-with-inconsistent-time-intervals/131/5 "2020-03-18T16:28:13Z")

</div>

I get the same error now, endpoint not found…

---

<div class="post-metadata">

**Author:** ![moe](https://avatars.discourse-cdn.com/v4/letter/m/ad7895/32.png) [@moe](https://forum.alpaca.markets/u/moe)\
**Post date:** [March 18, 2020, 7:49pm UTC](https://forum.alpaca.markets/t/bars-timeframes-less-than-1-day-return-data-with-inconsistent-time-intervals/131/6 "2020-03-18T19:49:30Z")

</div>

> **[Market Data - Documentation | Alpaca](https://docs.alpaca.markets/api-documentation/api-v2/market-data/)**
>
> Alpaca API lets you build and trade with real-time market data for free.

## says:

## **Please note the Data API endpoint is different from the Trading API endpoint. Although the Trading API documented herein references v2, the Data API endpoint should still point to v1 as follows:**

I don’t think the data api v2 exists.
