rbitcoin

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.

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

Responses
200

Decimal integer

Sends the chain-tip headers.

text/plain

string

pattern ^[0-9]+$.

503

No tip, mempool unavailable, scripthash index disabled, --max-sh-creates exceeded, or chain view moved

text/plain

string

GET /blocks/tip/hash

Best-chain tip hash

Responses
200

64-character hex hash, chain-tip stamped

Sends the chain-tip headers.

text/plain

Hash

503

No tip, mempool unavailable, scripthash index disabled, --max-sh-creates exceeded, or chain view moved

text/plain

string

GET /blocks

Ten newest block summaries, newest first

Responses
200

Block summaries

Sends the chain-tip headers.

application/json

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.

Parameters
start_height

Required path. integer

minimum 0.

Responses
200

Block summaries

Sends the chain-tip headers.

application/json

array of Block

GET /block-height/{height}

Best-chain block hash at a height

Parameters
height

Required path. integer

minimum 0.

Responses
200

64-character hex hash, chain-tip stamped

Sends the chain-tip headers.

text/plain

Hash

404

Unknown object, malformed hash, or pruned

text/plain

string

GET /block/{hash}

Block summary (best chain only)

Parameters
hash

Required path. Hash

Responses
200

Block summary

Sends the chain-tip headers.

application/json

Block

404

Unknown object, malformed hash, or pruned

text/plain

string

GET /block/{hash}/header

80-byte block header as hex

Parameters
hash

Required path. Hash

Responses
200

Hex string

Sends the chain-tip headers.

text/plain

string

pattern ^[0-9a-f]*$.

404

Unknown object, malformed hash, or pruned

text/plain

string

GET /block/{hash}/status

Whether the block is on the best chain

Parameters
hash

Required path. Hash

Responses
200

Block status

Sends the chain-tip headers.

application/json

BlockStatus

404

Unknown object, malformed hash, or pruned

text/plain

string

GET /block/{hash}/raw

Raw serialized block

Parameters
hash

Required path. Hash

Responses
200

Consensus-serialized block

Sends the chain-tip headers.

application/octet-stream

string

format binary.

404

Unknown object, malformed hash, or pruned

text/plain

string

GET /block/{hash}/txids

All txids in block order

Parameters
hash

Required path. Hash

Responses
200

Txids

Sends the chain-tip headers.

application/json

array of Hash

404

Unknown object, malformed hash, or pruned

text/plain

string

GET /block/{hash}/txid/{index}

Txid at a position in the block

Parameters
hash

Required path. Hash

index

Required path. integer

minimum 0.

Responses
200

64-character hex hash, chain-tip stamped

Sends the chain-tip headers.

text/plain

Hash

404

Unknown object, malformed hash, or pruned

text/plain

string

GET /block/{hash}/txs

First 25 transactions in the block

Parameters
hash

Required path. Hash

Responses
200

Transactions. Chain-tip stamped.

Sends the chain-tip headers.

application/json

array of Transaction

404

Unknown object, malformed hash, or pruned

text/plain

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.

Parameters
hash

Required path. Hash

start_index

Required path. integer

minimum 0. multiple of 25.

Responses
200

Transactions. Chain-tip stamped.

Sends the chain-tip headers.

application/json

array of Transaction

400

Bad input

text/plain

string

404

Unknown object, malformed hash, or pruned

text/plain

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.

Responses
200

Block template

Sends the chain-tip headers.

application/json

object

404

Unknown object, malformed hash, or pruned

text/plain

string

503

No tip, mempool unavailable, scripthash index disabled, --max-sh-creates exceeded, or chain view moved

text/plain

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).

Parameters
txid

Required path. Hash

Responses
200

Transaction

Sends the chain-tip headers.

application/json

Transaction

404

Unknown object, malformed hash, or pruned

text/plain

string

GET /tx/{txid}/hex

Raw transaction as hex

Parameters
txid

Required path. Hash

Responses
200

Hex string

Sends the chain-tip headers.

text/plain

string

pattern ^[0-9a-f]*$.

404

Unknown object, malformed hash, or pruned

text/plain

string

GET /tx/{txid}/raw

Raw transaction bytes

Parameters
txid

Required path. Hash

Responses
200

Consensus-serialized transaction

Sends the chain-tip headers.

application/octet-stream

string

format binary.

404

Unknown object, malformed hash, or pruned

text/plain

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}.

Parameters
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.

Responses
200

Status

Sends the chain-tip headers.

