Live updates (server-sent events)
GET /v1/stream- who may call it
- Anyone
- A
User-Agentthat claims a search or AI crawler is refused with 403. - what it costs
- 1 request of the quota
- Counted once, when the stream opens; its events are not counted. How many streams a caller holds at once is capped by tier. · tiers and keys
- how fresh
- Never cached
- every answer carries the index's height and the node's
- MCP tool
- None
One server-sent event stream of the tip, the mempool, the projection, the fees and the state of up to 16 transactions, from the mempool engine. Each event's data is one JSON object (the Stream* schemas) whose at is when the engine applied the change.
- The stream opens with
retry: 3000and onesnapshotper topic and per transaction whose state is known. - Then
block,mempool,projectedandfees(each only when it changed, at most one per reprojection) andtx. - Every event has an
idof<boot>-<seq>. There is no replay:Last-Event-IDis ignored and a reconnect gets a fresh snapshot. - A comment line goes out every 15 s. The stream closes after six hours, or once the client falls 16 events behind, and the client reconnects.
- Concurrent streams per caller: t0 2, t1 4, t2 and t3 10, t4 50, under a server-wide cap. Opening a stream counts as one request of the quota; events do not.
- The stream is for browsers and for agents with a key: a request whose
User-Agentclaims a search or AI crawler is refused with 403forbidden; a crawler reads the page.
Parameters
| Name | Where | Type | Required | What it does |
|---|---|---|---|---|
topics | query | string | optional | Comma-separated: block, mempool, projected, fees. A stream needs topics or tx (400 otherwise). |
tx | query | string | optional | Up to 16 comma-separated txids. |
What it answers
200 · text/event-stream
The stream. Events: snapshot (StreamSnapshot), block (StreamBlockEvent), mempool (StreamMempoolEvent), projected (StreamProjectedEvent), fees (StreamFeesEvent), tx (StreamTxEvent).
Headers: Cache-Control, X-Accel-Buffering
schema
array of one of — The stream as a sequence of events; each item is one event's data, named by its event: line.
Absent and empty
| The case | In the answer |
|---|---|
| A transaction asked for that the engine does not know: never seen, or in a block before the stream opened. | No snapshot for it; read GET /v1/tx/{txid}. |
Errors
| Status | Code | When |
|---|---|---|
| 400 | invalid_input | Malformed input (invalid_input). |
| 403 | forbidden | forbidden: the User-Agent claims a search or AI crawler; the stream is for browsers and for agents with a key. |
| 429 | quota_exceeded | quota_exceeded: the caller or the server holds as many streams as allowed (Retry-After: 30), or the caller's request quota ran out. |
| 501 | not_configured | not_configured: the mempool engine is not enabled (BITCOIN_ZMQ_SEQUENCE unset), or the stream is off (STREAM_MAX_CLIENTS=0). |
| 503 | index_unavailable | index_unavailable: the mempool engine is bootstrapping; retry shortly. |
Each comes in the one error envelope, and none is cached: an error carries Cache-Control: no-store.
Example
curl alone: -N prints each event as it arrives. Stop it with Ctrl-C.
curl -sN 'https://api.btcintel.io/v1/stream?topics=block,fees'