GET /v1/stream/prices
Stream real-time price updates via SSE — for tracked token symbols or any indexed mint address, same coverage as /v1/prices.
Request
GET /v1/stream/prices?tokens=SOL,WBTC,ETH
x-api-key: YOUR_API_KEYBrowser-native EventSource cannot set custom headers. For browser clients, use ?apiKey=YOUR_API_KEY instead.
Query parameters
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
tokens | string | No | all tracked tokens | Comma-separated tracked token symbols and/or mint addresses (max 50 mint addresses per connection) |
includeOptimistic | boolean | No | false | Include optimistic pre-confirmation price updates |
dedupThreshold | number | No | server default | Client-side override for price dedup sensitivity |
When tokens is omitted, the stream subscribes to every tracked token and sends an initial snapshot on connect.
Mint addresses are case-sensitive. A mint that resolves to a tracked token streams as that token (its frames carry the catalog symbol in token); any other indexed mint streams with token set to the mint itself. A tokens entry that is not a valid mint is rejected with 400 at connect time — a successful ready means every subscription is live.
Events
| Event | data payload | Description |
|---|---|---|
ready | {"ts": <ms>} | Stream accepted; sent immediately on connect |
price | price object (below) | Token price update |
heartbeat | {"ts": <ms>} | Connection keepalive, every 15s |
All events — including ready and heartbeat — carry a data: JSON payload. Filter by event name, not by the presence of data.
Example payload
event: price
data: {"token":"SOL","mint":"So11111111111111111111111111111111111111112","priceUsd":80.31,"bestBid":80.07,"bestAsk":80.54,"bestBidPool":"BmXV...","bestAskPool":"Ahho...","bestBidDex":"orca-whirlpool","bestAskDex":"orca-whirlpool","bestBidFeeBps":1,"bestAskFeeBps":1,"poolCacheAgeMs":150,"confidence":"confirmed","poolCount":31,"timestamp":1712000000000,"route":"direct","change24h":-1.42}Every price frame carries mint — the canonical mint address of the priced token. Key your client on mint: it is stable regardless of whether the subscription used a symbol or a mint address, so no reverse symbol→mint lookup is needed.
Confidence model
confidence | Meaning |
|---|---|
optimistic | Pre-confirmation predicted state, usually the lowest-latency update |
confirmed | Price derived from confirmed observed pool state |
Optimistic prices are usually followed quickly by the matching confirmed price. Consumers that need strict consistency can ignore optimistic.
Example
curl -N -H "x-api-key: YOUR_API_KEY" \
"https://api.venum.dev/v1/stream/prices?tokens=SOL,WBTC"
# Any indexed mint (tokenized equities, long-tail tokens, ...)
curl -N -H "x-api-key: YOUR_API_KEY" \
"https://api.venum.dev/v1/stream/prices?tokens=Xs3oZwbHvqis4NYcf4YKWmEia2eC84wSiVrcYcTqpH8"
# Browser/EventSource fallback
curl -N \
"https://api.venum.dev/v1/stream/prices?tokens=SOL,WBTC&apiKey=YOUR_API_KEY"Errors
| Status | Description |
|---|---|
400 | No valid tokens, unknown mint(s), or too many mint subscriptions |
401 | Missing or invalid API key |
429 | SSE connection limit exceeded |
Rate Limit
Counts against the SSE streams connection limit in Plans & Rate Limits.
