Skip to content

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 ​

http
GET /v1/stream/prices?tokens=SOL,WBTC,ETH
x-api-key: YOUR_API_KEY

Browser-native EventSource cannot set custom headers. For browser clients, use ?apiKey=YOUR_API_KEY instead.

Query parameters ​

FieldTypeRequiredDefaultDescription
tokensstringNoall tracked tokensComma-separated tracked token symbols and/or mint addresses (max 50 mint addresses per connection)
includeOptimisticbooleanNofalseInclude optimistic pre-confirmation price updates
dedupThresholdnumberNoserver defaultClient-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 ​

Eventdata payloadDescription
ready{"ts": <ms>}Stream accepted; sent immediately on connect
priceprice 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 ​

text
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 ​

confidenceMeaning
optimisticPre-confirmation predicted state, usually the lowest-latency update
confirmedPrice 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 ​

bash
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 ​

StatusDescription
400No valid tokens, unknown mint(s), or too many mint subscriptions
401Missing or invalid API key
429SSE connection limit exceeded

Rate Limit ​

Counts against the SSE streams connection limit in Plans & Rate Limits.