WebSocket
One socket for live OHLCV, trades and price.
Open one multiplexed socket and subscribe to channels per token; updates push as they land.
// wss://www.quanaris.com/ws const ws = new WebSocket("wss://www.quanaris.com/ws"); ws.onopen = () => ws.send(JSON.stringify({ type: "subscribe", channel: "ohlcv", params: { chain: "solana", address: MINT, interval: "1m" } })); ws.onmessage = (e) => console.log(JSON.parse(e.data));
Channels
ohlcv— data frame{ channel, address, interval, data:{ t,o,h,l,c,v } }trades—{ side, signer, dex, priceUsd, volumeUsd }price—{ priceUsd, t }
Control & errors
Unsubscribe with { type:"unsubscribe", channel, params:{ address, interval } }. Acks: { type:"subscribed"|"unsubscribed" }. Errors: { error:"bad_channel"|"bad_address"|"bad_interval"|"too_many_subscriptions"|"ws_busy" }.