AsyncAPI 2.6 description of Twelve Data's **real-time price WebSocket**. Unlike a one-way HTTP Server-Sent Events stream, this is a genuine, bidirectional WebSocket (`wss://`) surface. The client opens a persistent connection to `wss://ws.twelvedata.com/v1/quotes/price`, authenticates with an `apikey` query parameter, and then sends JSON control messages (`subscribe`, `unsubscribe`, `reset`) to manage which instruments it wants. The server pushes `price` events as trades occur (average latency ~170 ms), plus `subscribe-status` acknowledgements and periodic `heartbeat` events. Each successfully subscribed symbol consumes 1 WebSocket credit. WebSocket access is metered separately from REST API credits and varies by plan (trial credits on Basic/Grow, 1,500 on Pro, 10,000 on Ultra). Source: https://twelvedata.com/docs/websocket/ws-real-time-price
View SpecView on GitHubMarket DataFinancial DataStocksForexCryptoReal-Time DataTechnical IndicatorsFundamentalsAsyncAPIWebhooksEvents
Channels
/v1/quotes/price
publishsendControlMessage
Send a subscription control message to the server.
Single multiplexed price channel. The client publishes control messages (subscribe / unsubscribe / reset) and the server publishes price events, subscription acknowledgements, and heartbeats over the same connection.
Messages
✉
SubscribeAction
Subscribe to symbols
Add one or more instruments to the price stream.
✉
UnsubscribeAction
Unsubscribe from symbols
Remove one or more instruments from the price stream.
✉
ResetAction
Reset subscriptions
Clear all active subscriptions on the connection.
✉
PriceEvent
Real-time price event
A single real-time price update for a subscribed instrument.
✉
SubscribeStatus
Subscription status
Acknowledgement listing which symbols were successfully subscribed and which failed.
✉
Heartbeat
Heartbeat
Periodic keep-alive event confirming the connection is healthy.
Servers
wss
productionws.twelvedata.com/v1/quotes/price
Twelve Data real-time price WebSocket server. Authenticate by appending the `apikey` query parameter to the connection URL: `wss://ws.twelvedata.com/v1/quotes/price?apikey=YOUR_API_KEY`.