# Sample Python Code for Streaming Data

**URL:** <https://forum.alpaca.markets/t/sample-python-code-for-streaming-data/422>\
**Category:** Alpaca Market Data\
**Created:** [November 6, 2019, 5:04am UTC](https://forum.alpaca.markets/t/sample-python-code-for-streaming-data/422 "2019-11-06T05:04:08Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![leopold](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.alpaca.markets/leopold/32/27_2.png) [@leopold](https://forum.alpaca.markets/u/leopold)\
**Post date:** [November 6, 2019, 5:04am UTC](https://forum.alpaca.markets/t/sample-python-code-for-streaming-data/422/1 "2019-11-06T05:04:08Z")

</div>

Is there a place where I can find functioning, sample Python codes for streaming market data?

Thanks.

---

<div class="post-metadata">

**Author:** ![leopold](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.alpaca.markets/leopold/32/27_2.png) [@leopold](https://forum.alpaca.markets/u/leopold)\
**Post date:** [November 7, 2019, 2:41pm UTC](https://forum.alpaca.markets/t/sample-python-code-for-streaming-data/422/2 "2019-11-07T14:41:41Z")

</div>

Found it inside the alpaca-trade-api-python package:

> <https://github.com/alpacahq/alpaca-trade-api-python/blob/master/examples/simpleStream.py>

Very useful.

---

<div class="post-metadata">

**Author:** ![hitoshi](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.alpaca.markets/hitoshi/32/69_2.png) [@hitoshi](https://forum.alpaca.markets/u/hitoshi)\
**Post date:** [November 11, 2019, 9:03am UTC](https://forum.alpaca.markets/t/sample-python-code-for-streaming-data/422/3 "2019-11-11T09:03:36Z")

</div>

Yup, glad you found it. Let us know what kind of tutorial would be helpful, any time!

---

<div class="post-metadata">

**Author:** ![edkb](https://avatars.discourse-cdn.com/v4/letter/e/6bbea6/32.png) [@edkb](https://forum.alpaca.markets/u/edkb)\
**Post date:** [November 16, 2019, 3:42am UTC](https://forum.alpaca.markets/t/sample-python-code-for-streaming-data/422/4 "2019-11-16T03:42:06Z")

</div>

Hey guys, is there any other way for streaming data without the polygon API? I found IEX API a good alternative but was unable to stream data from it as far as I tried to. I’m trying to run Hitoshi’s scalping algo as a non-US citizen and that’s is preventing the code to run.  
Thanks

---

<div class="post-metadata">

**Author:** ![Randy\_McClellan1](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.alpaca.markets/randy_mcclellan1/32/360_2.png) [@Randy\_McClellan1](https://forum.alpaca.markets/u/Randy_McClellan1)\
**Post date:** [July 6, 2020, 9:00pm UTC](https://forum.alpaca.markets/t/sample-python-code-for-streaming-data/422/5 "2020-07-06T21:00:30Z")

</div>

I would love to see a simple tutorial that takes a list of symbols and shows how to get quote prices from them, maybe print the symbol and quote prices to the screen for beginners.

Thanks if anyone would be willing to help, never used stream before and this would be very helpful!
