Messages
{
"op": "subscribed",
"id": "candle-1m",
"channel": "ohlcv",
"updatePeriod": 0
}{
"op": "event",
"id": "candle-1m",
"channel": "ohlcv",
"data": {
"time": 1786716000,
"open": 5.4747109625568e-7,
"high": 5.4747124708872e-7,
"low": 5.4747109625568e-7,
"close": 5.4747124708872e-7,
"volume": 0.000042612402192036,
"volumeToken": 77.84,
"trades": 13,
"tradeAt": 1786718835000
},
"asOf": 1786718835420,
"cursor": "v1.amuk773y4ih91.2l3.mfq3c34n"
}{
"op": "subscribe",
"channel": "ohlcv",
"id": "candle-1m",
"params": {
"chain": "evm:8453",
"address": "0xb2000000000000000000007bf6d5cbb0e24cb301",
"interval": "1m"
}
}Market data
Live Candles
The forming candle of a token, pushed as it changes - same candle shape as REST /v1/token/ohlcv (time in unix seconds, TradingView-style), plus tradeAt (ms of the last folded trade). When a bucket rolls over, the closed candle is delivered first, then the first state of the new bucket.
WS channel: ohlcv
Enabled on your key on request: contact us.
The forming candle of a token, pushed as it changes - same candle shape as REST /v1/token/ohlcv (time in unix seconds, TradingView-style), plus tradeAt (ms of the last folded trade). When a bucket rolls over, the closed candle is delivered first, then the first state of the new bucket.
Delivery model
- One state per event. Each event carries the complete current candle (
open,high,low,close,volume,volumeToken,trades), never a delta. Replace the candle attimein your chart with the payload as is. - Cadence. The forming candle is pushed as it changes, at the pace you choose with
updatePeriod(default0: every change as it lands). Intermediate states inside a period are folded into the next event, so the values you receive are exactly the values the REST candle converges to. - Bucket close. A closed candle is always delivered immediately, before the first state of the next bucket. Its
timeis the bucket that just closed. - Corrections. A closed candle may be delivered again (same
time,"reason": "resync") when late data corrects it; replace the candle at thattime, as for any event. Delivered live, such events are free. - First event. On subscribe you receive the candle currently in formation (seeded from history), so the chart is continuous with what
/v1/token/ohlcvreturned a moment before. - Volume.
volumeis in the candle’s own quote (nativeby default,usdon Solana), like REST;volumeTokenis in units of the token itself and is never converted;tradescounts the swaps folded into the candle (swaps, not transactions: the same rule as REST).
Parameters
string
required
Public chain id -
evm:<id> or solana. Example: evm:8453string
required
Token address (EVM hex, case-insensitive; Solana base58, case-sensitive). Example:
0xb2000000000000000000007bf6d5cbb0e24cb301string
Candle interval - same set as REST:
1s 5s 15s 30s 1m 3m 5m 15m 30m 1h 2h 4h 6h 12h 1d 1w 1M (aliases 7d, 30d, 1min, 5min, 15min, 30min, 60). Default 1m. Example: 1mstring
native (default) or usd (Solana).Native coins (
0x0000…0000 and 0xeeee…eeee on every chain, Solana included, the wrapped native such as WETH or WBNB, and the SOL mint) stream in USD, the same candle as REST /v1/token/ohlcv: the candles of the coin’s main USD market, volume in USD and volumeToken in units of the coin. Omit quote or pass quote=usd (on every chain); quote=native and pools are refused with INVALID_PARAM. The native coin of a chain whose native is itself a USD stablecoin (Tempo, Arc, Stable) or that has no USD market (Robinhood Chain) is refused; its wrapped token keeps its own candles.string
Optional. CSV of pool addresses to restrict the candle to. Omit for the default: the token’s main pool, the market we price the token from, the same one as REST
/v1/token/ohlcv (its bonding-curve history stitched in front, the pool followed across the migration), kept up to date server-side as the token graduates. On every chain, Solana included. Every pool must belong to the token, as on REST: otherwise the subscription ends with an INVALID_PARAM error.integer
Optional, milliseconds, 0 to 60000, default
0. Above 0, each period delivers only the latest state of the forming candle (and bounds the cost). Closed candles are always delivered immediately, whatever the period. The ack carries the value applied (snapped up to 0, 100, 250, 500, 1000, 2000, 5000, 10000, 30000, 60000); maxUpdatesPerMinute (1 to 6000) is accepted as an alias. Example: 1000Limits
Per account: 20ohlcv subscriptions across your keys and connections by default (each token x interval counts as one), within the account-wide stream limits (100 connections, 200 subscriptions in total). One subscription can serve as many charts as you like on your side; several clients subscribing to the same token and interval share the same server-side candle. Tell us your target and we raise the limits with you.
Billing
Eachohlcv event delivered costs 1 credit, like every other channel (see the streams overview); the connection itself is free. A subscription on a token that does not trade costs nothing. updatePeriod bounds the number of events, and therefore the cost, of a busy token. GET /v1/usage/breakdown reports it under the route WS ohlcv, where requests is the number of events delivered.
Backfill and reconnect
Load history withGET /v1/token/ohlcv (same interval, same main pool by default), then subscribe: the first event is the forming candle, which continues the history you loaded. Every event carries a cursor: after a reconnect, subscribe again with "since": "<cursor of the last candle you received>" and you receive the candles closed since then, then the forming candle (up to 5 minutes back). Candles that come back flagged "replay": true replace the candle with the same time. If the replay is not available, a REPLAY_TOO_OLD notice gives details.restFromMs: re-fetch the candles from there over REST, the subscription keeps going.
{
"op": "subscribe",
"channel": "ohlcv",
"id": "candle-1m",
"params": {
"chain": "evm:8453",
"address": "0xb2000000000000000000007bf6d5cbb0e24cb301",
"interval": "1m"
}
}
{
"op": "subscribed",
"id": "candle-1m",
"channel": "ohlcv",
"updatePeriod": 0
}
{
"op": "event",
"id": "candle-1m",
"channel": "ohlcv",
"data": {
"time": 1786716000,
"open": 5.4747109625568e-7,
"high": 5.4747124708872e-7,
"low": 5.4747109625568e-7,
"close": 5.4747124708872e-7,
"volume": 0.000042612402192036,
"volumeToken": 77.84,
"trades": 13,
"tradeAt": 1786718835000
},
"asOf": 1786718835420,
"cursor": "v1.amuk773y4ih91.2l3.mfq3c34n"
}
{
"op": "error",
"id": "candle-21",
"error": {
"code": "RATE_LIMITED",
"message": "ohlcv subscription limit (20 per account) reached; ask us to raise it"
}
}
Close codes
The connection can be closed with:4401 (auth failure - bad/missing/revoked key), 4402 (quota exceeded), 1012 (server restart: reconnect after the retryAfterMs of the JSON reason), 1013 (server at capacity: same), 1008 (policy - subscription limits, floods, slow consumer), 1001 (idle timeout). 4401, 4402 and 1008 need a fix before reconnecting; after the others, reconnect (with a backoff, see Reconnect & resume) and resume with since.Messages
{
"op": "subscribed",
"id": "candle-1m",
"channel": "ohlcv",
"updatePeriod": 0
}{
"op": "event",
"id": "candle-1m",
"channel": "ohlcv",
"data": {
"time": 1786716000,
"open": 5.4747109625568e-7,
"high": 5.4747124708872e-7,
"low": 5.4747109625568e-7,
"close": 5.4747124708872e-7,
"volume": 0.000042612402192036,
"volumeToken": 77.84,
"trades": 13,
"tradeAt": 1786718835000
},
"asOf": 1786718835420,
"cursor": "v1.amuk773y4ih91.2l3.mfq3c34n"
}{
"op": "subscribe",
"channel": "ohlcv",
"id": "candle-1m",
"params": {
"chain": "evm:8453",
"address": "0xb2000000000000000000007bf6d5cbb0e24cb301",
"interval": "1m"
}
}Ack
type:object
Server acknowledgement: the subscription is live.
Candle update
type:object
The complete current candle, one state per event (never a delta): 1 credit per message. A closed candle is delivered immediately; "reason": "resync" flags a closed candle sent again corrected, free.
Subscribe
type:object
Client frame opening the subscription (additive, ack is explicit).