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).

Free key, by request

This event needs a free data key. Join the Telegram group and ask for one; it puts a name to who is pulling candles, meters nothing and costs nothing. Everything else on the data API is keyless.

ChannelSocket.IO event with ack
Authfree key in the handshake, auth: { api_key } - ask for one in the Telegram group
CostFree

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.

Notes

  • Needs a free key - the same one as subscribe_ohlcv; everything else on the API is keyless. Calling it on a keyless connection returns an api_key_required error in the ack; connect with auth: { api_key: … } to use it.
  • 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.