candles
OHLCV for a token at intervals from one second to one minute, built from the same trades that token_trades delivers.
No history
Candles are built from the moment you subscribe. There is no history and no backfill.
Subscribe
Requires a mint. Interval and live-update behaviour are parameters, not filters.
{
"op": "subscribe",
"stream": "candles",
"params": {
"mint": "8Wq…kR2p",
"interval": "15s",
"priceCurrency": "usd",
"detail": "full",
"updates": "live"
},
"id": 1
}Parameters
| Param | Type | Description |
|---|---|---|
mint | string | Required. Token mint. |
interval | string | Required. 1s, 15s, 30s, or 1m. |
priceCurrency | string | usd (default) or sol; one currency per subscription. |
updates | live / closed | live by default; closed sends closed bars only. |
detail | basic / full | Payload level; basic by default. |
Filters and every candle interval are available on all plans, including Free.
Event
{
"op": "event",
"sub": "cd_1",
"stream": "candles",
"cursor": "000330112270:000000:0000",
"data": {
"interval": "15s",
"priceCurrency": "usd",
"openTime": 1785482160,
"open": "0.00001218",
"high": "0.00001218",
"low": "0.00001176",
"close": "0.00001182",
"volumeToken": "89760695.84",
"volumeUsd": "1093.29",
"trades": 37,
"buys": 24,
"sells": 13,
"closed": true
}
}Candles are aggregates, so their data does not contain the common transaction envelope.
Basic fields
| Field | Type | Notes |
|---|---|---|
interval | string | Subscription interval |
priceCurrency | usd | sol | Currency selected by the subscription |
openTime | number | Bar start as Unix seconds |
open, high, low, close | string | OHLC in the selected currency |
volumeToken | string | Token volume |
closed | boolean | true on the final bar for the interval |
Full fields
| Field | Type | Notes |
|---|---|---|
volumeUsd | string | Set when priceCurrency is usd, otherwise null |
volumeSol | string | Set when priceCurrency is sol, otherwise null |
trades | number | Trade count |
buys | number | Buy count |
sells | number | Sell count |
With updates: live, an open bar is emitted once per second. A 1s bar closes every second and has no separate live updates. Events are emitted only for intervals that contain trades.
When a bar closes
A bar closes as soon as the first trade of the next interval arrives, and the closed bar goes out at that moment. If trading goes quiet and no such trade comes, a timer closes the bar shortly after the interval ends instead.
The short wait on the timer path is deliberate. Block metadata can reach us a little later than the trades it describes, so closing a bar the instant its interval ended would let a late trade turn up against a bar already sent — and the same minute would arrive twice, as two different closed bars. Waiting briefly means every bar is sent closed exactly once, with all of its trades, and is never reopened.
Live updates are not affected: while a bar is forming you receive it every second, so the price you display is always current. A trade that arrives after its bar has already closed is not counted in it, which is worth knowing if you reconcile candle volume against token_trades.