WebSocket API
Live candle stream
Subscribe to the candle stream over WebSocket: a replay of the latest candles, then live updates to the forming candle.
WSS
/
api
/
v1
/
marketdata
/
candles
/
stream
Messages
{
"type": "candle",
"meta": {
"exchange": "BATS",
"symbol": "AAPL",
"timeframe": "1m"
},
"tag": 1,
"isLast": true,
"candle": {
"timestamp": "2026-09-21T19:59:00Z",
"open": "339.27",
"high": "339.35",
"low": "338.93",
"close": "339.05",
"volume": "17501",
"sessionType": "MAINSESSION"
}
}{
"type": "error",
"meta": {
"exchange": "BATS",
"symbol": "UNKNOWN",
"timeframe": "1m"
},
"tag": 1,
"error": {
"code": "not_found",
"message": "security not found"
}
}x-api-key
type:httpApiKey
API key sent on the WebSocket upgrade request. Exactly one header value is required; duplicate or comma-combined values are rejected.
method
type:string
GET
query
type:object
Candle frame
type:object
The latest replayed candle or a live update of the forming candle.
Error frame
type:object
Terminal error converted from an upstream status; closes the socket.
Was this page helpful?
⌘I
Messages
{
"type": "candle",
"meta": {
"exchange": "BATS",
"symbol": "AAPL",
"timeframe": "1m"
},
"tag": 1,
"isLast": true,
"candle": {
"timestamp": "2026-09-21T19:59:00Z",
"open": "339.27",
"high": "339.35",
"low": "338.93",
"close": "339.05",
"volume": "17501",
"sessionType": "MAINSESSION"
}
}{
"type": "error",
"meta": {
"exchange": "BATS",
"symbol": "UNKNOWN",
"timeframe": "1m"
},
"tag": 1,
"error": {
"code": "not_found",
"message": "security not found"
}
}