Skip to main content

ohlcv_history - recent candles (one-shot)

One-shot request: returns the most recent N 1-second candles for a pool. Use it to seed a chart, then upgrade to subscribe_ohlcv for live updates. Pass one of mint or pool, plus an optional limit (1 – 500, default 200).

ChannelSocket.IO event with ack
Authauth.api_key in the handshake

Example

socket.emit("ohlcv_history", { pool: "4mBL…", limit: 200 }, (ack) => {
if (!ack.ok) return console.error(ack);
for (const [t, o, h, l, c, v] of ack.data) {
console.log(new Date(t), `o=${o} h=${h} l=${l} c=${c} v=${v}`);
}
});

Response (ack)

{
"ok": true,
"pool": "4mBL…",
"data": [
[1779812627000, 0.000000033, 0.000000034, 0.000000033, 0.000000034, 5.12],
[1779812628000, 0.000000034, 0.000000035, 0.000000034, 0.000000035, 7.40]
]
}

Tuples are [ timestamp_ms, open, high, low, close, volume ], sorted oldest → newest. Format matches the live ohlcv stream.

Try it

Notes

  • This is the only paid one-shot WS call - the rest are subscribes.
  • Returns whatever's currently in the rolling Redis window (typically the last ~2 minutes of 1s candles between flushes to ClickHouse). For deeper history, a REST /ohlcv endpoint with from / to is on the roadmap.