Streams
Live subscriptions to heads, blocks, transactions, logs, transfers, AMM events, creations and launches, with filters you can change without reconnecting.
Live subscriptions publish new records alongside snapshot-based reads.
Topics
| Topic | Emits |
|---|---|
heads | Canonical head movement |
blocks | New canonical blocks |
transactions | New transactions |
logs | New logs |
transfers | New token transfers |
amm-events | New swaps and liquidity events |
creations | New contract and token creations |
launches | Launch lifecycle transitions: new, graduating, graduated |
candles | Live candle state per named token or pool series: a snapshot on connect, then updates and a final close per bucket |
Topics isolate slow consumers. Each has a single-topic /stream/ route; all except heads support /stream/subscribe. AMM spelling: /stream/amm-events path, amm_events multiplexed select/resume topic.
One connection, several topics
GET /stream/subscribe multiplexes topics. Change an open subscription's filters without reconnecting or creating a reconnect gap:
POST /stream/subscribe/{topic}/{id}/selectorsConfirmation
Speculative observations precede execution and may revert. Confirmed events pass receipt/root verification. Require confirmed records for confirmation-dependent actions; early observations support speculative live views. See overview.
Recovering after a disconnect
Durable SSE id:: v1.<namespace>.<sequence>, bound to topic/store. Persist only after durable application processing.
| Route | Resume with |
|---|---|
| Single-topic streams | after_sequence=<sequence> (the number at the end of the ID), or the full ID in the Last-Event-ID header when after_sequence is absent |
/stream/subscribe | resume=<topic>:<full ID>, one entry per topic. Last-Event-ID alone is not honoured here |
Browser EventSource automatically resends Last-Event-ID. Unusable headers (bare numbers, wrong topics, or any header on multiplexed subscribe) open live with initial event: resume_unsupported, identifying the supported resume form.
- Heads: non-durable; a reconnect across an API restart reports a gap.
- Candles: no resume cursor;
candlesinresumereturns400. Each connection opens with a snapshot of the previous and forming bucket of each selected series, only for buckets that traded. A quiet series gets only keep-alives until its next trade, so silence means no recent trades, not a bad selector (an invalid selector gets400). - Slow/incomplete catch-up:
event: lagnames the last delivered sequence. - Explicit cursor below retention:
after_sequence/resumereturns400with the lowest retained sequence. - Header below retention: opens live with initial
event: lag,reason: resume_cursor_below_retention_floor, requested sequence, andretentionFloor. This avoids browserEventSourcestopping retries after4xx.
Backfill every gap through indexed reads, then reopen. Sequence gaps remain unhealthy until canonical blocks/receipts are reconciled.