Blockbook API
v2.0.0-drafthttps://qtum-blockbook.nownodes.iohttps://qtum.nownodes.iohttps://qtum-testnet.nownodes.ioCanonical description of the Blockbook public API, based on blockbook-api.ts, api/xpub.go, and the api/server handlers.
API V2 is the current Blockbook API. It is available over REST and over WebSocket using the WsRequest/WsResponse JSON envelope documented below. The normalized API shapes are shared by all supported coins, while blockchain-specific payloads remain extensible where Blockbook returns raw backend JSON.
Amounts are strings in the lowest denomination of the chain, such as satoshis or wei, without a decimal point. Empty fields are omitted: empty means null, an empty string, numeric zero, a null object, or an empty array. Since the same API serves many different chains, this can sometimes hide otherwise meaningful zero values such as transaction version 0.
Legacy API V1 is a Bitcore Insight-compatible subset for Bitcoin-type coins. It is provided as-is for compatibility and is not being extended.
Load estimates are qualitative hints for client authors. Low means a small constant-time lookup or cached metadata. Medium means bounded indexed work or response size. High means potentially large scans, large payloads, broadcast/backend work, or external RPC enrichment. Actual cost also depends on chain speed, backend health, cache warmth, mempool size, pageSize, gap, and the number of addresses, transactions, tokens, filters, or timestamps involved.
Authentication
api-keyAuthapiKeyAPI Key: api-key in header
MAINNET / Blockbook
BlockBook
Get Blockbook and backend status.
Returns Blockbook sync state and connected backend metadata.
Load estimate: Low; constant-size status metadata.
Response
Current Blockbook and backend status.
Public API error. Public validation errors are HTTP 400; internal errors are HTTP 500.
Authorization
api-keyAuthapiKey in headerGet status from the API index handler.
Alias served by the same handler as /api/status on full public interfaces.
Load estimate: Low; constant-size status metadata.
Response
Current Blockbook and backend status.
Public API error.
Authorization
api-keyAuthapiKey in headerGet a block hash by height.
Returns the block hash for a height on the backend main chain. Blockbook follows the backend main chain; after a rollback or reorg, height lookups resolve to the current main-chain block.
Load estimate: Low; indexed height-to-hash lookup.
Parameters
heightinteger>= 0requiredpathBlock height on the backend main chain.
Response
Block hash at the requested height.
Public API error.
Authorization
api-keyAuthapiKey in headerGet a block by height or hash.
Returns block information with paged transactions. When full transaction details are unavailable, the response can contain only transaction ids.
Blockbook follows the backend main chain. Height lookups always return the current main-chain block. Hash lookups can return a block from another fork only if the backend still keeps it.
Load estimate: Medium; grows mainly with block transaction count and requested page.
Parameters
blockIdstringrequiredpathBlock height or block hash.
pageinteger>= 1query1-based page index. Values outside safe bounds are sanitized to the closest possible page.
Response
Block details.
Public API error.
Authorization
api-keyAuthapiKey in headerGet raw block hex.
Returns raw serialized block data.
Load estimate: High for large blocks; payload size grows with the raw block size.
Parameters
blockIdstringrequiredpathBlock height or block hash.
Response
Raw block data.
Public API error.
Authorization
api-keyAuthapiKey in headerGet compact block filters.
Returns compact block filters for the script type configured on this Blockbook instance. Provide either lastN or a from/to range. When to is omitted for a range, the current best height is used.
Load estimate: High for wide ranges; work and payload grow linearly with the number of requested filters.
Parameters
scriptTypestringrequiredqueryScript type configured for block filters on this instance, for example taproot.
lastNinteger>= 1queryReturn filters for the last N blocks.
frominteger>= 0queryFirst block height in the requested range.
tointeger>= 0queryLast block height in the requested range. Defaults to the current best height when omitted.
Response
Block filters keyed by block height.
Public API error.
Authorization
api-keyAuthapiKey in headerGet a normalized transaction.
Returns normalized transaction data with the same general structure for all supported coins. Coin-specific fields that do not fit the common shape are omitted here; use getTransactionSpecific for backend-native JSON.
Bitcoin-like confirmed transactions include blockHash, confirmations, blockTime, size/vsize, value/valueIn, fees, and hex. Unconfirmed transactions can include confirmationETABlocks and confirmationETASeconds.
Ethereum-like transactions have one vin and one vout, tokenTransfers, ethereumSpecific execution data, and optional addressAliases. Parsed input data is included when the 4byte signature can be resolved.
For mined transactions, blockTime is the block timestamp. For mempool transactions, blockTime is when this Blockbook instance first learned about the transaction and can differ between instances.
Load estimate: Medium; grows with inputs, outputs, token transfers, address aliases, and spending=true extra lookups.
Parameters
txidstringrequiredpathTransaction id/hash.
spendingbooleanqueryInclude spending transaction metadata for UTXO outputs when available.
Response
Normalized transaction.
Public API error.
Authorization
api-keyAuthapiKey in headerGet blockchain-specific transaction JSON.
Returns transaction data in the exact backend-specific format. Use this when a chain exposes fields that are intentionally absent from the normalized Tx schema.
Load estimate: Medium; payload size depends on chain-specific fields and transaction complexity.
Parameters
txidstringrequiredpathTransaction id/hash.
Response
Chain-specific transaction payload.
Public API error.
Authorization
api-keyAuthapiKey in headerGet raw transaction hex.
Unversioned public endpoint exposed by Blockbook for raw transaction data.
Load estimate: Medium; payload size grows with raw transaction size.
Parameters
txidstringrequiredpathTransaction id/hash.
Response
Raw transaction hex as a JSON string.
Public API error.
Authorization
api-keyAuthapiKey in headerBroadcast a raw transaction using the path.
Broadcasts hex-encoded raw transaction data. Prefer POST for large payloads.
Load estimate: High; validates and forwards to the backend, with cost growing with transaction size and backend mempool policy checks.
Parameters
hexstringrequiredpathRaw transaction.
Response
Broadcast result.
Public API error.
Authorization
api-keyAuthapiKey in headerBroadcast a raw transaction using the request body.
Broadcasts hex-encoded raw transaction data from the request body. The trailing slash is mandatory in the Blockbook handler. POST bodies are limited to 8 MiB.
Load estimate: High; validates and forwards to the backend, with cost growing with transaction size and backend mempool policy checks.
Body
Response
Broadcast result.
Public API error.
Authorization
api-keyAuthapiKey in headerGet address/account details.
Returns balances and transactions of an address. Transactions are sorted by block height with newest blocks first. Response size is controlled by the details parameter.
At details=basic, mempool transactions are not aggregated: unconfirmedBalance, unconfirmedSending, and unconfirmedReceiving are omitted, and unconfirmedTxs reports the raw mempool index size for the address.
Load estimate: Variable; basic is low, token/tokenBalances and txids/txslight are medium, and txs can be high as it grows with pageSize, transactions, token rows, filters, and protocol enrichment.
Parameters
addressstringrequiredpathChain address.
pageinteger>= 1query1-based page index. Values outside safe bounds are sanitized to the closest possible page.
pageSizeinteger[1, 1000]queryNumber of history items per page. The default and maximum for REST account endpoints is 1000.
frominteger>= 0queryFirst block height included in account transaction filtering.
tointeger>= 0queryLast block height included in account transaction filtering.
detailsstringbasictokenstokenBalancestxidstxslighttxstxidsqueryControls how much account data is returned. basic returns balances and counts only. tokens adds known token rows. tokenBalances returns token rows with balances. txids adds paged transaction ids. txslight adds limited transaction details from the index. txs adds full transaction details.
filterstring | integerqueryFilter account history by input/output side, or by numeric token/internal filter id.
contractstringqueryContract address used to filter token data.
protocolsArray<string>queryOptional protocol enrichments, comma-separated or repeated. Currently supported value: erc4626. Unknown values are rejected.
secondarystringquerySecondary currency code used to populate fiat values.
Response
Address/account details.
Public API error.
Authorization
api-keyAuthapiKey in headerGet account balance history.
Returns balance history points for an address, XPUB, or descriptor. from and to are Unix timestamps. groupBy is an aggregation interval in seconds and defaults to 3600. When fiatcurrency is omitted, rates can contain all available currencies. sentToSelf is the amount sent from an address to itself or within addresses of the same XPUB.
Load estimate: High; grows with account transaction history, time span, grouping cardinality, fiat rate lookups, and XPUB/descriptor gap.
Parameters
descriptorstringrequiredpathAddress, XPUB, or supported descriptor. URL-encode descriptors.
frominteger<int64>queryUnix timestamp lower bound.
tointeger<int64>queryUnix timestamp upper bound.
fiatcurrencystringqueryOptional fiat currency code to include in rates.
groupByinteger>= 1queryAggregation interval in seconds. Defaults to 3600.
gapinteger[0, 10000]queryXPUB/address derivation gap limit.
Response
Balance history points.
Public API error.
Authorization
api-keyAuthapiKey in headerGet contract metadata.
Returns indexed token/contract metadata and optional current protocol enrichments such as ERC4626.
blockHeight reflects the indexer's best block at request time. ERC4626 fields under protocols.erc4626 are fetched through JSON-RPC calls pinned to that exact blockHeight, so the ERC4626 values are a consistent snapshot. If a vault is detected but the underlying asset metadata cannot be resolved, protocols.erc4626 contains error and omits asset; callers must not derive fiat rates or human-unit exchange rates from such a partial response.
Load estimate: Medium; indexed metadata is cheap, but optional protocol enrichment can add backend RPC calls and token metadata lookups.
Parameters
contractstringrequiredpathSmart contract address.
currencystringquerySecondary currency code for rates.
protocolsArray<string>queryOptional protocol enrichments, comma-separated or repeated.
Response
Contract metadata.
Public API error.
Authorization
api-keyAuthapiKey in headerEstimate a fee target.
Returns backend fee estimation for the requested confirmation target.
Load estimate: Low; a small backend fee estimate lookup.
Parameters
blocksinteger>= 1requiredpathConfirmation target in blocks.
conservativebooleantruequeryUse conservative smart fee estimation where supported.
Response
Decimal fee estimate in chain base currency.
Public API error.
Authorization
api-keyAuthapiKey in headerGet fee statistics for a block.
Returns fee statistics for transactions in one block.
Load estimate: Medium to high; grows with the number of transactions in the requested block.
Parameters
blockIdstringrequiredpathBlock height or block hash.
Response
Fee statistics.
Public API error.
Authorization
api-keyAuthapiKey in headerGet current or historical fiat rates.
Returns currency rates for the requested currency and date. If a rate is unavailable for the exact timestamp, the closest available rate can be returned. Responses include the actual rate timestamp. Without a currency parameter, all available currencies can be returned. A rate of -1 marks an unavailable or invalid currency for that timestamp.
Load estimate: Low to medium; specific currency lookups are cheap, while omitted currency and token lookups increase response size.
Parameters
currencystringqueryOptional currency code. When omitted, all available rates can be returned.
timestampinteger<int64>queryUnix timestamp for historical rates.
blockstringqueryBlock height or hash whose timestamp should be used for historical rates.
tokenstringqueryOptional token symbol or contract/address key for token-specific rates.
Response
Fiat rate ticker.
Public API error.
Authorization
api-keyAuthapiKey in headerGet fiat rates for multiple timestamps.
Returns fiat rate tickers for a comma-separated list of Unix timestamps.
Load estimate: Medium; work and payload grow linearly with timestamp count, plus token/currency selection.
Parameters
timestampstringrequiredqueryComma-separated Unix timestamps.
currencystringqueryOptional currency code.
tokenstringqueryOptional token symbol or contract/address key.
Response
Fiat rate tickers.
Public API error.
Authorization
api-keyAuthapiKey in headerGet currencies available for a timestamp.
Returns available secondary currencies for a date together with the actual rate timestamp.
Load estimate: Low to medium; token lookups and wide currency lists increase response size.
Parameters
timestampinteger<int64>requiredqueryUnix timestamp for the requested currency list.
tokenstringqueryOptional token symbol or contract/address key.
Response
Available currencies.
Public API error.
Authorization
api-keyAuthapiKey in headerBlockBook (legacy)
Legacy get block hash by height.
Bitcore Insight-compatible V1 route for Bitcoin-type coins.
Load estimate: Low; indexed height-to-hash lookup.
Parameters
heightinteger>= 0requiredpathBlock height on the backend main chain.
Response
Block hash at the requested height.
Public API error.
Authorization
api-keyAuthapiKey in headerLegacy get transaction.
Bitcore Insight-compatible V1 transaction shape for Bitcoin-type coins.
Load estimate: Medium; grows with inputs, outputs, scripts, and raw transaction size.
Parameters
txidstringrequiredpathTransaction id/hash.
Response
Legacy transaction payload.
Public API error.
Authorization
api-keyAuthapiKey in headerLegacy get address.
Bitcore Insight-compatible V1 address shape for Bitcoin-type coins.
Load estimate: Variable; grows with address transaction count and legacy response expansion.
Parameters
addressstringrequiredpathChain address.
Response
Legacy address payload.
Public API error.
Authorization
api-keyAuthapiKey in headerLegacy get address UTXOs.
Bitcore Insight-compatible V1 UTXO list for Bitcoin-type coins.
Load estimate: Medium; grows with the number of unspent outputs.
Parameters
addressstringrequiredpathChain address.
Response
Legacy UTXO list.
Public API error.
Authorization
api-keyAuthapiKey in headerLegacy get block by height or hash.
Bitcore Insight-compatible V1 block shape for Bitcoin-type coins.
Load estimate: Medium to high; grows with block transaction count and legacy payload size.
Parameters
blockIdstringrequiredpathBlock height or block hash.
Response
Legacy block payload.
Public API error.
Authorization
api-keyAuthapiKey in headerLegacy estimate fee target.
Bitcore Insight-compatible V1 fee estimate for Bitcoin-type coins.
Load estimate: Low; a small backend fee estimate lookup.
Parameters
blocksinteger>= 1requiredpathConfirmation target in blocks.
Response
Decimal fee estimate in chain base currency.
Public API error.
Authorization
api-keyAuthapiKey in headerLegacy broadcast transaction using the path.
Bitcore Insight-compatible V1 broadcast route for Bitcoin-type coins.
Load estimate: High; validates and forwards to the backend, with cost growing with transaction size and backend mempool policy checks.
Parameters
hexstringrequiredpathRaw transaction.
Response
Broadcast result.
Public API error.
Authorization
api-keyAuthapiKey in headerLegacy broadcast transaction using the request body.
Bitcore Insight-compatible V1 broadcast route for Bitcoin-type coins.
Load estimate: High; validates and forwards to the backend, with cost growing with transaction size and backend mempool policy checks.
Body
Response
Broadcast result.
Public API error.
Authorization
api-keyAuthapiKey in headerMAINNET / Blockchain_RPCs
getbestblockhash
getbestblockhash
Returns the hash of the best block in the most-work fully-validated chain. The best block is the tip of the blockchain, representing the most recent block that has been validated and added to the chain.
Body
jsonrpcstringrequiredidstringrequiredmethodstringgetbestblockhashrequiredparamsArray<any>requiredResponse
Valid response
Unauthorized
Internal Server Error
Authorization
api-keyAuthapiKey in headergetblock
getblock
Returns information about the block with the given block hash. Optional verbosity levels determine the level of detail in the response:
0: Returns a string that is serialized, hex-encoded data for the block.1: Returns a JSON object with basic block details and txids.2: Returns a JSON object with detailed transaction info.
Body
jsonrpcstringrequiredidstringrequiredmethodstringgetblockrequiredparamsArray<string | integer>requiredParameters:
blockhash(string) – The hash of the blockverbosity(integer, optional) – Level of detail: 0, 1, or 2
Response
Block information retrieved successfully
Unauthorized
Internal Server Error
Authorization
api-keyAuthapiKey in headergetblockchaininfo
getblockchaininfo
Returns an object containing various state info regarding blockchain processing.
Body
jsonrpcstringrequiredidstringrequiredmethodstringgetblockchaininforequiredparamsArray<any>requiredResponse
Blockchain state information retrieved successfully
Unauthorized
Internal Server Error
Authorization
api-keyAuthapiKey in headergetblockcount
getblockcount
Returns the number of blocks in the longest blockchain. This number increases as new blocks are added.
Body
jsonrpcstringrequiredidstringrequiredmethodstringgetblockcountrequiredparamsarrayrequiredThis method takes no parameters.
Response
Current block height retrieved successfully
Unauthorized
Internal Server Error
Authorization
api-keyAuthapiKey in headergetblockhash
getblockhash
Returns the block hash of the block at the given height in the blockchain. You must provide a block height (0-based index).
Body
jsonrpcstringrequiredidstringrequiredmethodstringgetblockhashrequiredparamsArray<integer>requiredParameters:
height(integer) — The height (index) of the block.
Response
Block hash successfully retrieved
Unauthorized
Internal Server Error
Authorization
api-keyAuthapiKey in headergetblockheader
getblockheader
Returns information about the block header given a block hash.
You can specify whether to return a JSON object or raw hex-encoded string using the verbose flag.
Body
jsonrpcstringrequiredidstringrequiredmethodstringgetblockheaderrequiredparamsArray<string | boolean>requiredParameters:
blockhash(string) — The hash of the block.verbose(boolean, optional) — If true, returns a JSON object; if false, returns a hex string. Default is true.
Response
Block header information retrieved successfully
Unauthorized
Internal Server Error
Authorization
api-keyAuthapiKey in headergetblockstats
getblockstats
Returns a variety of statistics about the block identified by its height or block hash.
Body
jsonrpcstring1.02.0requiredJSON-RPC protocol version.
methodstringgetblockstatsrequiredName of the RPC method.
paramsArray<integer>Parameters for the method. For getblockstats, this is an array containing a single value – either the block height (integer) or block hash (string).
idstringrequiredRequest identifier. The response will echo this value. Can be any string or number.
Response
Successful block statistics retrieval.
Unauthorized
Internal Server Error
Authorization
api-keyAuthapiKey in headergetchaintips
getchaintips
Returns information about all known tips in the block tree, including the main chain as well as orphaned forks.
Body
jsonrpcstringrequiredidstringrequiredmethodstringgetchaintipsrequiredparamsarrayrequiredThis method takes no parameters.
Response
Chain tips retrieved successfully
Unauthorized
Internal Server Error
Authorization
api-keyAuthapiKey in headergetchaintxstats
getchaintxstats
Compute statistics about the total number and rate of transactions in the blockchain. You can optionally specify the number of blocks and a block hash to start from.
Body
jsonrpcstringrequiredidstringrequiredmethodstringgetchaintxstatsrequiredparamsArray<integer | string>requiredParameters:
nblocks(integer, optional) — Number of blocks to average over. Default: 1 month worth (~4320).blockhash(string, optional) — Hash of the block to stop at; defaults to the chain tip.
Response
Chain transaction statistics retrieved successfully
Unauthorized
Internal Server Error
Authorization
api-keyAuthapiKey in headergetdifficulty
getdifficulty
Returns the current difficulty as a multiple of the minimum difficulty (lowest possible difficulty on the network). This is a relative measure of how difficult it is to find a new block.
Body
jsonrpcstringrequiredidstringrequiredmethodstringgetdifficultyrequiredparamsarrayrequiredThis method takes no parameters.
Response
Difficulty value returned successfully
Unauthorized
Internal Server Error
Authorization
api-keyAuthapiKey in headergetmempoolancestors
getmempoolancestors
Returns all in-mempool ancestor transactions for a given transaction ID. An ancestor is a transaction whose outputs are used as inputs in another transaction. You can get a summary or detailed object output.
Body
jsonrpcstringrequiredidstringrequiredmethodstringgetmempoolancestorsrequiredparamsArray<string | boolean>requiredParameters:
txid(string, required) — Transaction ID to query.verbose(boolean, optional) — Whether to return a JSON object or just an array of txids. Default is false.
Response
Ancestor transaction(s) retrieved successfully
Unauthorized
Internal Server Error
Authorization
api-keyAuthapiKey in headergetmempooldescendants
getmempooldescendants
Returns all in-mempool descendant transactions for a given transaction ID. Descendants are transactions that depend on the outputs of the specified transaction. Can return either a simple list of transaction IDs or detailed JSON objects.
Body
jsonrpcstringrequiredidstringrequiredmethodstringgetmempooldescendantsrequiredparamsArray<string | boolean>requiredParameters:
txid(string, required) — Transaction ID to query descendants for.verbose(boolean, optional) — Return JSON object if true, or list of txids if false. Default: false.
Response
Descendant transactions retrieved successfully
Unauthorized
Internal Server Error
Authorization
api-keyAuthapiKey in headergetmempoolentry
getmempoolentry
Returns detailed information about a transaction currently in the mempool.
Requires the transaction ID (txid) as a parameter.
Body
jsonrpcstringrequiredidstringrequiredmethodstringgetmempoolentryrequiredparamsArray<string>requiredParameters:
txid(string, required) — Transaction ID to query.
Response
Mempool entry details retrieved successfully
Unauthorized
Internal Server Error
Authorization
api-keyAuthapiKey in headergetmempoolinfo
getmempoolinfo
Returns details about the current state of the mempool, including size, usage, fees, and more. No parameters required.
Body
jsonrpcstringrequiredidstringrequiredmethodstringgetmempoolinforequiredparamsArray<any>requiredNo parameters required
Response
Mempool info retrieved successfully
Unauthorized
Internal Server Error
Authorization
api-keyAuthapiKey in headergetrawmempool
getrawmempool
Returns all transaction IDs currently in the mempool.
If verbose is true, returns a JSON object with detailed mempool entry information for each transaction.
Body
jsonrpcstringrequiredidstringrequiredmethodstringgetrawmempoolrequiredparamsArray<boolean>requiredParameters:
verbose(boolean, optional) — If true, return detailed JSON objects instead of txid array. Default: false.
Response
Mempool transactions retrieved successfully
Unauthorized
Internal Server Error
Authorization
api-keyAuthapiKey in headergettxout
gettxout
Returns details about an unspent transaction output (UTXO) specified by transaction ID and output index.
Body
jsonrpcstringrequiredidstringrequiredmethodstringgettxoutrequiredparamsArray<string | integer | boolean>requiredParameters:
txid(string, required) — The transaction ID.vout(integer, required) — The output index.include_mempool(boolean, optional, default: true) — Whether to include mempool transactions.
Response
UTXO details retrieved successfully
Unauthorized
Internal Server Error
Authorization
api-keyAuthapiKey in headergettxoutproof
gettxoutproof
Returns a hex-encoded proof that one or more transactions are included in a block.
The proof can be validated with verifytxoutproof.
Body
jsonrpcstringrequiredidstringrequiredmethodstringgettxoutproofrequiredparamsArray<Array<string> | string>requiredParameters:
txids(array[string], required) — Array of transaction IDs to prove inclusion.blockhash(string, optional) — Hash of the block to look for transactions. If omitted, searches the entire blockchain.
Response
Proof retrieved successfully
Unauthorized
Internal Server Error
Authorization
api-keyAuthapiKey in headerpreciousblock
preciousblock
Marks a block as "precious," causing the node to reconsider the chain from that block. This can be used to manually reorganize the chain to a particular fork.
Body
jsonrpcstringrequiredidstringrequiredmethodstringpreciousblockrequiredparamsArray<string>requiredParameters:
blockhash(string, required) — The hash of the block to mark as precious.
Response
Block marked as precious successfully
Unauthorized
Internal Server Error
Authorization
api-keyAuthapiKey in headerTESTNET / Blockchain_RPCs
getbestblockhash
getbestblockhash
Returns the hash of the best block in the most-work fully-validated chain. The best block is the tip of the blockchain, representing the most recent block that has been validated and added to the chain.
Body
jsonrpcstringrequiredidstringrequiredmethodstringgetbestblockhashrequiredparamsArray<any>requiredResponse
Valid response
Unauthorized
Internal Server Error
Authorization
api-keyAuthapiKey in headergetblock
getblock
Returns information about the block with the given block hash. Optional verbosity levels determine the level of detail in the response:
0: Returns a string that is serialized, hex-encoded data for the block.1: Returns a JSON object with basic block details and txids.2: Returns a JSON object with detailed transaction info.
Body
jsonrpcstringrequiredidstringrequiredmethodstringgetblockrequiredparamsArray<string | integer>requiredParameters:
blockhash(string) – The hash of the blockverbosity(integer, optional) – Level of detail: 0, 1, or 2
Response
Block information retrieved successfully
Unauthorized
Internal Server Error
Authorization
api-keyAuthapiKey in headergetblockchaininfo
getblockchaininfo
Returns an object containing various state info regarding blockchain processing.
Body
jsonrpcstringrequiredidstringrequiredmethodstringgetblockchaininforequiredparamsArray<any>requiredResponse
Blockchain state information retrieved successfully
Unauthorized
Internal Server Error
Authorization
api-keyAuthapiKey in headergetblockcount
getblockcount
Returns the number of blocks in the longest blockchain. This number increases as new blocks are added.
Body
jsonrpcstringrequiredidstringrequiredmethodstringgetblockcountrequiredparamsarrayrequiredThis method takes no parameters.
Response
Current block height retrieved successfully
Unauthorized
Internal Server Error
Authorization
api-keyAuthapiKey in headergetblockhash
getblockhash
Returns the block hash of the block at the given height in the blockchain. You must provide a block height (0-based index).
Body
jsonrpcstringrequiredidstringrequiredmethodstringgetblockhashrequiredparamsArray<integer>requiredParameters:
height(integer) — The height (index) of the block.
Response
Block hash successfully retrieved
Unauthorized
Internal Server Error
Authorization
api-keyAuthapiKey in headergetblockheader
getblockheader
Returns information about the block header given a block hash.
You can specify whether to return a JSON object or raw hex-encoded string using the verbose flag.
Body
jsonrpcstringrequiredidstringrequiredmethodstringgetblockheaderrequiredparamsArray<string | boolean>requiredParameters:
blockhash(string) — The hash of the block.verbose(boolean, optional) — If true, returns a JSON object; if false, returns a hex string. Default is true.
Response
Block header information retrieved successfully
Unauthorized
Internal Server Error
Authorization
api-keyAuthapiKey in headergetblockstats
getblockstats
Returns a variety of statistics about the block identified by its height or block hash.
Body
jsonrpcstring1.02.0requiredJSON-RPC protocol version.
methodstringgetblockstatsrequiredName of the RPC method.
paramsArray<integer>Parameters for the method. For getblockstats, this is an array containing a single value – either the block height (integer) or block hash (string).
idstringrequiredRequest identifier. The response will echo this value. Can be any string or number.
Response
Successful block statistics retrieval.
Unauthorized
Internal Server Error
Authorization
api-keyAuthapiKey in headergetchaintips
getchaintips
Returns information about all known tips in the block tree, including the main chain as well as orphaned forks.
Body
jsonrpcstringrequiredidstringrequiredmethodstringgetchaintipsrequiredparamsarrayrequiredThis method takes no parameters.
Response
Chain tips retrieved successfully
Unauthorized
Internal Server Error
Authorization
api-keyAuthapiKey in headergetchaintxstats
getchaintxstats
Compute statistics about the total number and rate of transactions in the blockchain. You can optionally specify the number of blocks and a block hash to start from.
Body
jsonrpcstringrequiredidstringrequiredmethodstringgetchaintxstatsrequiredparamsArray<integer | string>requiredParameters:
nblocks(integer, optional) — Number of blocks to average over. Default: 1 month worth (~4320).blockhash(string, optional) — Hash of the block to stop at; defaults to the chain tip.
Response
Chain transaction statistics retrieved successfully
Unauthorized
Internal Server Error
Authorization
api-keyAuthapiKey in headergetdifficulty
getdifficulty
Returns the current difficulty as a multiple of the minimum difficulty (lowest possible difficulty on the network). This is a relative measure of how difficult it is to find a new block.
Body
jsonrpcstringrequiredidstringrequiredmethodstringgetdifficultyrequiredparamsarrayrequiredThis method takes no parameters.
Response
Difficulty value returned successfully
Unauthorized
Internal Server Error
Authorization
api-keyAuthapiKey in headergetmempoolancestors
getmempoolancestors
Returns all in-mempool ancestor transactions for a given transaction ID. An ancestor is a transaction whose outputs are used as inputs in another transaction. You can get a summary or detailed object output.
Body
jsonrpcstringrequiredidstringrequiredmethodstringgetmempoolancestorsrequiredparamsArray<string | boolean>requiredParameters:
txid(string, required) — Transaction ID to query.verbose(boolean, optional) — Whether to return a JSON object or just an array of txids. Default is false.
Response
Ancestor transaction(s) retrieved successfully
Unauthorized
Internal Server Error
Authorization
api-keyAuthapiKey in headergetmempooldescendants
getmempooldescendants
Returns all in-mempool descendant transactions for a given transaction ID. Descendants are transactions that depend on the outputs of the specified transaction. Can return either a simple list of transaction IDs or detailed JSON objects.
Body
jsonrpcstringrequiredidstringrequiredmethodstringgetmempooldescendantsrequiredparamsArray<string | boolean>requiredParameters:
txid(string, required) — Transaction ID to query descendants for.verbose(boolean, optional) — Return JSON object if true, or list of txids if false. Default: false.
Response
Descendant transactions retrieved successfully
Unauthorized
Internal Server Error
Authorization
api-keyAuthapiKey in headergetmempoolentry
getmempoolentry
Returns detailed information about a transaction currently in the mempool.
Requires the transaction ID (txid) as a parameter.
Body
jsonrpcstringrequiredidstringrequiredmethodstringgetmempoolentryrequiredparamsArray<string>requiredParameters:
txid(string, required) — Transaction ID to query.
Response
Mempool entry details retrieved successfully
Unauthorized
Internal Server Error
Authorization
api-keyAuthapiKey in headergetmempoolinfo
getmempoolinfo
Returns details about the current state of the mempool, including size, usage, fees, and more. No parameters required.
Body
jsonrpcstringrequiredidstringrequiredmethodstringgetmempoolinforequiredparamsArray<any>requiredNo parameters required
Response
Mempool info retrieved successfully
Unauthorized
Internal Server Error
Authorization
api-keyAuthapiKey in headergetrawmempool
getrawmempool
Returns all transaction IDs currently in the mempool.
If verbose is true, returns a JSON object with detailed mempool entry information for each transaction.
Body
jsonrpcstringrequiredidstringrequiredmethodstringgetrawmempoolrequiredparamsArray<boolean>requiredParameters:
verbose(boolean, optional) — If true, return detailed JSON objects instead of txid array. Default: false.
Response
Mempool transactions retrieved successfully
Unauthorized
Internal Server Error
Authorization
api-keyAuthapiKey in headergettxout
gettxout
Returns details about an unspent transaction output (UTXO) specified by transaction ID and output index.
Body
jsonrpcstringrequiredidstringrequiredmethodstringgettxoutrequiredparamsArray<string | integer | boolean>requiredParameters:
txid(string, required) — The transaction ID.vout(integer, required) — The output index.include_mempool(boolean, optional, default: true) — Whether to include mempool transactions.
Response
UTXO details retrieved successfully
Unauthorized
Internal Server Error
Authorization
api-keyAuthapiKey in headergettxoutproof
gettxoutproof
Returns a hex-encoded proof that one or more transactions are included in a block.
The proof can be validated with verifytxoutproof.
Body
jsonrpcstringrequiredidstringrequiredmethodstringgettxoutproofrequiredparamsArray<Array<string> | string>requiredParameters:
txids(array[string], required) — Array of transaction IDs to prove inclusion.blockhash(string, optional) — Hash of the block to look for transactions. If omitted, searches the entire blockchain.
Response
Proof retrieved successfully
Unauthorized
Internal Server Error
Authorization
api-keyAuthapiKey in headerpreciousblock
preciousblock
Marks a block as "precious," causing the node to reconsider the chain from that block. This can be used to manually reorganize the chain to a particular fork.
Body
jsonrpcstringrequiredidstringrequiredmethodstringpreciousblockrequiredparamsArray<string>requiredParameters:
blockhash(string, required) — The hash of the block to mark as precious.
Response
Block marked as precious successfully
Unauthorized
Internal Server Error
Authorization
api-keyAuthapiKey in headerMAINNET / Mining_RPCs
getmininginfo
getmininginfo
Returns mining-related information such as current block, difficulty, network hash rate, etc. No parameters are required.
Body
jsonrpcstringrequiredJSON-RPC version (always "1.0")
idstringrequiredRequest identifier
methodstringgetmininginforequiredThe RPC method name
paramsarrayrequiredNo parameters required
Response
Mining info retrieved successfully
Unauthorized
Internal Server Error
Authorization
api-keyAuthapiKey in headergetnetworkhashps
getnetworkhashps
Returns the estimated network hashes per second (hash rate) based on the last nblocks blocks.
This provides an estimate of the total computational power securing the network.
Body
jsonrpcstringrequiredThe JSON-RPC protocol version (always "1.0")
idstringrequiredThe identifier for the request
methodstringgetnetworkhashpsrequiredThe name of the RPC method
paramsArray<integer>requiredOptional parameters:
nblocks(integer) — The number of blocks to average over. Default is 120.height(integer) — Use the block at this height instead of the current tip. Use -1 for the tip.
Response
Hash rate retrieved successfully
Unauthorized
Internal Server Error
Authorization
api-keyAuthapiKey in headerTESTNET / Mining_RPCs
getmininginfo
getmininginfo
Returns mining-related information such as current block, difficulty, network hash rate, etc. No parameters are required.
Body
jsonrpcstringrequiredJSON-RPC version (always "1.0")
idstringrequiredRequest identifier
methodstringgetmininginforequiredThe RPC method name
paramsarrayrequiredNo parameters required
Response
Mining info retrieved successfully
Unauthorized
Internal Server Error
Authorization
api-keyAuthapiKey in headergetnetworkhashps
getnetworkhashps
Returns the estimated network hashes per second (hash rate) based on the last nblocks blocks.
This provides an estimate of the total computational power securing the network.
Body
jsonrpcstringrequiredThe JSON-RPC protocol version (always "1.0")
idstringrequiredThe identifier for the request
methodstringgetnetworkhashpsrequiredThe name of the RPC method
paramsArray<integer>requiredOptional parameters:
nblocks(integer) — The number of blocks to average over. Default is 120.height(integer) — Use the block at this height instead of the current tip. Use -1 for the tip.
Response
Hash rate retrieved successfully
Unauthorized
Internal Server Error
Authorization
api-keyAuthapiKey in headerMAINNET / Rawtransactions_RPCs
createrawtransaction
createrawtransaction
Creates an unsigned raw transaction from a list of inputs and outputs. The transaction is returned as a serialized hex string, which can then be signed and broadcast.
Body
jsonrpcstringrequiredidstringrequiredmethodstringcreaterawtransactionrequiredparamsArray<Array<object> | object | integer | boolean>requiredParameters:
inputs(array) — List of transaction inputs, each includingtxidandvout.outputs(object) — Destination addresses and amounts.locktime(integer, optional) — Locktime value.replaceable(boolean, optional) — Whether this transaction signals BIP125 replaceability.
Response
Unsigned raw transaction created successfully
Unauthorized
Internal Server Error
Authorization
api-keyAuthapiKey in headerdecoderawtransaction
decoderawtransaction
Decodes a raw hex-encoded Bitcoin transaction and returns a JSON object with readable fields. Useful for viewing the contents of raw transactions before broadcasting.
Body
jsonrpcstringrequiredidstringrequiredmethodstringdecoderawtransactionrequiredparamsArray<string>requiredParameters:
hexstring(string, required) — The raw transaction hex string.
Response
Transaction decoded successfully
Unauthorized
Internal Server Error
Authorization
api-keyAuthapiKey in headerdecodescript
decodescript
Decodes a hex-encoded script (usually scriptPubKey) and returns a JSON representation including the script type and addresses. Useful for analyzing output scripts or creating Pay-to-Script-Hash addresses.
Body
jsonrpcstringrequiredJSON-RPC version
idstringrequiredRequest identifier
methodstringdecodescriptrequiredRPC method name
paramsArray<string>requiredParameters:
hexstring(string, required) — The script in hex format to decode.
Response
Script decoded successfully
Unauthorized
Internal Server Error
Authorization
api-keyAuthapiKey in headergetrawtransaction
getrawtransaction
Retrieves a raw transaction by its txid.
If verbose is false or omitted, the result is a raw hex string.
If verbose is true, returns a JSON object with decoded transaction details.
Body
jsonrpcstringrequiredidstringrequiredmethodstringgetrawtransactionrequiredparamsArray<string | boolean>requiredParameters:
txid(string, required) — The transaction ID.verbose(boolean, optional) — If true, return JSON; if false, return hex. Default: false.
Response
Transaction retrieved successfully
Unauthorized
Internal Server Error
Authorization
api-keyAuthapiKey in headersendrawtransaction
sendrawtransaction
Submits a raw transaction (hex-encoded string) to the mempool and broadcasts it to the network. Returns the transaction ID (txid) if accepted.
Body
jsonrpcstringrequiredidstringrequiredmethodstringsendrawtransactionrequiredparamsArray<string | number | boolean>requiredParameters:
hexstring(string, required): The raw transaction in hex format.maxfeerate(number or boolean, optional): Reject transactions with fees higher than this (BTC/KB). Usefalseto disable check.
Response
Transaction accepted and broadcasted
Unauthorized
Internal Server Error
Authorization
api-keyAuthapiKey in headersignrawtransactionwithkey
signrawtransactionwithkey
Signs inputs for a raw transaction using explicitly provided private keys, without needing access to a local wallet. Useful for offline signing or stateless transaction construction.
Body
jsonrpcstringrequiredidstringrequiredmethodstringsignrawtransactionwithkeyrequiredparamsArray<string | Array<string> | Array<object>>requiredParameters:
hexstring(string, required): The raw transaction hex string.privkeys(array of strings, required): Array of WIF private keys.prevtxs(array, optional): Array of previous output details for inputs to sign.
Response
Transaction signed successfully
Unauthorized
Internal Server Error
Authorization
api-keyAuthapiKey in headerTESTNET / Rawtransactions_RPCs
createrawtransaction
createrawtransaction
Creates an unsigned raw transaction from a list of inputs and outputs. The transaction is returned as a serialized hex string, which can then be signed and broadcast.
Body
jsonrpcstringrequiredidstringrequiredmethodstringcreaterawtransactionrequiredparamsArray<Array<object> | object | integer | boolean>requiredParameters:
inputs(array) — List of transaction inputs, each includingtxidandvout.outputs(object) — Destination addresses and amounts.locktime(integer, optional) — Locktime value.replaceable(boolean, optional) — Whether this transaction signals BIP125 replaceability.
Response
Unsigned raw transaction created successfully
Unauthorized
Internal Server Error
Authorization
api-keyAuthapiKey in headerdecoderawtransaction
decoderawtransaction
Decodes a raw hex-encoded Bitcoin transaction and returns a JSON object with readable fields. Useful for viewing the contents of raw transactions before broadcasting.
Body
jsonrpcstringrequiredidstringrequiredmethodstringdecoderawtransactionrequiredparamsArray<string>requiredParameters:
hexstring(string, required) — The raw transaction hex string.
Response
Transaction decoded successfully
Unauthorized
Internal Server Error
Authorization
api-keyAuthapiKey in headerdecodescript
decodescript
Decodes a hex-encoded script (usually scriptPubKey) and returns a JSON representation including the script type and addresses. Useful for analyzing output scripts or creating Pay-to-Script-Hash addresses.
Body
jsonrpcstringrequiredJSON-RPC version
idstringrequiredRequest identifier
methodstringdecodescriptrequiredRPC method name
paramsArray<string>requiredParameters:
hexstring(string, required) — The script in hex format to decode.
Response
Script decoded successfully
Unauthorized
Internal Server Error
Authorization
api-keyAuthapiKey in headergetrawtransaction
getrawtransaction
Retrieves a raw transaction by its txid.
If verbose is false or omitted, the result is a raw hex string.
If verbose is true, returns a JSON object with decoded transaction details.
Body
jsonrpcstringrequiredidstringrequiredmethodstringgetrawtransactionrequiredparamsArray<string | boolean>requiredParameters:
txid(string, required) — The transaction ID.verbose(boolean, optional) — If true, return JSON; if false, return hex. Default: false.
Response
Transaction retrieved successfully
Unauthorized
Internal Server Error
Authorization
api-keyAuthapiKey in headersendrawtransaction
sendrawtransaction
Submits a raw transaction (hex-encoded string) to the mempool and broadcasts it to the network. Returns the transaction ID (txid) if accepted.
Body
jsonrpcstringrequiredidstringrequiredmethodstringsendrawtransactionrequiredparamsArray<string | number | boolean>requiredParameters:
hexstring(string, required): The raw transaction in hex format.maxfeerate(number or boolean, optional): Reject transactions with fees higher than this (BTC/KB). Usefalseto disable check.
Response
Transaction accepted and broadcasted
Unauthorized
Internal Server Error
Authorization
api-keyAuthapiKey in headersignrawtransactionwithkey
signrawtransactionwithkey
Signs inputs for a raw transaction using explicitly provided private keys, without needing access to a local wallet. Useful for offline signing or stateless transaction construction.
Body
jsonrpcstringrequiredidstringrequiredmethodstringsignrawtransactionwithkeyrequiredparamsArray<string | Array<string> | Array<object>>requiredParameters:
hexstring(string, required): The raw transaction hex string.privkeys(array of strings, required): Array of WIF private keys.prevtxs(array, optional): Array of previous output details for inputs to sign.
Response
Transaction signed successfully
Unauthorized
Internal Server Error
Authorization
api-keyAuthapiKey in headerMAINNET / Util_RPCs
signmessagewithprivkey
signmessagewithprivkey
Signs a message with the given private key (in WIF format). Returns the base64-encoded signature.
Body
jsonrpcstringrequiredidstringrequiredmethodstringsignmessagewithprivkeyrequiredparamsArray<string>requiredParameters:
privkey(string, required): The private key in WIF format.message(string, required): The message to sign.
Response
Message signed successfully
Unauthorized
Internal Server Error
Authorization
api-keyAuthapiKey in headervalidateaddress
validateaddress
Validate a Bitcoin address and return useful information such as whether it is valid, script, or witness, and optionally if it's linked to the wallet.
Body
jsonrpcstringrequiredidstringrequiredmethodstringvalidateaddressrequiredparamsArray<string>requiredParameters:
address(string, required): The Bitcoin address to validate.
Response
Address validation result
Unauthorized
Internal Server Error
Authorization
api-keyAuthapiKey in headerverifymessage
verifymessage
Verify a message signature. Returns true if the signature is valid and corresponds to the provided address and message.
Body
jsonrpcstringrequiredidstringrequiredmethodstringverifymessagerequiredparamsArray<string>requiredParameters:
address(string, required): The Bitcoin address to verify.signature(string, required): The base64-encoded signature.message(string, required): The original signed message.
Response
Signature verification result
Unauthorized
Internal Server Error
Authorization
api-keyAuthapiKey in headerTESTNET / Util_RPCs
signmessagewithprivkey
signmessagewithprivkey
Signs a message with the given private key (in WIF format). Returns the base64-encoded signature.
Body
jsonrpcstringrequiredidstringrequiredmethodstringsignmessagewithprivkeyrequiredparamsArray<string>requiredParameters:
privkey(string, required): The private key in WIF format.message(string, required): The message to sign.
Response
Message signed successfully
Unauthorized
Internal Server Error
Authorization
api-keyAuthapiKey in headervalidateaddress
validateaddress
Validate a Bitcoin address and return useful information such as whether it is valid, script, or witness, and optionally if it's linked to the wallet.
Body
jsonrpcstringrequiredidstringrequiredmethodstringvalidateaddressrequiredparamsArray<string>requiredParameters:
address(string, required): The Bitcoin address to validate.
Response
Address validation result
Unauthorized
Internal Server Error
Authorization
api-keyAuthapiKey in headerverifymessage
verifymessage
Verify a message signature. Returns true if the signature is valid and corresponds to the provided address and message.
Body
jsonrpcstringrequiredidstringrequiredmethodstringverifymessagerequiredparamsArray<string>requiredParameters:
address(string, required): The Bitcoin address to verify.signature(string, required): The base64-encoded signature.message(string, required): The original signed message.
Response
Signature verification result
Unauthorized
Internal Server Error
Authorization
api-keyAuthapiKey in header