# GetMinuteBarSubscription

**URL:** https://forum.alpaca.markets/t/getminutebarsubscription/7349
**Category:** Alpaca Market Data
**Created:** [November 8, 2021, 5:55pm UTC](https://forum.alpaca.markets/t/getminutebarsubscription/7349 "2021-11-08T17:55:24Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![dynamic3](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.alpaca.markets/dynamic3/32/1646_2.png) [@dynamic3](https://forum.alpaca.markets/u/dynamic3)
#### Post date: [November 8, 2021, 5:55pm UTC](https://forum.alpaca.markets/t/getminutebarsubscription/7349/1 "2021-11-08T17:55:24Z")

</div>

I didn’t see this method in the SDK until recently and was wondering, how does this work? Does it only stream from when I initiated the subscription? Would it be possible to set a ‘start date’ for streaming?

I’m finding myself having to query from the last timestamp over and over again; would prefer some function where I pass a symbol and a timestamp and the API gives me all data since that timestamp.

---

<div class="post-metadata">

### Author: ![oleg.rakhmatulin](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.alpaca.markets/oleg.rakhmatulin/32/559_2.png) [@oleg.rakhmatulin](https://forum.alpaca.markets/u/oleg.rakhmatulin)
#### Post date: [November 8, 2021, 9:51pm UTC](https://forum.alpaca.markets/t/getminutebarsubscription/7349/2 "2021-11-08T21:51:37Z")

</div>

The bar data streaming for the symbol will start as soon as you’ll pass the generated subscription object into the `Subscribe` method. See the example on [this](https://github.com/alpacahq/alpaca-trade-api-csharp/wiki/Alpaca-Streaming-API) Wiki page.  
You were unable to subscribe for data in past so for your scenario, you have to combine historical data requests and real-time data subscriptions.

---

<div class="post-metadata">

### Author: ![dynamic3](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.alpaca.markets/dynamic3/32/1646_2.png) [@dynamic3](https://forum.alpaca.markets/u/dynamic3)
#### Post date: [November 10, 2021, 6:02pm UTC](https://forum.alpaca.markets/t/getminutebarsubscription/7349/3 "2021-11-10T18:02:52Z")

</div>

Oleg, thank you for your response.

Is there a way to subscribe to all symbols? When I try to individually subscribe via a forloop it says connection broken; but if I do just 1 it works fine.

Please let me know,  
Thanks again

---

<div class="post-metadata">

### Author: ![oleg.rakhmatulin](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.alpaca.markets/oleg.rakhmatulin/32/559_2.png) [@oleg.rakhmatulin](https://forum.alpaca.markets/u/oleg.rakhmatulin)
#### Post date: [November 10, 2021, 7:10pm UTC](https://forum.alpaca.markets/t/getminutebarsubscription/7349/4 "2021-11-10T19:10:06Z")

</div>

If you need the minute bars for ALL active symbols just use the `GetMinuteBarSubscription` method without parameters. If you want to subscribe to some set of contracts just use the latest SDK version (some previous have a bug related to mass subscription) or use Extensions package that provides helper methods for creating a single subscription for array (or `IEnumerable<String>`) or symbols.

---

<div class="post-metadata">

### Author: ![dynamic3](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.alpaca.markets/dynamic3/32/1646_2.png) [@dynamic3](https://forum.alpaca.markets/u/dynamic3)
#### Post date: [November 10, 2021, 7:53pm UTC](https://forum.alpaca.markets/t/getminutebarsubscription/7349/5 "2021-11-10T19:53:32Z")

</div>

Oleg, I am talking about realtime data in general, trades, quotes, minute bars. Is the way you described for minute bars the same for all the other streaming endpoints?

Thanks,
