Skip to main content

Transactions

Get Transaction

GET /rest/tx/<TX-HASH>.<bin|hex|json>
Retrieve a transaction by its hash in binary, hexadecimal, or JSON format.
TX-HASH
string
required
The transaction hash (txid) in hexadecimal format
format
enum
required
Output format: bin, hex, or json
Behavior:
  • By default, only searches the mempool for unconfirmed transactions
  • To query confirmed transactions, enable the transaction index: txindex=1
  • Returns 404 if the transaction doesn’t exist
Example:
# Get transaction in JSON format
curl http://localhost:8332/rest/tx/0e3e2357e806b6cdb1f70b54c3a3a17b6714ee1f0e68bebb44a74b1efd512098.json

# Get transaction in hex format
curl http://localhost:8332/rest/tx/0e3e2357e806b6cdb1f70b54c3a3a17b6714ee1f0e68bebb44a74b1efd512098.hex

Blocks

Get Block

GET /rest/block/<BLOCK-HASH>.<bin|hex|json>
Retrieve a complete block with full transaction details.
BLOCK-HASH
string
required
The block hash in hexadecimal format
format
enum
required
Output format: bin, hex, or json
Example:
curl http://localhost:8332/rest/block/000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f.json
The HTTP request and response are handled entirely in-memory. For very large blocks, consider using /rest/blockpart/ to retrieve partial data.

Get Block Without Transaction Details

GET /rest/block/notxdetails/<BLOCK-HASH>.<bin|hex|json>
Retrieve a block with only transaction hashes (no full transaction details).
BLOCK-HASH
string
required
The block hash in hexadecimal format
Example:
curl http://localhost:8332/rest/block/notxdetails/000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f.json
This endpoint is more efficient when you only need block metadata and transaction IDs without full transaction data. The option only affects JSON responses.

Get Block Part

GET /rest/blockpart/<BLOCK-HASH>.<bin|hex>?offset=<OFFSET>&size=<SIZE>
Retrieve a specific byte range from a block’s raw data.
BLOCK-HASH
string
required
The block hash in hexadecimal format
offset
integer
required
Byte offset to start reading from
size
integer
required
Number of bytes to read
Example:
# Get first 1000 bytes of a block
curl "http://localhost:8332/rest/blockpart/000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f.bin?offset=0&size=1000"
Only supports bin and hex formats. Returns 404 if the block doesn’t exist or the byte range is invalid.

Block Headers

Get Block Headers

GET /rest/headers/<BLOCK-HASH>.<bin|hex|json>?count=<COUNT>
Retrieve a sequence of block headers starting from the specified block hash.
BLOCK-HASH
string
required
Starting block hash in hexadecimal format
count
integer
default:"5"
Number of headers to return (max: 2000)
Example:
# Get 10 block headers
curl "http://localhost:8332/rest/headers/000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f.json?count=10"
Deprecated format (still supported): /rest/headers/<COUNT>/<BLOCK-HASH>.<format>This format has been deprecated since v24.0. Use the query parameter format instead.

Block Filters

Get Block Filter Headers

GET /rest/blockfilterheaders/<FILTERTYPE>/<BLOCK-HASH>.<bin|hex|json>?count=<COUNT>
Retrieve block filter headers for BIP 157/158 compact block filters.
FILTERTYPE
string
required
Filter type (e.g., basic for BIP 158 basic filters)
BLOCK-HASH
string
required
Starting block hash in hexadecimal format
count
integer
default:"5"
Number of filter headers to return (max: 2000)
Example:
curl "http://localhost:8332/rest/blockfilterheaders/basic/000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f.json?count=5"
Deprecated format: /rest/blockfilterheaders/<FILTERTYPE>/<COUNT>/<BLOCK-HASH>.<format> (deprecated since v24.0)

Get Block Filter

GET /rest/blockfilter/<FILTERTYPE>/<BLOCK-HASH>.<bin|hex|json>
Retrieve the block filter for a specific block.
FILTERTYPE
string
required
Filter type (e.g., basic)
BLOCK-HASH
string
required
Block hash in hexadecimal format
Example:
curl http://localhost:8332/rest/blockfilter/basic/000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f.json

Block Hash Lookup

Get Block Hash by Height

GET /rest/blockhashbyheight/<HEIGHT>.<bin|hex|json>
Retrieve the block hash at a specific height in the best block chain.
HEIGHT
integer
required
Block height (0 for genesis block)
Example:
# Get genesis block hash
curl http://localhost:8332/rest/blockhashbyheight/0.json

# Get block hash at height 500000
curl http://localhost:8332/rest/blockhashbyheight/500000.hex

Spent Transaction Outputs

Get Spent Outputs

GET /rest/spenttxouts/<BLOCK-HASH>.<bin|hex|json>
Retrieve a collection of spent transaction outputs for all transactions in a block.
BLOCK-HASH
string
required
Block hash in hexadecimal format
Example:
curl http://localhost:8332/rest/spenttxouts/000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f.json
Returns 404 if:
  • The block doesn’t exist
  • The block’s undo data is not available (e.g., genesis block, pruned blocks)