application/json

TxStatus

404

Malformed address, wrong network, bad hex, or an asof block that is unknown, off the best chain, or ahead of the scripthash index. A valid address or scripthash with no history is 200 (zero stats, or an empty array), not 404.

text/plain

string

503

No tip, mempool unavailable, scripthash index disabled, --max-sh-creates exceeded, or chain view moved

text/plain

string

GET /tx/{txid}/merkle-proof

Electrum-style merkle proof

Parameters
txid

Required path. Hash

Responses
200

Merkle proof

Sends the chain-tip headers.

application/json

MerkleProof

404

Unknown object, malformed hash, or pruned

text/plain

string

GET /tx/{txid}/merkleblock-proof

BIP37 merkleblock as hex

Parameters
txid

Required path. Hash

Responses
200

Hex string

Sends the chain-tip headers.

text/plain

string

pattern ^[0-9a-f]*$.

404

Unknown object, malformed hash, or pruned

text/plain

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.

Parameters
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.

Responses
200

Outspend

Sends the chain-tip headers.

application/json

Outspend

404

Malformed address, wrong network, bad hex, or an asof block that is unknown, off the best chain, or ahead of the scripthash index. A valid address or scripthash with no history is 200 (zero stats, or an empty array), not 404.

text/plain

string

GET /tx/{txid}/outspends

Spend status of every output

Same ?asof= semantics as /tx/{txid}/outspend/{vout}.

Parameters
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.

Responses
200

One entry per output, in vout order

Sends the chain-tip headers.

application/json

array of Outspend

404

Malformed address, wrong network, bad hex, or an asof block that is unknown, off the best chain, or ahead of the scripthash index. A valid address or scripthash with no history is 200 (zero stats, or an empty array), not 404.

text/plain

string

GET /txs/outspends

Outspends for several txids (live only)

Parameters
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.

Responses
200

One outspend array per txid, same order

Sends the chain-tip headers.

application/json

array of array of Outspend

400

Bad input

text/plain

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.

Parameters
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.

Responses
200

Stats

Sends the chain-tip headers.

application/json

AddressInfo

404

Malformed address, wrong network, bad hex, or an asof block that is unknown, off the best chain, or ahead of the scripthash index. A valid address or scripthash with no history is 200 (zero stats, or an empty array), not 404.

text/plain

string

503

No tip, mempool unavailable, scripthash index disabled, --max-sh-creates exceeded, or chain view moved

text/plain

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.

Parameters
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.

Responses
200

Stats

Sends the chain-tip headers.

application/json

AddressInfo

404

Malformed address, wrong network, bad hex, or an asof block that is unknown, off the best chain, or ahead of the scripthash index. A valid address or scripthash with no history is 200 (zero stats, or an empty array), not 404.

text/plain

string

503

No tip, mempool unavailable, scripthash index disabled, --max-sh-creates exceeded, or chain view moved

text/plain

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.

Parameters
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.

Responses
200

Unspent outputs

Sends the chain-tip headers.

application/json

array of Utxo

404

Malformed address, wrong network, bad hex, or an asof block that is unknown, off the best chain, or ahead of the scripthash index. A valid address or scripthash with no history is 200 (zero stats, or an empty array), not 404.

text/plain

string

503

No tip, mempool unavailable, scripthash index disabled, --max-sh-creates exceeded, or chain view moved

text/plain

string

GET /scripthash/{scripthash}/utxo

Unspent outputs

Same as /address/{address}/utxo.

Parameters
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.

Responses
200

Unspent outputs

Sends the chain-tip headers.

application/json

array of Utxo

404

Malformed address, wrong network, bad hex, or an asof block that is unknown, off the best chain, or ahead of the scripthash index. A valid address or scripthash with no history is 200 (zero stats, or an empty array), not 404.

text/plain

string

503

No tip, mempool unavailable, scripthash index disabled, --max-sh-creates exceeded, or chain view moved

text/plain

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).

Parameters
address

Required path. string

Address on the node's network

after_txid

Optional query. Hash

Query cursor on /txs and /txs/summary (not on the /{last_seen_txid} routes, which ignore it). Skips through this tx (mempool, then chain). Unknown or unparseable → 422. An empty value is treated as omitted.

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.

Responses
200

Transactions. Chain-tip stamped.

Sends the chain-tip headers.

application/json

array of Transaction

404

