Live candle stream
On subscription the stream replays the latest candle of the requested
timeframe and then forwards live updates of the forming candle. Historical
ranges are not part of this API: use the REST endpoint
GET /api/v1/marketdata/candles for history. A terminal upstream error is
delivered as an error frame and closes the socket; when the upstream
stream ends the socket is closed normally.
Cost: 10 credits per subscription, charged again in every quota window the connection stays open in.
{
"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"
}
}API key sent on the WebSocket upgrade request. Exactly one header value is required; duplicate or comma-combined values are rejected.
GET
The latest replayed candle or a live update of the forming candle.
Terminal error converted from an upstream status; closes the socket.
Was this page helpful?
{
"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"
}
}