# Snapshot daily bar vs get\_bars daily bar

**URL:** <https://forum.alpaca.markets/t/snapshot-daily-bar-vs-get-bars-daily-bar/10330>\
**Category:** Alpaca Market Data\
**Created:** [August 16, 2022, 12:03pm UTC](https://forum.alpaca.markets/t/snapshot-daily-bar-vs-get-bars-daily-bar/10330 "2022-08-16T12:03:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![lumax\_tr](https://avatars.discourse-cdn.com/v4/letter/l/e19adc/32.png) [@lumax\_tr](https://forum.alpaca.markets/u/lumax_tr)\
**Post date:** [August 16, 2022, 12:03pm UTC](https://forum.alpaca.markets/t/snapshot-daily-bar-vs-get-bars-daily-bar/10330/1 "2022-08-16T12:03:05Z")

</div>

Dear Alpaca team,

Thanks for providing such a very good API together with the python bindings.  
I’m trying to understand the meaning of the snapshot daily bars. For instance:

```auto
>>> print(api.get_bars('AAPL', TimeFrame.Day, start='2022-08-12', end='2022-08-15'))
[Bar({ 'c': 172.1,
    'h': 172.17,
    'l': 169.4,
    'n': 557290,
    'o': 169.87,
    't': '2022-08-12T04:00:00Z',
    'v': 67989796,
    'vw': 171.076181}), Bar({ 'c': 173.19,
    'h': 173.39,
    'l': 171.345,
    'n': 501625,
    'o': 171.5,
    't': '2022-08-15T04:00:00Z',
    'v': 54091694,
    'vw': 172.625371})]
>>> sn = api.get_snapshot('AAPL')
>>> print(sn.prev_daily_bar)
BarV2({ 'c': 172.01,
    'h': 172.01,
    'l': 169.42,
    'n': 12362,
    'o': 169.94,
    't': '2022-08-12T04:00:00Z',
    'v': 1208489,
    'vw': 170.906696})
>>> print(sn.daily_bar)
BarV2({ 'c': 173.19,
    'h': 173.385,
    'l': 171.35,
    'n': 8558,
    'o': 171.52,
    't': '2022-08-15T04:00:00Z',
    'v': 786184,
    'vw': 172.62003})

```

The snapshot daily bar volume is orders of magnitude different from the obtained volume of the get\_bars function (here the snapshot is obtained when the market is closed and uses IEX). Does it mean that the daily snapshot bar is not based on a day timeframe? I will have expected the snapshot daily bar to be a cumulative of the minute bars of the current market clock and therefore at the end of the day to match the daily bar obtained with get\_bars. I try to use the snapshot daily bar to compute the relative volume live and therefore I expect a minute-based cumulative volume over the market day.

Thanks!

---

<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:** [August 18, 2022, 6:09am UTC](https://forum.alpaca.markets/t/snapshot-daily-bar-vs-get-bars-daily-bar/10330/2 "2022-08-18T06:09:59Z")

</div>

Hey 👋

The difference you’re seeing is the difference between the IEX and the SIP feed. If you don’t have an Unlimited subscription, the snapshot endpoint (as you know) returns IEX-only data. However, the historical bars endpoint by default returns SIP (all US exchanges) data, if the `end` argument is older than the last 15 minutes.

If you want, you can query IEX-only data in historical as well using the `feed` argument:

```python
print(
    api.get_bars(
        symbol="AAPL",
        timeframe=TimeFrame.Day,
        start="2022-08-12",
        end="2022-08-15",
        feed="iex",
    )
)

```

```python
[Bar({ 'c': 172.01,
    'h': 172.01,
    'l': 169.42,
    'n': 12362,
    'o': 169.94,
    't': '2022-08-12T04:00:00Z',
    'v': 1208489,
    'vw': 170.906696}), Bar({ 'c': 173.19,
    'h': 173.385,
    'l': 171.35,
    'n': 8558,
    'o': 171.52,
    't': '2022-08-15T04:00:00Z',
    'v': 786184,
    'vw': 172.62003})]

```

You see that now the volumes match exactly.

---

<div class="post-metadata">

**Author:** ![lumax\_tr](https://avatars.discourse-cdn.com/v4/letter/l/e19adc/32.png) [@lumax\_tr](https://forum.alpaca.markets/u/lumax_tr)\
**Post date:** [August 18, 2022, 12:36pm UTC](https://forum.alpaca.markets/t/snapshot-daily-bar-vs-get-bars-daily-bar/10330/3 "2022-08-18T12:36:06Z")

</div>

Hello!

Thank you for the explanation and the quick answer!

The doc of `/bars` about the feed parameter is identical as the one for the `/snapshot`. However, as you explained, feed is SIP by default if the requested time is older than the last 15 minutes and even without a subscription or IEX otherwise. This change of default is an hidden feature! 🙂

Doc statement:  
`The feed to pull market data from. This is either iex, otc, or sip. sip and otc are only available to those with a subscription. Default is iex for free plans and sip for paid.`

In any case, thanks again for your answer, everything is clear now for me.