Malformed address, wrong network, bad hex, or an asof block that is unknown, off the best chain, or ahead of the scripthash index. A valid address or scripthash with no history is 200 (zero stats, or an empty array), not 404.

text/plain

string

422

Body is after_txid not found when a query after_txid or a path last_seen_txid is well-formed but not in that history. On POST, more than 300 scripts is body too long with this same status.

text/plain

string

503

No tip, mempool unavailable, scripthash index disabled, --max-sh-creates exceeded, or chain view moved

text/plain

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).

Parameters
scripthash

Required path. Hash

Electrum scripthash (SHA256 of the scriptPubKey, byte-reversed hex)

after_txid

Optional query. Hash

Query cursor on /txs and /txs/summary (not on the /{last_seen_txid} routes, which ignore it). Skips through this tx (mempool, then chain). Unknown or unparseable → 422. An empty value is treated as omitted.

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.

Responses
200

Transactions. Chain-tip stamped.

Sends the chain-tip headers.

application/json

array of Transaction

404

Malformed address, wrong network, bad hex, or an asof block that is unknown, off the best chain, or ahead of the scripthash index. A valid address or scripthash with no history is 200 (zero stats, or an empty array), not 404.

text/plain

string

422

Body is after_txid not found when a query after_txid or a path last_seen_txid is well-formed but not in that history. On POST, more than 300 scripts is body too long with this same status.

text/plain

string

503

No tip, mempool unavailable, scripthash index disabled, --max-sh-creates exceeded, or chain view moved

text/plain

string

GET /address/{address}/txs/chain

25 confirmed txs, newest first

Parameters
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.

Responses
200

Transactions. Chain-tip stamped.

Sends the chain-tip headers.

application/json

array of Transaction

404

Malformed address, wrong network, bad hex, or an asof block that is unknown, off the best chain, or ahead of the scripthash index. A valid address or scripthash with no history is 200 (zero stats, or an empty array), not 404.

text/plain

string

503

No tip, mempool unavailable, scripthash index disabled, --max-sh-creates exceeded, or chain view moved

text/plain

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.

Parameters
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.

Responses
200

Transactions. Chain-tip stamped.

Sends the chain-tip headers.

application/json

array of Transaction

404

Malformed address, wrong network, bad hex, or an asof block that is unknown, off the best chain, or ahead of the scripthash index. A valid address or scripthash with no history is 200 (zero stats, or an empty array), not 404.

text/plain

string

422

Body is after_txid not found when a query after_txid or a path last_seen_txid is well-formed but not in that history. On POST, more than 300 scripts is body too long with this same status.

text/plain

string

503

No tip, mempool unavailable, scripthash index disabled, --max-sh-creates exceeded, or chain view moved

text/plain

string

GET /scripthash/{scripthash}/txs/chain

25 confirmed txs, newest first

Parameters
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.

Responses
200

Transactions. Chain-tip stamped.

Sends the chain-tip headers.

application/json

array of Transaction

404

Malformed address, wrong network, bad hex, or an asof block that is unknown, off the best chain, or ahead of the scripthash index. A valid address or scripthash with no history is 200 (zero stats, or an empty array), not 404.

text/plain

string

503

No tip, mempool unavailable, scripthash index disabled, --max-sh-creates exceeded, or chain view moved

text/plain

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.

Parameters
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.

Responses
200

Transactions. Chain-tip stamped.

Sends the chain-tip headers.

application/json

array of Transaction

404

Malformed address, wrong network, bad hex, or an asof block that is unknown, off the best chain, or ahead of the scripthash index. A valid address or scripthash with no history is 200 (zero stats, or an empty array), not 404.

text/plain

string

422

Body is after_txid not found when a query after_txid or a path last_seen_txid is well-formed but not in that history. On POST, more than 300 scripts is body too long with this same status.

text/plain

string

503

No tip, mempool unavailable, scripthash index disabled, --max-sh-creates exceeded, or chain view moved

text/plain

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.

Parameters
address

Required path. string

Address on the node's network

Responses
200

Mempool transactions for one script. Not chain-tip stamped.

application/json

array of Transaction

404

Unknown object, malformed hash, or pruned

text/plain

string

503

No tip, mempool unavailable, scripthash index disabled, --max-sh-creates exceeded, or chain view moved

text/plain

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.

Parameters
scripthash

Required path. Hash

Electrum scripthash (SHA256 of the scriptPubKey, byte-reversed hex)

Responses
200

Mempool transactions for one script. Not chain-tip stamped.

application/json

array of Transaction

404

