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

No key needed

Without a key it answers once a minute per IP address; sooner, the ack is rate_limited with retryAfterMs. With your plan's key in the handshake it answers every second (Lite) or five times a second (Developer).

ChannelSocket.IO event with ack
Authnone for once a minute; your plan's key, auth: { api_key }, for more
CostFree: 1 a minute · Lite: 1 a second · Developer: 5 a second

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​

  • Works without a key once a minute per IP address. With your plan's key in the handshake, auth: { api_key: … }, every second (Lite) or five times a second (Developer). Sooner than that, the ack is rate_limited with retryAfterMs.
  • Returns up to limit of the most recent candles. For anything older, the hourly replay files hold every trade.