Please see our docs here.

Streaming - Documentation | Alpaca
Alpaca API lets you build and trade with real-time market data for free.