Unknown object, malformed hash, or pruned

text/plain

string

503

No tip, mempool unavailable, scripthash index disabled, --max-sh-creates exceeded, or chain view moved

text/plain

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.

Parameters
address

Required path. string

Address on the node's network

after_txid

Optional query. Hash

Query cursor on /txs and /txs/summary (not on the /{last_seen_txid} routes, which ignore it). Skips through this tx (mempool, then chain). Unknown or unparseable → 422. An empty value is treated as omitted.

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.

Responses
200

Compact history rows, newest first

Sends the chain-tip headers.

application/json

array of TxSummary

404

Malformed address, wrong network, bad hex, or an asof block that is unknown, off the best chain, or ahead of the scripthash index. A valid address or scripthash with no history is 200 (zero stats, or an empty array), not 404.

text/plain

string

422

Body is after_txid not found when a query after_txid or a path last_seen_txid is well-formed but not in that history. On POST, more than 300 scripts is body too long with this same status.

text/plain

string

503

No tip, mempool unavailable, scripthash index disabled, --max-sh-creates exceeded, or chain view moved

text/plain

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.

Parameters
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.

Responses
200

Compact history rows, newest first

Sends the chain-tip headers.

application/json

array of TxSummary

404

Malformed address, wrong network, bad hex, or an asof block that is unknown, off the best chain, or ahead of the scripthash index. A valid address or scripthash with no history is 200 (zero stats, or an empty array), not 404.

text/plain

string

422

Body is after_txid not found when a query after_txid or a path last_seen_txid is well-formed but not in that history. On POST, more than 300 scripts is body too long with this same status.

text/plain

string

503

No tip, mempool unavailable, scripthash index disabled, --max-sh-creates exceeded, or chain view moved

text/plain

string

GET /scripthash/{scripthash}/txs/summary

Compact confirmed history (rbitcoin dialect)

Parameters
scripthash

Required path. Hash

Electrum scripthash (SHA256 of the scriptPubKey, byte-reversed hex)

after_txid

Optional query. Hash

Query cursor on /txs and /txs/summary (not on the /{last_seen_txid} routes, which ignore it). Skips through this tx (mempool, then chain). Unknown or unparseable → 422. An empty value is treated as omitted.

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.

Responses
200

Compact history rows, newest first

Sends the chain-tip headers.

application/json

array of TxSummary

404

Malformed address, wrong network, bad hex, or an asof block that is unknown, off the best chain, or ahead of the scripthash index. A valid address or scripthash with no history is 200 (zero stats, or an empty array), not 404.

text/plain

string

422

Body is after_txid not found when a query after_txid or a path last_seen_txid is well-formed but not in that history. On POST, more than 300 scripts is body too long with this same status.

text/plain

string

503

No tip, mempool unavailable, scripthash index disabled, --max-sh-creates exceeded, or chain view moved

text/plain

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.

Parameters
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.

Responses
200

Compact history rows, newest first

Sends the chain-tip headers.

application/json

array of TxSummary

404

Malformed address, wrong network, bad hex, or an asof block that is unknown, off the best chain, or ahead of the scripthash index. A valid address or scripthash with no history is 200 (zero stats, or an empty array), not 404.

text/plain

string

422

Body is after_txid not found when a query after_txid or a path last_seen_txid is well-formed but not in that history. On POST, more than 300 scripts is body too long with this same status.

text/plain

string

503

No tip, mempool unavailable, scripthash index disabled, --max-sh-creates exceeded, or chain view moved

text/plain

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).

Parameters
after_txid

Optional query. Hash

Query cursor on /txs and /txs/summary (not on the /{last_seen_txid} routes, which ignore it). Skips through this tx (mempool, then chain). Unknown or unparseable → 422. An empty value is treated as omitted.

X-Rbitcoin-Client

Optional header. string

Join-cache client id. Honored only on unix and loopback listeners; ignored on public TCP.

Request body
Body

Required request body.

application/json

array of string (at most 300)

Responses
200

Transactions. Chain-tip stamped.

Sends the chain-tip headers.

application/json

array of Transaction

400

Bad input

text/plain

string

413

Body too large

text/plain

string

422

Body is after_txid not found when a query after_txid or a path last_seen_txid is well-formed but not in that history. On POST, more than 300 scripts is body too long with this same status.

text/plain

string

503

No tip, mempool unavailable, scripthash index disabled, --max-sh-creates exceeded, or chain view moved

text/plain

string

