# When is the daily bar first available?

**URL:** <https://forum.alpaca.markets/t/when-is-the-daily-bar-first-available/11054>\
**Category:** Alpaca Market Data\
**Created:** [November 11, 2022, 7:18pm UTC](https://forum.alpaca.markets/t/when-is-the-daily-bar-first-available/11054 "2022-11-11T19:18:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![08.fortes.waxen](https://avatars.discourse-cdn.com/v4/letter/0/c2a13f/32.png) [@08.fortes.waxen](https://forum.alpaca.markets/u/08.fortes.waxen)\
**Post date:** [November 11, 2022, 7:18pm UTC](https://forum.alpaca.markets/t/when-is-the-daily-bar-first-available/11054/1 "2022-11-11T19:18:01Z")

</div>

The [documentation](https://alpaca.markets/docs/api-references/market-data-api/stock-pricing-data/realtime/#daily-bar-schema) says

> A daily bar is returned as partial bar up to the current time and updates only at the first valid trade of the day.

When I last tried listening to the daily bar stream, the first daily bar was only sent at the close of the first minute; however, the documentation suggests that the first daily bar should be sent immediately after receiving the opening trade. Is the documentation incorrect or is there a bug in Alpaca’s implementation?

---

<div class="post-metadata">

**Author:** ![Gergely\_Alpaca](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.alpaca.markets/gergely_alpaca/32/3210_2.png) [@Gergely\_Alpaca](https://forum.alpaca.markets/u/Gergely_Alpaca)\
**Post date:** [November 14, 2022, 7:17am UTC](https://forum.alpaca.markets/t/when-is-the-daily-bar-first-available/11054/2 "2022-11-14T07:17:54Z")

</div>

@08.fortes.waxen

The key here is that both the minute bars and the daily bars are calculated at the **end** of each minute. The minute bars contain the trades in the minute, and the daily bars contain the trades that day up until that point.

> the first daily bar was only sent at the close of the first minute

Yes, the first possible daily bar is sent out at 9:31 and contains the trades until that point.

> the documentation suggests that the first daily bar should be sent immediately after receiving the opening trade

Your quotation doesn’t suggest this. If you read it somewhere else, please provide a link.

---

<div class="post-metadata">

**Author:** ![08.fortes.waxen](https://avatars.discourse-cdn.com/v4/letter/0/c2a13f/32.png) [@08.fortes.waxen](https://forum.alpaca.markets/u/08.fortes.waxen)\
**Post date:** [November 14, 2022, 8:41am UTC](https://forum.alpaca.markets/t/when-is-the-daily-bar-first-available/11054/3 "2022-11-14T08:41:50Z")

</div>

Thanks for the confirmation.

This is the part of the sentence that made me think that the daily bar would be sent immediately after receiving the opening trade: “updates only at the first valid trade of the day”. Perhaps it would be clearer for the documentation to say “A daily bar is returned as a partial bar at the end of each minute. The daily bar is only available after the first valid trade of the day.”?

That being said, it would be useful if a partial daily bar _was_ sent immediately after the opening trade was received so that a strategy that relies on the day open price doesn’t need to wait until the end of the first minute to execute.
