Stream routes
Live subscriptions to heads, blocks, transactions, logs, transfers, AMM events, creations, launches and live candles.
Push access to the same records the read routes serve. Prefer the multiplexed subscription over one connection per entity: each key may hold only a handful of open streams at once (eight by default), and one stream too many answers 429 without a Retry-After. One connection counts once however many topics and selectors it carries, so a client watching fifty tokens puts them on one subscription rather than fifty connections. Durable IDs are topic- and store-generation-bound; idle streams send keep-alive comments, and lagging consumers receive an explicit lag event before backfilling through REST. See Streams for the concepts.
11 routes. Every path below is served under /index/v1/{chain}, and every request carries an x-api-key header, so those two are not repeated per route. The shared contract for pagination, snapshots, precision and absence is in Read API.
AMM Events
GET /stream/amm-eventsNew swaps and liquidity events; each swap frame carries sender, origin (the transaction sender, null outside tx-origin coverage) and transactionHash.
| Parameter | In | Required | Notes |
|---|---|---|---|
tokens | query | no | Query parameters selecting one subscription's bounded watchlist. tokens, pools, wallets, and launchpads are comma-separated. A pool entry is either 0xcontract (V2/V3, or V4 with an implicit zero PoolId) or 0xmanager:0xpoolid (V4). A launchpad entry is its canonical, config-facing name (e.g. trench, flap): matching a swap only when that swap's pool contract is the launchpad's own shared curve/portal address. all=true subscribes to every event of this topic regardless of any other selector, the "all" bucket, and alone satisfies the "at least one selector" requirement. min_leg_magnitude is the one permitted non-invertible filter: a decimal-string floor on swap_magnitude, the larger of the swap's two raw pool-side deltas, in that leg's own base units, applied only after a selector already matched. This is deliberately NOT quote-native and NOT decimal-scaled: it does not resolve which leg is the quote asset or how many decimals either token uses, so the same raw value means a wildly different real-world size depending on which leg happens to be larger and that leg's decimals. after_sequence resumes a reconnecting consumer from its last delivered resume cursor, bounded by a fixed number of rows of durable catch-up; a consumer further behind than that must backfill via REST before resuming. When it is absent, the request's Last-Event-ID header supplies it instead, which is how a browser's native EventSource resumes, since it can only reconnect to the URL it was built with. An explicit after_sequence always wins. |
pools | query | no | Query parameters selecting one subscription's bounded watchlist. tokens, pools, wallets, and launchpads are comma-separated. A pool entry is either 0xcontract (V2/V3, or V4 with an implicit zero PoolId) or 0xmanager:0xpoolid (V4). A launchpad entry is its canonical, config-facing name (e.g. trench, flap): matching a swap only when that swap's pool contract is the launchpad's own shared curve/portal address. all=true subscribes to every event of this topic regardless of any other selector, the "all" bucket, and alone satisfies the "at least one selector" requirement. min_leg_magnitude is the one permitted non-invertible filter: a decimal-string floor on swap_magnitude, the larger of the swap's two raw pool-side deltas, in that leg's own base units, applied only after a selector already matched. This is deliberately NOT quote-native and NOT decimal-scaled: it does not resolve which leg is the quote asset or how many decimals either token uses, so the same raw value means a wildly different real-world size depending on which leg happens to be larger and that leg's decimals. after_sequence resumes a reconnecting consumer from its last delivered resume cursor, bounded by a fixed number of rows of durable catch-up; a consumer further behind than that must backfill via REST before resuming. When it is absent, the request's Last-Event-ID header supplies it instead, which is how a browser's native EventSource resumes, since it can only reconnect to the URL it was built with. An explicit after_sequence always wins. |
wallets | query | no | Query parameters selecting one subscription's bounded watchlist. tokens, pools, wallets, and launchpads are comma-separated. A pool entry is either 0xcontract (V2/V3, or V4 with an implicit zero PoolId) or 0xmanager:0xpoolid (V4). A launchpad entry is its canonical, config-facing name (e.g. trench, flap): matching a swap only when that swap's pool contract is the launchpad's own shared curve/portal address. all=true subscribes to every event of this topic regardless of any other selector, the "all" bucket, and alone satisfies the "at least one selector" requirement. min_leg_magnitude is the one permitted non-invertible filter: a decimal-string floor on swap_magnitude, the larger of the swap's two raw pool-side deltas, in that leg's own base units, applied only after a selector already matched. This is deliberately NOT quote-native and NOT decimal-scaled: it does not resolve which leg is the quote asset or how many decimals either token uses, so the same raw value means a wildly different real-world size depending on which leg happens to be larger and that leg's decimals. after_sequence resumes a reconnecting consumer from its last delivered resume cursor, bounded by a fixed number of rows of durable catch-up; a consumer further behind than that must backfill via REST before resuming. When it is absent, the request's Last-Event-ID header supplies it instead, which is how a browser's native EventSource resumes, since it can only reconnect to the URL it was built with. An explicit after_sequence always wins. |
launchpads | query | no | Query parameters selecting one subscription's bounded watchlist. tokens, pools, wallets, and launchpads are comma-separated. A pool entry is either 0xcontract (V2/V3, or V4 with an implicit zero PoolId) or 0xmanager:0xpoolid (V4). A launchpad entry is its canonical, config-facing name (e.g. trench, flap): matching a swap only when that swap's pool contract is the launchpad's own shared curve/portal address. all=true subscribes to every event of this topic regardless of any other selector, the "all" bucket, and alone satisfies the "at least one selector" requirement. min_leg_magnitude is the one permitted non-invertible filter: a decimal-string floor on swap_magnitude, the larger of the swap's two raw pool-side deltas, in that leg's own base units, applied only after a selector already matched. This is deliberately NOT quote-native and NOT decimal-scaled: it does not resolve which leg is the quote asset or how many decimals either token uses, so the same raw value means a wildly different real-world size depending on which leg happens to be larger and that leg's decimals. after_sequence resumes a reconnecting consumer from its last delivered resume cursor, bounded by a fixed number of rows of durable catch-up; a consumer further behind than that must backfill via REST before resuming. When it is absent, the request's Last-Event-ID header supplies it instead, which is how a browser's native EventSource resumes, since it can only reconnect to the URL it was built with. An explicit after_sequence always wins. |
all | query | no | all=true subscribes to every event of this topic regardless of any other selector: the "all" bucket, and alone satisfies this route's "at least one selector" requirement. |
min_leg_magnitude | query | no | Query parameters selecting one subscription's bounded watchlist. tokens, pools, wallets, and launchpads are comma-separated. A pool entry is either 0xcontract (V2/V3, or V4 with an implicit zero PoolId) or 0xmanager:0xpoolid (V4). A launchpad entry is its canonical, config-facing name (e.g. trench, flap): matching a swap only when that swap's pool contract is the launchpad's own shared curve/portal address. all=true subscribes to every event of this topic regardless of any other selector, the "all" bucket, and alone satisfies the "at least one selector" requirement. min_leg_magnitude is the one permitted non-invertible filter: a decimal-string floor on swap_magnitude, the larger of the swap's two raw pool-side deltas, in that leg's own base units, applied only after a selector already matched. This is deliberately NOT quote-native and NOT decimal-scaled: it does not resolve which leg is the quote asset or how many decimals either token uses, so the same raw value means a wildly different real-world size depending on which leg happens to be larger and that leg's decimals. after_sequence resumes a reconnecting consumer from its last delivered resume cursor, bounded by a fixed number of rows of durable catch-up; a consumer further behind than that must backfill via REST before resuming. When it is absent, the request's Last-Event-ID header supplies it instead, which is how a browser's native EventSource resumes, since it can only reconnect to the URL it was built with. An explicit after_sequence always wins. |
after_sequence | query | no | Resumes a reconnecting consumer from its own last-delivered event sequence number, bounded by a fixed number of rows of durable catch-up; a consumer further behind than that must backfill via REST before resuming. |
Blocks
GET /stream/blocksNew canonical blocks.
| Parameter | In | Required | Notes |
|---|---|---|---|
after_sequence | query | no | Resumes a reconnecting consumer from its own last-delivered event sequence number, bounded by a fixed number of rows of durable catch-up; a consumer further behind than that must backfill via REST before resuming. |
Stream Candles
GET /stream/candlesLive candles per named series (select=token:0x..:1m[:0xquote], pool:0x..:1h): a snapshot of the previous and forming bucket on connect, then update frames (at most one per 250 ms per series) and a close frame (final: true) when the head leaves the bucket. candle is the REST compact row. No resume cursor.
The candles topic of /stream/subscribe takes the same selectors, including selector mutation.
| Parameter | In | Required | Notes |
|---|---|---|---|
select | query | yes | Comma-separated series: token:0x<token>:<frame>[:0x<quote>] or pool:<id>:<frame>, where <id> is a pool address or V4 0x<manager>:0x<poolId> and <frame> is any frame the REST candle routes serve. |
Creations
GET /stream/creationsNew contract and token creations.
| Parameter | In | Required | Notes |
|---|---|---|---|
contracts | query | no | Query parameters selecting one creations subscription's bounded watchlist: contracts (the created address) and wallets (the recovered creator, when known). |
wallets | query | no | Query parameters selecting one creations subscription's bounded watchlist: contracts (the created address) and wallets (the recovered creator, when known). |
all | query | no | all=true subscribes to every event of this topic regardless of any other selector: the "all" bucket, and alone satisfies this route's "at least one selector" requirement. |
after_sequence | query | no | Resumes a reconnecting consumer from its own last-delivered event sequence number, bounded by a fixed number of rows of durable catch-up; a consumer further behind than that must backfill via REST before resuming. |
Heads
GET /stream/headsCanonical head movement.
Launches
GET /stream/launchesLaunch lifecycle transitions (launch_new frames carry the normalised metadataUri plus imageUri/imageProvenance): new, graduating, graduated.
| Parameter | In | Required | Notes |
|---|---|---|---|
tokens | query | no | Query parameters selecting one launch-lifecycle subscription's bounded watchlist: tokens and launchpads (watch exactly these launchpads). exclude_launchpads is the other direction: everything EXCEPT these launchpads, a bounded post-match bitset rather than an inverted-index key. Naming the same launchpad in both is not an error: exclusion always wins, since it is checked after any key match, include or otherwise. |
launchpads | query | no | Query parameters selecting one launch-lifecycle subscription's bounded watchlist: tokens and launchpads (watch exactly these launchpads). exclude_launchpads is the other direction: everything EXCEPT these launchpads, a bounded post-match bitset rather than an inverted-index key. Naming the same launchpad in both is not an error: exclusion always wins, since it is checked after any key match, include or otherwise. |
exclude_launchpads | query | no | Query parameters selecting one launch-lifecycle subscription's bounded watchlist: tokens and launchpads (watch exactly these launchpads). exclude_launchpads is the other direction: everything EXCEPT these launchpads, a bounded post-match bitset rather than an inverted-index key. Naming the same launchpad in both is not an error: exclusion always wins, since it is checked after any key match, include or otherwise. |
all | query | no | all=true subscribes to every event of this topic regardless of any other selector: the "all" bucket, and alone satisfies this route's "at least one selector" requirement. |
after_sequence | query | no | Resumes a reconnecting consumer from its own last-delivered event sequence number, bounded by a fixed number of rows of durable catch-up; a consumer further behind than that must backfill via REST before resuming. |
Logs
GET /stream/logsNew logs.
| Parameter | In | Required | Notes |
|---|---|---|---|
addresses | query | no | Query parameters selecting one logs subscription's bounded watchlist: addresses (emitting contract) and topics (topic0, the event signature). |
topics | query | no | Query parameters selecting one logs subscription's bounded watchlist: addresses (emitting contract) and topics (topic0, the event signature). |
all | query | no | all=true subscribes to every event of this topic regardless of any other selector: the "all" bucket, and alone satisfies this route's "at least one selector" requirement. |
after_sequence | query | no | Resumes a reconnecting consumer from its own last-delivered event sequence number, bounded by a fixed number of rows of durable catch-up; a consumer further behind than that must backfill via REST before resuming. |
Multiplex Subscribe
GET /stream/subscribeOne multiplexed connection across several topics; connected, then per-topic stalled/resumed control frames.
| Parameter | In | Required | Notes |
|---|---|---|---|
select | query | yes | Query parameters opening one cross-topic multiplexed subscription. select is a required, comma-separated list of topic:dimension:value triples (or topic:all for a topic's global bucket), e.g. amm_events:token:0xAAA...,transfers:wallet:0xBBB...,blocks:all. Valid topic names are amm_events, blocks, transactions, logs, transfers, creations, launches, candles (candle selectors use the series grammar of /stream/candles, and candles cannot be named in resume); valid dimensions are token, pool (a bare 0xcontract or a V4 0xmanager:0xpoolid), wallet, launchpad, address, topic0, and all. min_leg_magnitude applies only to any amm_events selectors named (an error if given without one)). resume is an optional comma-separated topic:v1.topicNamespace.sequence list resuming a reconnecting consumer's bounded per-topic catch-up; a topic named in resume must also appear in select. It is the ONLY way to resume this route: a Last-Event-ID header without it cannot be attributed to a topic, so the connection is served live and told in band that the header was not honoured, rather than either resuming a guessed topic or being refused. |
min_leg_magnitude | query | no | Query parameters opening one cross-topic multiplexed subscription. select is a required, comma-separated list of topic:dimension:value triples (or topic:all for a topic's global bucket), e.g. amm_events:token:0xAAA...,transfers:wallet:0xBBB...,blocks:all. Valid topic names are amm_events, blocks, transactions, logs, transfers, creations, launches, candles (candle selectors use the series grammar of /stream/candles, and candles cannot be named in resume); valid dimensions are token, pool (a bare 0xcontract or a V4 0xmanager:0xpoolid), wallet, launchpad, address, topic0, and all. min_leg_magnitude applies only to any amm_events selectors named (an error if given without one)). resume is an optional comma-separated topic:v1.topicNamespace.sequence list resuming a reconnecting consumer's bounded per-topic catch-up; a topic named in resume must also appear in select. It is the ONLY way to resume this route: a Last-Event-ID header without it cannot be attributed to a topic, so the connection is served live and told in band that the header was not honoured, rather than either resuming a guessed topic or being refused. |
resume | query | no | Query parameters opening one cross-topic multiplexed subscription. select is a required, comma-separated list of topic:dimension:value triples (or topic:all for a topic's global bucket), e.g. amm_events:token:0xAAA...,transfers:wallet:0xBBB...,blocks:all. Valid topic names are amm_events, blocks, transactions, logs, transfers, creations, launches, candles (candle selectors use the series grammar of /stream/candles, and candles cannot be named in resume); valid dimensions are token, pool (a bare 0xcontract or a V4 0xmanager:0xpoolid), wallet, launchpad, address, topic0, and all. min_leg_magnitude applies only to any amm_events selectors named (an error if given without one)). resume is an optional comma-separated topic:v1.topicNamespace.sequence list resuming a reconnecting consumer's bounded per-topic catch-up; a topic named in resume must also appear in select. It is the ONLY way to resume this route: a Last-Event-ID header without it cannot be attributed to a topic, so the connection is served live and told in band that the header was not honoured, rather than either resuming a guessed topic or being refused. |
Mutate Selectors
POST /stream/subscribe/{topic}/{id}/selectorsMutates the filter set of an already-open subscription without reconnecting.
| Parameter | In | Required | Notes |
|---|---|---|---|
topic | path | yes | Stream topic name, as listed under Topics. |
id | path | yes | Stream subscription id, minted by GET /stream/subscribe or a single-topic stream's x-subscription-id response header. |
add | query | no | Query parameters mutating one already-open topic subscription of a live connection: add and remove are comma-separated dimension[:value] fragments (using /stream/subscribe's selector grammar minus the topic prefix; the topic is the path segment here). Removals apply before additions, so swapping one selector for another in a single call never transiently exceeds the subscription limits. |
remove | query | no | Query parameters mutating one already-open topic subscription of a live connection: add and remove are comma-separated dimension[:value] fragments (using /stream/subscribe's selector grammar minus the topic prefix; the topic is the path segment here). Removals apply before additions, so swapping one selector for another in a single call never transiently exceeds the subscription limits. |
Transactions
GET /stream/transactionsNew transactions.
| Parameter | In | Required | Notes |
|---|---|---|---|
wallets | query | no | Query parameters selecting one transactions subscription's bounded watchlist. wallets matches either the transaction's origin or its recipient. |
all | query | no | all=true subscribes to every event of this topic regardless of any other selector: the "all" bucket, and alone satisfies this route's "at least one selector" requirement. |
after_sequence | query | no | Resumes a reconnecting consumer from its own last-delivered event sequence number, bounded by a fixed number of rows of durable catch-up; a consumer further behind than that must backfill via REST before resuming. |
Transfers
GET /stream/transfersNew token transfers; each transfer frame carries transactionHash.
| Parameter | In | Required | Notes |
|---|---|---|---|
tokens | query | no | Query parameters selecting one transfers subscription's bounded watchlist: tokens and wallets (either leg). |
wallets | query | no | Query parameters selecting one transfers subscription's bounded watchlist: tokens and wallets (either leg). |
all | query | no | all=true subscribes to every event of this topic regardless of any other selector: the "all" bucket, and alone satisfies this route's "at least one selector" requirement. |
after_sequence | query | no | Resumes a reconnecting consumer from its own last-delivered event sequence number, bounded by a fixed number of rows of durable catch-up; a consumer further behind than that must backfill via REST before resuming. |