Blockchain Information

Get Chain Info

GET /rest/chaininfo.json
Retrieve various state information about blockchain processing. Example:
curl http://localhost:8332/rest/chaininfo.json
Response (equivalent to getblockchaininfo RPC):
{
  "chain": "main",
  "blocks": 750000,
  "headers": 750000,
  "bestblockhash": "00000000000000000001c0a...",
  "difficulty": 37590453655497.09,
  "time": 1665432100,
  "mediantime": 1665428500,
  "verificationprogress": 0.9999,
  "initialblockdownload": false,
  "chainwork": "00000000000000000000000000000000000000003a1d...",
  "size_on_disk": 473245678901,
  "pruned": false
}
Only supports JSON output format. See getblockchaininfo RPC documentation for complete field descriptions.

Get Deployment Info

GET /rest/deploymentinfo.json
GET /rest/deploymentinfo/<BLOCKHASH>.json
Retrieve information about consensus rule deployments (soft forks) at the current chain tip or at a specific block.
BLOCKHASH
string
Optional block hash to query deployment status at that block
Example:
# Get current deployment info
curl http://localhost:8332/rest/deploymentinfo.json

# Get deployment info at specific block
curl http://localhost:8332/rest/deploymentinfo/000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f.json
Equivalent to the getdeploymentinfo RPC. Only supports JSON format.

UTXO Set Queries

Query UTXO Set

GET /rest/getutxos/<TXID>-<N>/<TXID>-<N>/.../<TXID>-<N>.<bin|hex|json>
GET /rest/getutxos/checkmempool/<TXID>-<N>/<TXID>-<N>/.../<TXID>-<N>.<bin|hex|json>
Query the UTXO set for specific outpoints.
TXID
string
required
Transaction ID in hexadecimal format
N
integer
required
Output index (vout)
checkmempool
boolean
Include mempool in the query (optional path segment)
Limitations:
  • Maximum 15 outpoints per request
  • Follows BIP64 serialization format for binary/hex outputs
Example:
# Query single UTXO
curl http://localhost:18332/rest/getutxos/b2cdfd7b89def827ff8af7cd9bff7627ff72e5e8b0f71210f92ea7a4000c5d75-0.json

# Query multiple UTXOs including mempool
curl http://localhost:18332/rest/getutxos/checkmempool/TXID1-0/TXID2-1/TXID3-0.json
JSON Response:
{
  "chainHeight": 325347,
  "chaintipHash": "00000000fb01a7f3745a717f8caebee056c484e6e0bfe4a9591c235bb70506fb",
  "bitmap": "1",
  "utxos": [
    {
      "height": 2147483647,
      "value": 8.8687,
      "scriptPubKey": {
        "asm": "OP_DUP OP_HASH160 1c7cebb529b86a04c683dfa87be49de35bcf589e OP_EQUALVERIFY OP_CHECKSIG",
        "desc": "addr(mi7as51dvLJsizWnTMurtRmrP8hG2m1XvD)#gj9tznmy",
        "hex": "76a9141c7cebb529b86a04c683dfa87be49de35bcf589e88ac",
        "type": "pubkeyhash",
        "address": "mi7as51dvLJsizWnTMurtRmrP8hG2m1XvD"
      }
    }
  ]
}
BIP64 Reference: Binary and hex formats follow BIP64 serialization.

Mempool

Get Mempool Info

GET /rest/mempool/info.json
Retrieve information about the memory pool. Example:
curl http://localhost:8332/rest/mempool/info.json
Response:
{
  "loaded": true,
  "size": 5000,
  "bytes": 2500000,
  "usage": 10000000,
  "total_fee": 0.05,
  "maxmempool": 300000000,
  "mempoolminfee": 0.00001000,
  "minrelaytxfee": 0.00001000
}
Equivalent to the getmempoolinfo RPC. Only supports JSON format.

Get Mempool Contents

GET /rest/mempool/contents.json?verbose=<true|false>&mempool_sequence=<false|true>
Retrieve all transactions currently in the mempool.
verbose
boolean
default:"true"
Include detailed transaction information
mempool_sequence
boolean
default:"false"
Include mempool sequence number (cannot be combined with verbose=true)
Example:
# Get verbose mempool contents
curl http://localhost:8332/rest/mempool/contents.json

# Get compact mempool with sequence
curl "http://localhost:8332/rest/mempool/contents.json?verbose=false&mempool_sequence=true"
Availability: Query parameters for verbose and mempool_sequence are available in Bitcoin Core v25.0 and later.
Incompatible Options: Cannot use verbose=true and mempool_sequence=true together. Set verbose=false when requesting mempool sequence values.

Error Responses

All endpoints return appropriate HTTP status codes:
Status CodeDescription
200Success
400Bad request (invalid parameters)
404Resource not found
500Internal server error
503Service unavailable (node still warming up)
Example Error:
{
  "error": "Block not found"
}