AsyncAPI specification for Finnhub's real-time streaming WebSocket APIs. A single WebSocket endpoint (wss://ws.finnhub.io) multiplexes three documented streams selected by the envelope `type` field on each subscribe/unsubscribe message: * Trades - real-time last-price updates for US stocks (IEX), LSE, Forex and Crypto. Some FX/crypto exchanges send price updates with `volume = 0` instead of trades. One API key supports one open connection at a time. * News - real-time news for US and Canadian stocks (Premium). * Press Releases - real-time press releases for global companies (Enterprise). Authentication: pass the Finnhub API key as the `token` query parameter when opening the WebSocket connection (`wss://ws.finnhub.io?token={apiKey}`). Source: https://finnhub.io/docs/api/websocket-trades, https://finnhub.io/docs/api/websocket-news, https://finnhub.io/docs/api/websocket-press-releases
The single Finnhub WebSocket endpoint. Clients send subscribe / unsubscribe envelopes to select streams; the server pushes trade, news, and press-release messages on the same channel, distinguished by the top-level `type` field.
Messages
✉
SubscribeTrade
Subscribe to trades stream
Subscribe to real-time trades / last-price updates for a US stock, LSE symbol, forex pair, or crypto pair.
✉
UnsubscribeTrade
Unsubscribe from trades stream
Unsubscribe from real-time trades for a symbol.
✉
SubscribeNews
Subscribe to news stream
Subscribe to real-time news for a US or Canadian stock. Requires Premium access.
✉
UnsubscribeNews
Unsubscribe from news stream
Unsubscribe from real-time news for a symbol.
✉
SubscribePressRelease
Subscribe to press releases stream
Subscribe to real-time press releases for a company. Requires Enterprise access.
✉
UnsubscribePressRelease
Unsubscribe from press releases stream
Unsubscribe from real-time press releases for a symbol.
✉
TradeMessage
Trades message
Real-time trade / last-price update message. `data` may contain multiple trades. For exchanges that do not stream trades, a price update is sent with `v = 0`.
✉
NewsMessage
News message
Real-time news message for subscribed US/Canadian stocks.
✉
PressReleaseMessage
Press release message
Real-time press release message for subscribed companies.
✉
PingMessage
Server ping
Heartbeat ping sent by the server to keep idle connections alive. Carries no `data` payload.