POST /addresses/txs/summary

Merged compact page for several addresses (rbitcoin dialect)

Parameters
after_txid

Optional query. Hash

Query cursor on /txs and /txs/summary (not on the /{last_seen_txid} routes, which ignore it). Skips through this tx (mempool, then chain). Unknown or unparseable → 422. An empty value is treated as omitted.

X-Rbitcoin-Client

Optional header. string

Join-cache client id. Honored only on unix and loopback listeners; ignored on public TCP.

Request body
Body

Required request body.

application/json

array of string (at most 300)

Responses
200

Compact history rows, newest first

Sends the chain-tip headers.

application/json

array of TxSummary

400

Bad input

text/plain

string

413

Body too large

text/plain

string

422

Body is after_txid not found when a query after_txid or a path last_seen_txid is well-formed but not in that history. On POST, more than 300 scripts is body too long with this same status.

text/plain

string

503

No tip, mempool unavailable, scripthash index disabled, --max-sh-creates exceeded, or chain view moved

text/plain

string

POST /scripthashes/txs

Merged tx page for several scripthashes

Parameters
after_txid

Optional query. Hash

Query cursor on /txs and /txs/summary (not on the /{last_seen_txid} routes, which ignore it). Skips through this tx (mempool, then chain). Unknown or unparseable → 422. An empty value is treated as omitted.

X-Rbitcoin-Client

Optional header. string

Join-cache client id. Honored only on unix and loopback listeners; ignored on public TCP.

Request body
Body

Required request body.

application/json

array of Hash (at most 300)

Responses
200

Transactions. Chain-tip stamped.

Sends the chain-tip headers.

application/json

array of Transaction

400

Bad input

text/plain

string

413

Body too large

text/plain

string

422

Body is after_txid not found when a query after_txid or a path last_seen_txid is well-formed but not in that history. On POST, more than 300 scripts is body too long with this same status.

text/plain

string

503

No tip, mempool unavailable, scripthash index disabled, --max-sh-creates exceeded, or chain view moved

text/plain

string

POST /scripthashes/txs/summary

Merged compact page for several scripthashes (rbitcoin dialect)

Parameters
after_txid

Optional query. Hash

Query cursor on /txs and /txs/summary (not on the /{last_seen_txid} routes, which ignore it). Skips through this tx (mempool, then chain). Unknown or unparseable → 422. An empty value is treated as omitted.

X-Rbitcoin-Client

Optional header. string

Join-cache client id. Honored only on unix and loopback listeners; ignored on public TCP.

Request body
Body

Required request body.

application/json

array of Hash (at most 300)

Responses
200

Compact history rows, newest first

Sends the chain-tip headers.

application/json

array of TxSummary

400

Bad input

text/plain

string

413

Body too large

text/plain

string

422

Body is after_txid not found when a query after_txid or a path last_seen_txid is well-formed but not in that history. On POST, more than 300 scripts is body too long with this same status.

text/plain

string

503

No tip, mempool unavailable, scripthash index disabled, --max-sh-creates exceeded, or chain view moved

text/plain

string

Mempool

GET /mempool

Mempool summary

Responses
200

Summary

application/json

MempoolInfo

GET /mempool/txids

All mempool txids

Responses
200

Txids

application/json

array of Hash

GET /mempool/txids/page

First page of mempool txids in txid order

Parameters
max_txs

Optional query. integer

Page size. Omitted means 10000. Values above 10000 are capped at 10000, not rejected. 0 returns an empty page.

minimum 0. default 10000.

Responses
200

Txids

Sends the chain-tip headers.

application/json

array of Hash

GET /mempool/txids/page/{last_txid}

Next page of mempool txids after last_txid

Parameters
last_txid

Required path. Hash

max_txs

Optional query. integer

Page size. Omitted means 10000. Values above 10000 are capped at 10000, not rejected. 0 returns an empty page.

minimum 0. default 10000.

Responses
200

Txids

Sends the chain-tip headers.

application/json

array of Hash

400

Bad input

text/plain

string

GET /mempool/recent

Up to 10 most recently accepted mempool txs, newest first

Responses
200

Recent txs in accept order

application/json

array of object

txid Hash

Required.

fee integer

Required.

sats

vsize integer

Required.

value integer

Required.

total output value in sats

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.

Responses
200

Estimates

application/json

object mapping to number

{
  "1": 12.345,
  "6": 4.0,
  "144": 1.0
}
503

