Skip to main content
One token, one interval, one candle pushed the moment its bucket closes. Open, high, low, close, average, USD volume and a swap count arrive already aggregated, so a chart stays current without you keeping a tick buffer of your own. This feed also remembers. A dropped connection resumes where it left off, and a fresh one can start with the last fifteen minutes already on screen. This page is the working reference: how a candle is built, how to subscribe, what resume and backfill really do, what it costs, and the four behaviours that will surprise you. Parameters and schemas are at GET /sse/ohlcv.
This feed is Pro only, and a free key does not open it. Every other stream either runs keyless or opens with a free key. This one answers 403 with {"message":"this endpoint requires a Pro plan"} to anything less, on a connection you expected to stay open.Pro also means a different host: streaming-pro.dexpaprika.com, never streaming.. Plans are on pricing, the migration is in upgrading to Pro, and your key lives in console.dexpaprika.com.

How a candle is built

Worth reading before the cost section, because these rules are the cost. A bucket opens when the first swap in that interval touches the token, and it collects every swap until the interval ends. Shortly after it ends the bucket is sealed and sent. Three consequences follow, and each one shows up in real consumers. A quiet interval produces nothing at all. No swap means no bucket, and no bucket means no event. A token that trades twice a minute sends two candles a minute on the 1s stream, not sixty. You are never charged for silence. A candle can be sent more than once. When a swap arrives after its bucket was already sealed, within the late window above, the bucket is recomputed and republished under the same timestamp with updated values. This is correct behaviour on chains that deliver blocks out of order, and it means your store must be keyed on timestamp and overwrite. A consumer that appends will draw the same minute twice. interval is a cost lever before it is a resolution choice. The same token on 1s and on 60s delivers the same trades; only the bucketing differs. See what it costs. All 35 chains we index stream candles, with no separate coverage list to check. The set matches GET /networks exactly.

Subscribe

Authorization carries the key as the entire header value, with no scheme word in front of it.
method is token_ohlcv and address is a token address. interval defaults to 1s, which is the most expensive choice, so set it deliberately. request_id is echoed on every event if you send one. One subscription per connection here, unlike prices, reserves and transactions, which take up to 25 in a POST body. Watching ten tokens means ten connections, and 10 concurrent streams per IP is the ceiling.

What an event looks like

The id: line is the candle’s timestamp as unix seconds. Browsers track it automatically and replay it as Last-Event-ID on reconnect, which is what makes resume work with no code on your side.
avg is an unweighted mean. It averages the price samples in the bucket, so a hundred-dollar swap and a hundred-thousand-dollar swap move it by the same amount. When you want a volume weighted figure, derive it from volume_usd and the underlying trades on the transactions feed instead of reading avg.

Resume and backfill

Two parameters put history in front of the live tail, and they behave differently on the edge cases. The two-column split is deliberate. since is something you wrote, so a mistake is worth an error. Last-Event-ID is sent by a browser after an outage of unknown length, and an outage longer than the window should still reconnect rather than fail. Three things to plan around: The boundary is inclusive. Resuming at the last id: you saw redelivers that candle. Harmless if you overwrite by timestamp, which the republish rule already requires; pass since one second later if you would rather not pay for it. Backfill counts toward limit. limit caps total events, history included, so since=<5 minutes ago>&limit=10 can close the connection on backfill alone and never reach a live candle. Fifteen minutes is the whole memory. Anything older is a REST query, not a stream parameter. Sizing a longer history belongs in plan your credit usage.

What it costs

Each delivered event costs one credit. Heartbeats, warnings and error frames are free, so an idle connection costs nothing. Because a candle needs at least one swap, your bill is bounded twice over:
The left term is the ceiling you are buying into: A continuously trading major asset approaches the left term, so one 1s subscription is the single most expensive thing in the streaming API, sixty times a 60s subscription on the same token for the same trades. A long-tail token never gets near it, and the right term governs: forty swaps an hour is forty candles an hour on any interval. Republished candles are billed again, so a chain with frequent late blocks costs slightly more than the ceiling arithmetic suggests.
Measure before you commit. &limit=100 on your real token and interval, timed, gives you the rate; the rate gives you the month. It takes a minute and beats any estimate on this page. Your included credits and the overage rate are on pricing, and usage is in console.dexpaprika.com.

Error codes

These arrive as an HTTP status with a JSON body, before the stream opens.
403 twice means two different things. A JSON body is our API telling you the plan is wrong. An unbranded Cloudflare page means the request never reached us: on a -pro host the edge only forwards requests whose Authorization value is a DexPaprika key, so the usual cause is an unset environment variable leaving the header empty. Recovery is immediate on the next request with a correct header.

In-stream events

Once the stream is open, HTTP status no longer applies. Branch on the event name. A handler that parses every data: line will try to read {"time":1757930400} as a candle.

Good practices

Key your store on timestamp and overwrite. This is the one rule that separates a correct consumer from a plausible one, because republished candles and an inclusive resume boundary both deliver a timestamp you already hold. Trust the heartbeat, not the socket. A dead TCP connection looks exactly like a quiet token, and on this feed a quiet token is the normal state. Pings arrive every 15 seconds; treat 45 seconds of silence as a disconnect. Let the id: line do the resuming. With EventSource you get it for free. Writing your own client, record the last id: and send it back as Last-Event-ID, rather than computing a since and having to handle the stricter validation yourself. Reconnect with backoff and jitter. A retry storm turns one rate limit into a persistent one. Start at a second, double to a minute. Pick the widest interval the product can live with. Sixty seconds of resolution for one sixtieth of the spend is the largest saving available on this endpoint, and most charts cannot render faster than the eye anyway. Treat the feed as a live tail. Fifteen minutes is all it remembers. Anything longer lives in your own store, written as candles arrive.

A working consumer

Handles resume, the republish rule, the heartbeat and backoff.

FAQs

No. /sse/ohlcv answers 403 to keyless callers and to free keys alike, and it is the only stream where registering a free key does not help. Token prices, pool reserves and swap transactions all have keyless or free-key paths; see streaming overview.
Two reasons, both expected. A swap that lands after its bucket was sealed causes the candle to be recomputed and republished under the same timestamp. Separately, resuming with Last-Event-ID or since is inclusive of that second, so the candle at the resume point is redelivered. Key your store on timestamp and overwrite.
Fifteen minutes. since older than that is refused with a 400; a Last-Event-ID older than that is clamped to the window rather than refused, so a client returning from a long outage still reconnects. Longer history is a REST query.
Up to. Both carry the same trades, so the multiplier only reaches sixty on a token that trades in every single second. On a quieter token the candle count is bounded by the number of swaps instead, and the two intervals converge. Plan your credit usage works through the arithmetic.
All 35 that DexPaprika indexes. The set matches GET /networks exactly, so there is no separate coverage list to check.

Where to go next

Endpoint reference

Every parameter, schema and event type.

Plan your credit usage

What a continuous stream costs, with worked models.

Upgrading to Pro

Moving a client to the paid hosts, and the one check that confirms it worked.

Swap transactions

The individual trades these candles are built from.