Esplora
rbitcoin Esplora-compatible REST
Blockstream Esplora / electrs HTTP API as served by rbitcoin, plus the
?asof= dialect.
Describes rbitcoin 0.8.99 (9eabc083e).
Plain HTTP on --esplora-listen (default off). TLS is a reverse proxy's
job. Behavior and intentional differences are owned by
COMPAT.md; this file describes the request and response shapes. If the two disagree, COMPAT.md and
the router in crates/rbitcoin-esplora/src/server.rs win.
Hashes
Every txid and block hash is 64 hex characters in display order (the order Core and
Esplora print). a-f and A-F are both accepted, as is an optional
0x or 0X prefix. A malformed hash in a path or in
?asof= returns 404 Not Found.
Chain-view headers
Pinned responses carry X-Bitcoin-Chain-Tip (block hash) and
X-Bitcoin-Chain-Tip-Height. Both are CORS-exposed. Block, tx, and header
routes stamp the live tip. /address/*, /scripthash/*,
/addresses/*, and /scripthashes/* stamp the scripthash-index
watermark, so the JSON matches the join that produced it, except
/address/{address}/txs/mempool and
/scripthash/{scripthash}/txs/mempool, which are not stamped. With
?asof=, the stamp is the as-of block. Public /mempool,
/mempool/txids, and /mempool/recent are not stamped.
/mempool/txids/page and /mempool/txids/page/{last_txid} are,
because the unstamped check is only /mempool and
/mempool/{one segment}. /fee-estimates, POST /tx,
and POST /txs/package are not stamped. /internal/mempool/* is
stamped. If two sequential fetches disagree on the hash, drop the batch and restart. If
the pin leaves the best chain mid-request, the response is 503
chain view moved. A handler error on a route that already took a pin still
carries the chain-tip headers. A bad ?asof= is rejected before that pin and
does not.
X-Powered-By
Every response, including errors, carries
X-Powered-By: rbitcoin-esplora/<version>-<hex>.
<version> is the crate version. <hex> is that
version with each byte written as two hex digits.
As-of (?asof=<blockhash>)
Answers "what did this wallet look like at this block", for a block that is still on the best chain. The confirmed join is pinned at that ancestor: later confirmations are invisible and the mempool is never included. The response headers carry the as-of hash and height.
-
Accepted only on the routes that declare the
asofparameter below:/tx/{txid}/status,/tx/{txid}/outspend/{vout},/tx/{txid}/outspends, and address/scripthash/,/utxo,/txs,/txs/chain[/{last}],/txs/summary[/{last}]. -
On any other route,
?asof=is 404 (for example/tx/{txid},/mempool,/address/{addr}/txs/mempool, and the POST multi-script routes). - An empty value, bad hex, an unknown hash, a hash that is not on the best chain, or (for address/scripthash routes) a block ahead of the visible scripthash index is 404. The server does not retry onto a sibling block at the same height, and it never serves a disconnected fork.
- If the as-of block is reorged out while the request runs, the response is 404 rather than 503.
The Electrum counterpart is a trailing asof:<blockhash> argument after
negotiating server.version(name, "1.4.2-asof"); see COMPAT.md.
Scripthash index
Address and scripthash routes need --sh-index. Without it they return
503 scripthash index disabled. Unpaged stats and
/utxo above --max-sh-creates are 503; paged
history is still served.
Errors
Error bodies are text/plain. Unknown paths are 404
Not Found.
Spec server: http://127.0.0.1:3000 (--esplora-listen 127.0.0.1:3000).
Generated from
docs/esplora-openapi.yaml. Download the OpenAPI file.
Blocks
GET /blocks/tip/height
Best-chain tip height
200 |
Decimal integer Sends the chain-tip headers.
string pattern |
|---|---|
503 |
No tip, mempool unavailable, scripthash index disabled,
string |
GET /blocks/tip/hash
Best-chain tip hash
200 |
64-character hex hash, chain-tip stamped Sends the chain-tip headers.
|
|---|---|
503 |
No tip, mempool unavailable, scripthash index disabled,
string |
GET /blocks
Ten newest block summaries, newest first
200 |
Block summaries Sends the chain-tip headers.
array of Block |
|---|
GET /blocks/{start_height}
Ten block summaries ending at start_height, newest first
A start_height above the tip is clamped down to the tip. The route does
not 404.
start_height |
Required path. integer minimum 0. |
|---|
200 |
Block summaries Sends the chain-tip headers.
array of Block |
|---|
GET /block-height/{height}
Best-chain block hash at a height
height |
Required path. integer minimum 0. |
|---|
200 |
64-character hex hash, chain-tip stamped Sends the chain-tip headers.
|
|---|---|
404 |
Unknown object, malformed hash, or
string |
GET /block/{hash}
Block summary (best chain only)
hash |
Required path. Hash |
|---|
200 |
Block summary Sends the chain-tip headers.
|
|---|---|
404 |
Unknown object, malformed hash, or
string |
GET /block/{hash}/header
80-byte block header as hex
hash |
Required path. Hash |
|---|
200 |
Hex string Sends the chain-tip headers.
string pattern |
|---|---|
404 |
Unknown object, malformed hash, or
string |
GET /block/{hash}/status
Whether the block is on the best chain
hash |
Required path. Hash |
|---|
200 |
Block status Sends the chain-tip headers.
|
|---|---|
404 |
Unknown object, malformed hash, or
string |
GET /block/{hash}/raw
Raw serialized block
hash |
Required path. Hash |
|---|
200 |
Consensus-serialized block Sends the chain-tip headers.
string format binary. |
|---|---|
404 |
Unknown object, malformed hash, or
string |
GET /block/{hash}/txids
All txids in block order
hash |
Required path. Hash |
|---|
200 |
Txids Sends the chain-tip headers.
array of Hash |
|---|---|
404 |
Unknown object, malformed hash, or
string |
GET /block/{hash}/txid/{index}
Txid at a position in the block
hash |
Required path. Hash |
|---|---|
index |
Required path. integer minimum 0. |
200 |
64-character hex hash, chain-tip stamped Sends the chain-tip headers.
|
|---|---|
404 |
Unknown object, malformed hash, or
string |
GET /block/{hash}/txs
First 25 transactions in the block
hash |
Required path. Hash |
|---|
200 |
Transactions. Chain-tip stamped. Sends the chain-tip headers.
array of Transaction |
|---|---|
404 |
Unknown object, malformed hash, or
string |
GET /block/{hash}/txs/{start_index}
25 transactions starting at start_index
start_index must be a multiple of 25 (400 otherwise); past the end is 404
start index out of range.
hash |
Required path. Hash |
|---|---|
start_index |
Required path. integer minimum 0. multiple of 25. |
200 |
Transactions. Chain-tip stamped. Sends the chain-tip headers.
array of Transaction |
|---|---|
400 |
Bad input
string |
404 |
Unknown object, malformed hash, or
string |
GET /block-template
getblocktemplate JSON (opt-in)
Only with --esplora-block-template; otherwise 404. Same JSON as RPC
getblocktemplate {"rules":["segwit"]}.
Cache-Control no-store; cached for 15 s.
200 |
Block template Sends the chain-tip headers.
object |
|---|---|
404 |
Unknown object, malformed hash, or
string |
503 |
No tip, mempool unavailable, scripthash index disabled,
string |
Transactions
GET /tx/{txid}
Transaction JSON
Falls back to the mempool. Below the seqsigwit prune point the body is a partial 200
with pruned: true, vout, and status.
sigops is omitted. fee, size, and
weight are present only when a txstat row was stored. vin is
omitted when no input edges were stored. When edges exist, each input is only
txid, vout, is_coinbase, and
prevout if the parent output is still stored: no scriptsig,
scriptsig_asm, witness, or sequence. Does
not accept ?asof= (404).
txid |
Required path. Hash |
|---|
200 |
Transaction Sends the chain-tip headers.
|
|---|---|
404 |
Unknown object, malformed hash, or
string |
GET /tx/{txid}/hex
Raw transaction as hex
txid |
Required path. Hash |
|---|
200 |
Hex string Sends the chain-tip headers.
string pattern |
|---|---|
404 |
Unknown object, malformed hash, or
string |
GET /tx/{txid}/raw
Raw transaction bytes
txid |
Required path. Hash |
|---|
200 |
Consensus-serialized transaction Sends the chain-tip headers.
string format binary. |
|---|---|
404 |
Unknown object, malformed hash, or
string |
GET /tx/{txid}/status
Confirmation status
Live: confirmed status at the tip, or {"confirmed": false} for
a mempool tx. With ?asof=: confirmed only if the tx is in a block at or
below the as-of block; a tx confirmed later reads
{"confirmed": false}.
txid |
Required path. Hash |
|---|---|
asof |
Optional query. Hash Block hash (display order) on the current best chain. Pins the answer at that block: no later confirmations and no mempool. Bad hex, an empty value, an unknown or reorged-out block, or (address/scripthash routes) a block ahead of the visible scripthash index → 404. |
200 |
Status Sends the chain-tip headers.
|
|---|---|
404 |
Malformed address, wrong network, bad hex, or an
string |
503 |
No tip, mempool unavailable, scripthash index disabled,
string |
GET /tx/{txid}/merkle-proof
Electrum-style merkle proof
txid |
Required path. Hash |
|---|
200 |
Merkle proof Sends the chain-tip headers.
|
|---|---|
404 |
Unknown object, malformed hash, or
string |
GET /tx/{txid}/merkleblock-proof
BIP37 merkleblock as hex
txid |
Required path. Hash |
|---|
200 |
Hex string Sends the chain-tip headers.
string pattern |
|---|---|
404 |
Unknown object, malformed hash, or
string |
GET /tx/{txid}/outspend/{vout}
Spend status of one output
Live: includes mempool spends of confirmed outputs. With ?asof=: only
spends confirmed at or below the as-of block; the mempool is ignored.
txid |
Required path. Hash |
|---|---|
vout |
Required path. integer minimum 0. |
asof |
Optional query. Hash Block hash (display order) on the current best chain. Pins the answer at that block: no later confirmations and no mempool. Bad hex, an empty value, an unknown or reorged-out block, or (address/scripthash routes) a block ahead of the visible scripthash index → 404. |
200 |
Outspend Sends the chain-tip headers.
|
|---|---|
404 |
Malformed address, wrong network, bad hex, or an
string |
GET /tx/{txid}/outspends
Spend status of every output
Same ?asof= semantics as /tx/{txid}/outspend/{vout}.
txid |
Required path. Hash |
|---|---|
asof |
Optional query. Hash Block hash (display order) on the current best chain. Pins the answer at that block: no later confirmations and no mempool. Bad hex, an empty value, an unknown or reorged-out block, or (address/scripthash routes) a block ahead of the visible scripthash index → 404. |
200 |
One entry per output, in vout order Sends the chain-tip headers.
array of Outspend |
|---|---|
404 |
Malformed address, wrong network, bad hex, or an
string |
GET /txs/outspends
Outspends for several txids (live only)
txids |
Required query. string Comma-separated txids, at most 50. A missing list or more than 50 ids is 400. A token that is not a hash is an empty array for that slot, not 400. |
|---|
200 |
One outspend array per txid, same order Sends the chain-tip headers.
array of array of Outspend |
|---|---|
400 |
Bad input
string |
Addresses
Address and scripthash history. Needs --sh-index.
GET /address/{address}
Address chain and mempool stats
With ?asof=, chain_stats are as of that block and
mempool_stats are all zero. A valid address with no history is 200 and
all counters are zero. 404 is a bad address or a bad asof.
address |
Required path. string Address on the node's network |
|---|---|
asof |
Optional query. Hash Block hash (display order) on the current best chain. Pins the answer at that block: no later confirmations and no mempool. Bad hex, an empty value, an unknown or reorged-out block, or (address/scripthash routes) a block ahead of the visible scripthash index → 404. |
200 |
Stats Sends the chain-tip headers.
|
|---|---|
404 |
Malformed address, wrong network, bad hex, or an
string |
503 |
No tip, mempool unavailable, scripthash index disabled,
string |
GET /scripthash/{scripthash}
Scripthash chain and mempool stats
With ?asof=, chain_stats are as of that block and
mempool_stats are all zero. A valid scripthash with no history is 200 and
all counters are zero. 404 is bad hex or a bad asof.
scripthash |
Required path. Hash Electrum scripthash (SHA256 of the scriptPubKey, byte-reversed hex) |
|---|---|
asof |
Optional query. Hash Block hash (display order) on the current best chain. Pins the answer at that block: no later confirmations and no mempool. Bad hex, an empty value, an unknown or reorged-out block, or (address/scripthash routes) a block ahead of the visible scripthash index → 404. |
200 |
Stats Sends the chain-tip headers.
|
|---|---|
404 |
Malformed address, wrong network, bad hex, or an
string |
503 |
No tip, mempool unavailable, scripthash index disabled,
string |
GET /address/{address}/utxo
Unspent outputs
Live: matches Electrum listunspent (adds mempool funding and drops
confirmed outputs spent in the mempool). With ?asof=: the UTXO set for
this script as of that block, with no mempool. A valid address with no unspent outputs
is 200 []. 404 is a bad address or a bad asof.
address |
Required path. string Address on the node's network |
|---|---|
asof |
Optional query. Hash Block hash (display order) on the current best chain. Pins the answer at that block: no later confirmations and no mempool. Bad hex, an empty value, an unknown or reorged-out block, or (address/scripthash routes) a block ahead of the visible scripthash index → 404. |
200 |
Unspent outputs Sends the chain-tip headers.
array of Utxo |
|---|---|
404 |
Malformed address, wrong network, bad hex, or an
string |
503 |
No tip, mempool unavailable, scripthash index disabled,
string |
GET /scripthash/{scripthash}/utxo
Unspent outputs
Same as /address/{address}/utxo.
scripthash |
Required path. Hash Electrum scripthash (SHA256 of the scriptPubKey, byte-reversed hex) |
|---|---|
asof |
Optional query. Hash Block hash (display order) on the current best chain. Pins the answer at that block: no later confirmations and no mempool. Bad hex, an empty value, an unknown or reorged-out block, or (address/scripthash routes) a block ahead of the visible scripthash index → 404. |
200 |
Unspent outputs Sends the chain-tip headers.
array of Utxo |
|---|---|
404 |
Malformed address, wrong network, bad hex, or an
string |
503 |
No tip, mempool unavailable, scripthash index disabled,
string |
GET /address/{address}/txs
Mempool txs (up to 50) then the first 25 confirmed, newest first
With ?asof=, only the confirmed page as of that block (no mempool rows).
address |
Required path. string Address on the node's network |
|---|---|
after_txid |
Optional query. Hash
Query cursor on |
asof |
Optional query. Hash Block hash (display order) on the current best chain. Pins the answer at that block: no later confirmations and no mempool. Bad hex, an empty value, an unknown or reorged-out block, or (address/scripthash routes) a block ahead of the visible scripthash index → 404. |
200 |
Transactions. Chain-tip stamped. Sends the chain-tip headers.
array of Transaction |
|---|---|
404 |
Malformed address, wrong network, bad hex, or an
string |
422 |
Body is
string |
503 |
No tip, mempool unavailable, scripthash index disabled,
string |
GET /scripthash/{scripthash}/txs
Mempool txs (up to 50) then the first 25 confirmed, newest first
With ?asof=, only the confirmed page as of that block (no mempool rows).
scripthash |
Required path. Hash Electrum scripthash (SHA256 of the scriptPubKey, byte-reversed hex) |
|---|---|
after_txid |
Optional query. Hash
Query cursor on |
asof |
Optional query. Hash Block hash (display order) on the current best chain. Pins the answer at that block: no later confirmations and no mempool. Bad hex, an empty value, an unknown or reorged-out block, or (address/scripthash routes) a block ahead of the visible scripthash index → 404. |
200 |
Transactions. Chain-tip stamped. Sends the chain-tip headers.
array of Transaction |
|---|---|
404 |
Malformed address, wrong network, bad hex, or an
string |
422 |
Body is
string |
503 |
No tip, mempool unavailable, scripthash index disabled,
string |
GET /address/{address}/txs/chain
25 confirmed txs, newest first
address |
Required path. string Address on the node's network |
|---|---|
asof |
Optional query. Hash Block hash (display order) on the current best chain. Pins the answer at that block: no later confirmations and no mempool. Bad hex, an empty value, an unknown or reorged-out block, or (address/scripthash routes) a block ahead of the visible scripthash index → 404. |
200 |
Transactions. Chain-tip stamped. Sends the chain-tip headers.
array of Transaction |
|---|---|
404 |
Malformed address, wrong network, bad hex, or an
string |
503 |
No tip, mempool unavailable, scripthash index disabled,
string |
GET
/address/{address}/txs/chain/{last_seen_txid}
Next 25 confirmed txs after last_seen_txid
A well-formed txid that is not in this script's confirmed history is 422
after_txid not found. 404 is a bad address, bad hex, or a bad
asof.
address |
Required path. string Address on the node's network |
|---|---|
last_seen_txid |
Required path. Hash |
asof |
Optional query. Hash Block hash (display order) on the current best chain. Pins the answer at that block: no later confirmations and no mempool. Bad hex, an empty value, an unknown or reorged-out block, or (address/scripthash routes) a block ahead of the visible scripthash index → 404. |
200 |
Transactions. Chain-tip stamped. Sends the chain-tip headers.
array of Transaction |
|---|---|
404 |
Malformed address, wrong network, bad hex, or an
string |
422 |
Body is
string |
503 |
No tip, mempool unavailable, scripthash index disabled,
string |
GET /scripthash/{scripthash}/txs/chain
25 confirmed txs, newest first
scripthash |
Required path. Hash Electrum scripthash (SHA256 of the scriptPubKey, byte-reversed hex) |
|---|---|
asof |
Optional query. Hash Block hash (display order) on the current best chain. Pins the answer at that block: no later confirmations and no mempool. Bad hex, an empty value, an unknown or reorged-out block, or (address/scripthash routes) a block ahead of the visible scripthash index → 404. |
200 |
Transactions. Chain-tip stamped. Sends the chain-tip headers.
array of Transaction |
|---|---|
404 |
Malformed address, wrong network, bad hex, or an
string |
503 |
No tip, mempool unavailable, scripthash index disabled,
string |
GET
/scripthash/{scripthash}/txs/chain/{last_seen_txid}
Next 25 confirmed txs after last_seen_txid
A well-formed txid that is not in this script's confirmed history is 422
after_txid not found. 404 is bad hex or a bad asof.
scripthash |
Required path. Hash Electrum scripthash (SHA256 of the scriptPubKey, byte-reversed hex) |
|---|---|
last_seen_txid |
Required path. Hash |
asof |
Optional query. Hash Block hash (display order) on the current best chain. Pins the answer at that block: no later confirmations and no mempool. Bad hex, an empty value, an unknown or reorged-out block, or (address/scripthash routes) a block ahead of the visible scripthash index → 404. |
200 |
Transactions. Chain-tip stamped. Sends the chain-tip headers.
array of Transaction |
|---|---|
404 |
Malformed address, wrong network, bad hex, or an
string |
422 |
Body is
string |
503 |
No tip, mempool unavailable, scripthash index disabled,
string |
GET /address/{address}/txs/mempool
Mempool txs for the address (up to 50)
Does not accept ?asof= (404). A bad address is 404
Not Found. A valid address with nothing in the mempool is 200
[]. These responses are not chain-tip stamped.
address |
Required path. string Address on the node's network |
|---|
200 |
Mempool transactions for one script. Not chain-tip stamped.
array of Transaction |
|---|---|
404 |
Unknown object, malformed hash, or
string |
503 |
No tip, mempool unavailable, scripthash index disabled,
string |
GET /scripthash/{scripthash}/txs/mempool
Mempool txs for the scripthash (up to 50)
Does not accept ?asof= (404). Bad hex is 404
Not Found. A valid scripthash with nothing in the mempool is 200
[]. These responses are not chain-tip stamped.
scripthash |
Required path. Hash Electrum scripthash (SHA256 of the scriptPubKey, byte-reversed hex) |
|---|
200 |
Mempool transactions for one script. Not chain-tip stamped.
array of Transaction |
|---|---|
404 |
Unknown object, malformed hash, or
string |
503 |
No tip, mempool unavailable, scripthash index disabled,
string |
GET /address/{address}/txs/summary
Compact confirmed history (rbitcoin dialect)
Not in Blockstream Esplora API.md; shaped like mempool.space
/address/:addr/txs/summary. Confirmed only, 25 per page, newest first.
Served above --max-sh-creates.
address |
Required path. string Address on the node's network |
|---|---|
after_txid |
Optional query. Hash
Query cursor on |
asof |
Optional query. Hash Block hash (display order) on the current best chain. Pins the answer at that block: no later confirmations and no mempool. Bad hex, an empty value, an unknown or reorged-out block, or (address/scripthash routes) a block ahead of the visible scripthash index → 404. |
200 |
Compact history rows, newest first Sends the chain-tip headers.
array of TxSummary |
|---|---|
404 |
Malformed address, wrong network, bad hex, or an
string |
422 |
Body is
string |
503 |
No tip, mempool unavailable, scripthash index disabled,
string |
GET
/address/{address}/txs/summary/{last_seen_txid}
Next compact page after last_seen_txid (rbitcoin dialect)
The cursor is the path segment only. ?after_txid= is ignored. An unknown
path txid is 422 after_txid not found.
address |
Required path. string Address on the node's network |
|---|---|
last_seen_txid |
Required path. Hash |
asof |
Optional query. Hash Block hash (display order) on the current best chain. Pins the answer at that block: no later confirmations and no mempool. Bad hex, an empty value, an unknown or reorged-out block, or (address/scripthash routes) a block ahead of the visible scripthash index → 404. |
200 |
Compact history rows, newest first Sends the chain-tip headers.
array of TxSummary |
|---|---|
404 |
Malformed address, wrong network, bad hex, or an
string |
422 |
Body is
string |
503 |
No tip, mempool unavailable, scripthash index disabled,
string |
GET /scripthash/{scripthash}/txs/summary
Compact confirmed history (rbitcoin dialect)
scripthash |
Required path. Hash Electrum scripthash (SHA256 of the scriptPubKey, byte-reversed hex) |
|---|---|
after_txid |
Optional query. Hash
Query cursor on |
asof |
Optional query. Hash Block hash (display order) on the current best chain. Pins the answer at that block: no later confirmations and no mempool. Bad hex, an empty value, an unknown or reorged-out block, or (address/scripthash routes) a block ahead of the visible scripthash index → 404. |
200 |
Compact history rows, newest first Sends the chain-tip headers.
array of TxSummary |
|---|---|
404 |
Malformed address, wrong network, bad hex, or an
string |
422 |
Body is
string |
503 |
No tip, mempool unavailable, scripthash index disabled,
string |
GET
/scripthash/{scripthash}/txs/summary/{last_seen_txid}
Next compact page after last_seen_txid (rbitcoin dialect)
The cursor is the path segment only. ?after_txid= is ignored. An unknown
path txid is 422 after_txid not found.
scripthash |
Required path. Hash Electrum scripthash (SHA256 of the scriptPubKey, byte-reversed hex) |
|---|---|
last_seen_txid |
Required path. Hash |
asof |
Optional query. Hash Block hash (display order) on the current best chain. Pins the answer at that block: no later confirmations and no mempool. Bad hex, an empty value, an unknown or reorged-out block, or (address/scripthash routes) a block ahead of the visible scripthash index → 404. |
200 |
Compact history rows, newest first Sends the chain-tip headers.
array of TxSummary |
|---|---|
404 |
Malformed address, wrong network, bad hex, or an
string |
422 |
Body is
string |
503 |
No tip, mempool unavailable, scripthash index disabled,
string |
POST /addresses/txs
Merged tx page for several addresses
Mempool rows first (up to 50 per script), then one merged page of 25 confirmed rows,
newest first. Does not accept ?asof= (404).
after_txid |
Optional query. Hash
Query cursor on |
|---|---|
X-Rbitcoin-Client |
Optional header. string Join-cache client id. Honored only on unix and loopback listeners; ignored on public TCP. |
| Body |
Required request body.
array of string (at most 300) |
|---|
200 |
Transactions. Chain-tip stamped. Sends the chain-tip headers.
array of Transaction |
|---|---|
400 |
Bad input
string |
413 |
Body too large
string |
422 |
Body is
string |
503 |
No tip, mempool unavailable, scripthash index disabled,
string |
POST /addresses/txs/summary
Merged compact page for several addresses (rbitcoin dialect)
after_txid |
Optional query. Hash
Query cursor on |
|---|---|
X-Rbitcoin-Client |
Optional header. string Join-cache client id. Honored only on unix and loopback listeners; ignored on public TCP. |
| Body |
Required request body.
array of string (at most 300) |
|---|
200 |
Compact history rows, newest first Sends the chain-tip headers.
array of TxSummary |
|---|---|
400 |
Bad input
string |
413 |
Body too large
string |
422 |
Body is
string |
503 |
No tip, mempool unavailable, scripthash index disabled,
string |
POST /scripthashes/txs
Merged tx page for several scripthashes
after_txid |
Optional query. Hash
Query cursor on |
|---|---|
X-Rbitcoin-Client |
Optional header. string Join-cache client id. Honored only on unix and loopback listeners; ignored on public TCP. |
| Body |
Required request body.
array of Hash (at most 300) |
|---|
200 |
Transactions. Chain-tip stamped. Sends the chain-tip headers.
array of Transaction |
|---|---|
400 |
Bad input
string |
413 |
Body too large
string |
422 |
Body is
string |
503 |
No tip, mempool unavailable, scripthash index disabled,
string |
POST /scripthashes/txs/summary
Merged compact page for several scripthashes (rbitcoin dialect)
after_txid |
Optional query. Hash
Query cursor on |
|---|---|
X-Rbitcoin-Client |
Optional header. string Join-cache client id. Honored only on unix and loopback listeners; ignored on public TCP. |
| Body |
Required request body.
array of Hash (at most 300) |
|---|
200 |
Compact history rows, newest first Sends the chain-tip headers.
array of TxSummary |
|---|---|
400 |
Bad input
string |
413 |
Body too large
string |
422 |
Body is
string |
503 |
No tip, mempool unavailable, scripthash index disabled,
string |
Mempool
GET /mempool
Mempool summary
200 |
Summary
|
|---|
GET /mempool/txids
All mempool txids
200 |
Txids
array of Hash |
|---|
GET /mempool/txids/page
First page of mempool txids in txid order
max_txs |
Optional query. integer
Page size. Omitted means 10000. Values above 10000 are capped at 10000, not
rejected. minimum 0. default 10000. |
|---|
200 |
Txids Sends the chain-tip headers.
array of Hash |
|---|
GET /mempool/txids/page/{last_txid}
Next page of mempool txids after last_txid
last_txid |
Required path. Hash |
|---|---|
max_txs |
Optional query. integer
Page size. Omitted means 10000. Values above 10000 are capped at 10000, not
rejected. minimum 0. default 10000. |
200 |
Txids Sends the chain-tip headers.
array of Hash |
|---|---|
400 |
Bad input
string |
GET /mempool/recent
Up to 10 most recently accepted mempool txs, newest first
200 |
Recent txs in accept order
array of object
|
|---|
GET /fee-estimates
Fee estimates by confirmation target
Keys are confirmation targets in blocks; values are sat/vB. Targets without an estimate are left out.
200 |
Estimates
object mapping to number
|
|---|---|
503 |
No tip, mempool unavailable, scripthash index disabled,
string |
Broadcast
POST /tx
Broadcast a raw transaction
| Body |
Required request body.
string raw transaction hex |
|---|
200 |
64-character hex hash
|
|---|---|
400 |
Bad input
string |
413 |
Body too large
string |
503 |
No tip, mempool unavailable, scripthash index disabled,
string |
POST /txs/test
Test mempool acceptance without admitting
One result per transaction. If the batch contains a duplicate txid, the body is a
single object with allowed: false and
package-error: package-contains-duplicates (no
reject-reason).
maxfeerate |
Optional query. number BTC/kvB. minimum 0. |
|---|
| Body |
Required request body.
array of string (at most 25) |
|---|
200 |
One result per transaction, or one object when the batch repeats a txid Sends the chain-tip headers.
array of TestAcceptResult |
|---|---|
400 |
Bad input
string |
413 |
Body too large
string |
503 |
No tip, mempool unavailable, scripthash index disabled,
string |
POST /txs/package
Submit a package (same path as RPC submitpackage)
| Body |
Required request body.
array of string (at most 25) |
|---|
200 |
Accepted txids
object
|
||
|---|---|---|---|
400 |
Bad input
string |
||
413 |
Body too large
string |
||
503 |
No tip, mempool unavailable, scripthash index disabled,
string |
Internal
electrs /internal/*. Mounted only on a unix-socket listener; on TCP these
are 404.
POST /internal/txs
Bulk tx JSON by txid (unknown ids omitted)
| Body |
Required request body.
array of Hash |
|---|
200 |
Transactions. Chain-tip stamped. Sends the chain-tip headers.
array of Transaction |
|---|---|
400 |
Bad input
string |
GET /internal/mempool/txs
First page of mempool tx JSON in txid order
max_txs |
Optional query. integer
Page size. Omitted means 10000. Values above 10000 are capped at 10000, not
rejected. minimum 0. default 10000. |
|---|
200 |
Transactions. Chain-tip stamped. Sends the chain-tip headers.
array of Transaction |
|---|
POST /internal/mempool/txs
Bulk mempool tx JSON by txid (mempool only)
| Body |
Required request body.
array of Hash |
|---|
200 |
Transactions. Chain-tip stamped. Sends the chain-tip headers.
array of Transaction |
|---|---|
400 |
Bad input
string |
GET /internal/mempool/txs/all
Every mempool tx JSON in txid order
200 |
Transactions. Chain-tip stamped. Sends the chain-tip headers.
array of Transaction |
|---|
GET /internal/mempool/txs/{last_txid}
Next page of mempool tx JSON after last_txid
last_txid |
Required path. Hash |
|---|---|
max_txs |
Optional query. integer
Page size. Omitted means 10000. Values above 10000 are capped at 10000, not
rejected. minimum 0. default 10000. |
200 |
Transactions. Chain-tip stamped. Sends the chain-tip headers.
array of Transaction |
|---|---|
400 |
Bad input
string |
GET /internal/block/{hash}/txs
Every tx in a block (public /block/{hash}/txs is 25 per page)
hash |
Required path. Hash |
|---|
200 |
Transactions. Chain-tip stamped. Sends the chain-tip headers.
array of Transaction |
|---|---|
404 |
Unknown object, malformed hash, or
string |
POST /internal/txs/outspends/by-txid
Outspends per txid (unknown txid → [])
| Body |
Required request body.
array of Hash |
|---|
200 |
One array per txid, same order Sends the chain-tip headers.
array of array of Outspend |
|---|---|
400 |
Bad input
string |
POST /internal/txs/outspends/by-outpoint
Outspend per txid:vout (malformed →
{"spent": false})
| Body |
Required request body.
array of string |
|---|
200 |
One outspend per outpoint, same order Sends the chain-tip headers.
array of Outspend |
|---|---|
400 |
Bad input
string |
Schemas
Named response and field shapes. A field that links here uses that shape.
Hash
Display-order hex. Uppercase and an optional 0x / 0X prefix
are accepted.
pattern ^(?:0[xX])?[0-9a-fA-F]{64}$.
Block
id |
Hash
Required. |
|---|---|
height |
integer
Required. |
version |
integer
Required. |
timestamp |
integer
Required. |
tx_count |
integer
Required. |
size |
integer
Required. BIP144 total size |
weight |
integer
Required. BIP141 weight |
merkle_root |
Hash
Required. |
previousblockhash |
Hash or null
Required. |
mediantime |
integer
Required. |
nonce |
integer
Required. |
bits |
integer
Required. compact target as u32 (not Core's hex string) |
difficulty |
number
Required. |
BlockStatus
in_best_chain |
boolean
Required. |
|---|---|
height |
integer or null
Required. |
next_best |
Hash or null
Required. |
TxStatus
confirmed |
boolean
Required. |
|---|---|
block_height |
integer |
block_hash |
Hash |
block_time |
integer |
Vout
scriptpubkey |
string
Required. |
|---|---|
scriptpubkey_asm |
string
Required. |
scriptpubkey_type |
string
Required.
one of |
scriptpubkey_address |
string |
value |
integer
Required. sats |
Vin
txid |
Hash
Required. |
|---|---|
vout |
integer
Required. |
is_coinbase |
boolean
Required. |
sequence |
integer |
scriptsig |
string |
scriptsig_asm |
string |
witness |
array of string |
inner_redeemscript_asm |
string |
inner_witnessscript_asm |
string |
prevout |
Vout or null |
Transaction
txid |
Hash
Required. |
|---|---|
version |
integer
Required. |
locktime |
integer
Required. |
size |
integer |
weight |
integer |
sigops |
integer |
fee |
integer
sats |
vin |
array of Vin
Full transactions always include this. A pruned transaction includes it only when input edges are stored, and those entries omit script and witness fields. |
vout |
array of Vout
Required. |
status |
TxStatus
Required. |
pruned |
boolean
Present and true below the seqsigwit prune point. |
MerkleProof
block_height |
integer
Required. |
|---|---|
merkle |
array of Hash
Required. |
pos |
integer
Required. |
Outspend
spent |
boolean
Required. |
|---|---|
txid |
Hash |
vin |
integer |
status |
TxStatus |
Utxo
txid |
Hash
Required. |
|---|---|
vout |
integer
Required. |
value |
integer
Required. |
status |
TxStatus
Required. |
Stats
tx_count |
integer
Required. |
|---|---|
funded_txo_count |
integer
Required. |
funded_txo_sum |
integer
Required. |
spent_txo_count |
integer
Required. |
spent_txo_sum |
integer
Required. |
AddressInfo
address |
string
present on /address/ |
|---|---|
scripthash |
Hash |
chain_stats |
Stats
Required. |
mempool_stats |
Stats
Required. |
TxSummary
txid |
Hash
Required. |
|---|---|
value |
integer
Required. net sats for this script in this tx (funded − spent) |
height |
integer
Required. |
time |
integer
Required. confirming header timestamp |
tx_position |
integer
index of the tx in its block |
MempoolInfo
count |
integer
Required. |
|---|---|
vsize |
integer
Required. |
total_fee |
integer
Required. |
fee_histogram |
array of array of [number, integer]
Required. |
TestAcceptResult
txid |
Hash
Required. |
||
|---|---|---|---|
wtxid |
Hash
Required. |
||
allowed |
boolean
Required. |
||
vsize |
integer
Present when |
||
fees |
object
Present when
|
||
reject-reason |
string
Policy or fee failure, including |
||
package-error |
string
Set to |