No tip, mempool unavailable, scripthash index disabled, --max-sh-creates exceeded, or chain view moved

text/plain

string

Broadcast

POST /tx

Broadcast a raw transaction

Request body
Body

Required request body.

text/plain

string

raw transaction hex

Responses
200

64-character hex hash

text/plain

Hash

400

Bad input

text/plain

string

413

Body too large

text/plain

string

503

No tip, mempool unavailable, scripthash index disabled, --max-sh-creates exceeded, or chain view moved

text/plain

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).

Parameters
maxfeerate

Optional query. number

BTC/kvB. 0 means unlimited; omitted means 0.1.

minimum 0.

Request body
Body

Required request body.

application/json

array of string (at most 25)

Responses
200

One result per transaction, or one object when the batch repeats a txid

Sends the chain-tip headers.

application/json

array of TestAcceptResult

400

Bad input

text/plain

string

413

Body too large

text/plain

string

503

No tip, mempool unavailable, scripthash index disabled, --max-sh-creates exceeded, or chain view moved

text/plain

string

POST /txs/package

Submit a package (same path as RPC submitpackage)

Request body
Body

Required request body.

application/json

array of string (at most 25)

Responses
200

Accepted txids

application/json

object

txids array of Hash

Required.

400

Bad input

text/plain

string

413

Body too large

text/plain

string

503

No tip, mempool unavailable, scripthash index disabled, --max-sh-creates exceeded, or chain view moved

text/plain

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)

Request body
Body

Required request body.

application/json

array of Hash

Responses
200

Transactions. Chain-tip stamped.

Sends the chain-tip headers.

application/json

array of Transaction

400

Bad input

text/plain

string

GET /internal/mempool/txs

First page of mempool tx JSON in txid order

Parameters
max_txs

Optional query. integer

Page size. Omitted means 10000. Values above 10000 are capped at 10000, not rejected. 0 returns an empty page.

minimum 0. default 10000.

Responses
200

Transactions. Chain-tip stamped.

Sends the chain-tip headers.

application/json

array of Transaction

POST /internal/mempool/txs

Bulk mempool tx JSON by txid (mempool only)

Request body
Body

Required request body.

application/json

array of Hash

Responses
200

Transactions. Chain-tip stamped.

Sends the chain-tip headers.

application/json

array of Transaction

400

Bad input

text/plain

string

GET /internal/mempool/txs/all

Every mempool tx JSON in txid order

Responses
200

Transactions. Chain-tip stamped.

Sends the chain-tip headers.

application/json

array of Transaction

GET /internal/mempool/txs/{last_txid}

Next page of mempool tx JSON after last_txid

Parameters
last_txid

Required path. Hash

max_txs

Optional query. integer

Page size. Omitted means 10000. Values above 10000 are capped at 10000, not rejected. 0 returns an empty page.

minimum 0. default 10000.

Responses
200

Transactions. Chain-tip stamped.

Sends the chain-tip headers.

application/json

array of Transaction

400

Bad input

text/plain

string

GET /internal/block/{hash}/txs

Every tx in a block (public /block/{hash}/txs is 25 per page)

Parameters
hash

Required path. Hash

Responses
200

Transactions. Chain-tip stamped.

Sends the chain-tip headers.

application/json

array of Transaction

404

Unknown object, malformed hash, or pruned

text/plain

string

POST /internal/txs/outspends/by-txid

Outspends per txid (unknown txid → [])

Request body
Body

Required request body.

application/json

array of Hash

Responses
200

One array per txid, same order

Sends the chain-tip headers.

application/json

array of array of Outspend

400

Bad input

text/plain

string

POST /internal/txs/outspends/by-outpoint

Outspend per txid:vout (malformed → {"spent": false})

Request body
Body

Required request body.

application/json

array of string

Responses
200

One outspend per outpoint, same order

Sends the chain-tip headers.

application/json

array of Outspend

400

Bad input

text/plain

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 p2pkh, p2sh, p2pk, v0_p2wpkh, v0_p2wsh, v1_p2tr, op_return, multisig, unknown.

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. sigops is omitted. vin is partial (see the vin property) or absent when no input edges were stored.

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 allowed is true. floor(weight / 4), not the ceiling Core uses.

fees object

Present when allowed is true.

base number

BTC

reject-reason string

Policy or fee failure, including max-fee-exceeded. Absent when package-error is set.

package-error string

Set to package-contains-duplicates when the batch repeats a txid. That response is one object, not one per transaction, and has no reject-reason.