btcintel

Live updates (server-sent events)

GET /v1/stream
quién puede llamarla
Cualquiera
A User-Agent that claims a search or AI crawler is refused with 403.
qué cuesta
1 petición de la cuota
Counted once, when the stream opens; its events are not counted. How many streams a caller holds at once is capped by tier. · niveles y claves
cuán reciente
Nunca en caché
cada respuesta lleva la altura del índice y la del nodo
Herramienta MCP
Ninguna
En esta página

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: 3000 and one snapshot per topic and per transaction whose state is known.
  • Then block, mempool, projected and fees (each only when it changed, at most one per reprojection) and tx.
  • Every event has an id of <boot>-<seq>. There is no replay: Last-Event-ID is 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-Agent claims a search or AI crawler is refused with 403 forbidden; a crawler reads the page.

Parámetros

NombreDóndeTipoObligatorioQué hace
topicsconsultastringopcionalComma-separated: block, mempool, projected, fees. A stream needs topics or tx (400 otherwise).
txconsultastringopcionalUp to 16 comma-separated txids.

Qué responde

200 · text/event-stream

The stream. Events: snapshot (StreamSnapshot), block (StreamBlockEvent), mempool (StreamMempoolEvent), projected (StreamProjectedEvent), fees (StreamFeesEvent), tx (StreamTxEvent).

Cabeceras: Cache-Control, X-Accel-Buffering

esquema

array de uno de — The stream as a sequence of events; each item is one event's data, named by its event: line.

Ausente y vacío

El casoEn la respuesta
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}.

Errores

EstadoCódigoCuándo
400invalid_inputMalformed input (invalid_input).
403forbiddenforbidden: the User-Agent claims a search or AI crawler; the stream is for browsers and for agents with a key.
429quota_exceededquota_exceeded: the caller or the server holds as many streams as allowed (Retry-After: 30), or the caller's request quota ran out.
501not_configurednot_configured: the mempool engine is not enabled (BITCOIN_ZMQ_SEQUENCE unset), or the stream is off (STREAM_MAX_CLIENTS=0).
503index_unavailableindex_unavailable: the mempool engine is bootstrapping; retry shortly.

Cada uno llega en el sobre de error único, y ninguno se guarda en caché: un error lleva Cache-Control: no-store.

Ejemplo

Solo curl: -N imprime cada evento según llega. Detenlo con Ctrl-C.

curl -sN 'https://api.btcintel.io/v1/stream?topics=block,fees'