Financial Data Streaming using Alpaca and Streamlit
Published in
4 min readFeb 23, 2022
This tutorial aims to stream financial data, particularly Open, High, Low, Close, and Volume data using Alpaca stream API, and plot them using streamlit in real-time.
So the tutorial can be divided into three parts
- Alpaca Streaming API v2
- Watchdog for tracking the file changes as new data comes in and re-run streamlit. This functionality comes out of the box in streamlit.
- Streamlit to plot the candlesticks charts for all the ticker symbols
The code for the tutorial can be found here
We will be generating candlestick plots for stocks in real-time
Alpaca Streaming API
Alpaca offers simple, modern API-first solutions to enable anyone, either individuals or businesses, to connect applications and build algorithms to buy and sell stocks or crypto with zero commissions.
- You need to have your API keys and secret keys by creating an account in Alpaca.