Home

Blockbook API

v2.0.0-draft
Base URL
https://bchbook.nownodes.io

Use the Bitcoin Cash Blockbook API to work with indexed blockchain data without processing raw node responses yourself. The endpoints cover blocks, transactions, addresses, balances, UTXOs, fees, and other explorer-style data that applications can query through NOWNodes. (NOWNodes RPC Swagger)

Canonical 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-keyAuthapiKey

NOWNodes API key passed in the api-key header.

API Key: api-key in header

MAINNET / Blockbook 0.6.0

BlockBook

BlockBook operations.

Get Blockbook and backend status.

GET
https://bchbook.nownodes.io/api/status

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

Returns Blockbook sync state and connected backend metadata.

Load estimate: Low; constant-size status metadata.

Response

200OK

Current Blockbook and backend status.

400Bad Request

Bad Request

401Unauthorized

Unauthorized. Returned when the api-key header is missing, empty, or not accepted by the NOWNodes gateway. The body is plain text.

405Method Not Allowed

Method Not Allowed. Returned by the NOWNodes gateway for malformed or unsupported gateway-level requests.

422Unprocessable Entity

Unprocessable Entity. Returned by the NOWNodes gateway for requests it accepts but cannot process. The body is plain text.

500Internal Server Error

Internal Server Error

503Service Unavailable

Service Unavailable

default

Public API error. Public validation errors are HTTP 400; internal errors are HTTP 500.

Get status from the API index handler.

GET
https://bchbook.nownodes.io/api

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

Alias served by the same handler as /api/status on full public interfaces.

Load estimate: Low; constant-size status metadata.

Response

200OK

Current Blockbook and backend status.

400Bad Request

Bad Request

401Unauthorized

Unauthorized. Returned when the api-key header is missing, empty, or not accepted by the NOWNodes gateway. The body is plain text.

405Method Not Allowed

Method Not Allowed. Returned by the NOWNodes gateway for malformed or unsupported gateway-level requests.

422Unprocessable Entity

Unprocessable Entity. Returned by the NOWNodes gateway for requests it accepts but cannot process. The body is plain text.

500Internal Server Error

Internal Server Error

503Service Unavailable

Service Unavailable

default

Public API error.

Get a block hash by height.

GET
https://bchbook.nownodes.io/api/v2/block-index/{height}

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

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>= 0requiredpath

Block height on the backend main chain.

Response

200OK

Block hash at the requested height.

400Bad Request

Bad Request

401Unauthorized

Unauthorized. Returned when the api-key header is missing, empty, or not accepted by the NOWNodes gateway. The body is plain text.

405Method Not Allowed

Method Not Allowed. Returned by the NOWNodes gateway for malformed or unsupported gateway-level requests.

422Unprocessable Entity

Unprocessable Entity. Returned by the NOWNodes gateway for requests it accepts but cannot process. The body is plain text.

500Internal Server Error

Internal Server Error

503Service Unavailable

Service Unavailable

default

Public API error.

Get a block by height or hash.

GET
https://bchbook.nownodes.io/api/v2/block/{blockId}

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

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

blockIdstringrequiredpath

Block height or block hash.

pageinteger>= 1query

1-based page index. Values outside safe bounds are sanitized to the closest possible page.

Response

200OK

Block details.

400Bad Request

Bad Request

401Unauthorized

Unauthorized. Returned when the api-key header is missing, empty, or not accepted by the NOWNodes gateway. The body is plain text.

405Method Not Allowed

Method Not Allowed. Returned by the NOWNodes gateway for malformed or unsupported gateway-level requests.

422Unprocessable Entity

Unprocessable Entity. Returned by the NOWNodes gateway for requests it accepts but cannot process. The body is plain text.

500Internal Server Error

Internal Server Error

503Service Unavailable

Service Unavailable

default

Public API error.

Get raw block hex.

GET
https://bchbook.nownodes.io/api/v2/rawblock/{blockId}

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

Returns raw serialized block data.

Load estimate: High for large blocks; payload size grows with the raw block size.

Parameters

blockIdstringrequiredpath

Block height or block hash.

Response

200OK

Raw block data.

400Bad Request

Bad Request

401Unauthorized

Unauthorized. Returned when the api-key header is missing, empty, or not accepted by the NOWNodes gateway. The body is plain text.

405Method Not Allowed

Method Not Allowed. Returned by the NOWNodes gateway for malformed or unsupported gateway-level requests.

422Unprocessable Entity

Unprocessable Entity. Returned by the NOWNodes gateway for requests it accepts but cannot process. The body is plain text.

500Internal Server Error

Internal Server Error

503Service Unavailable

Service Unavailable

default

Public API error.

Get compact block filters.

GET
https://bchbook.nownodes.io/api/v2/block-filters

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

Returns compact block filters for the configured script type. Provide either lastN or a from/to range. When to is omitted for a range, the current best height is used.

Compact block filters are not currently enabled on the NOWNodes Bitcoin Cash endpoint. Requests succeed and return the requested heights with their block hashes, but each filter value comes back empty. Send scriptType empty, as no script type is configured.

Load estimate: High for wide ranges; work and payload grow linearly with the number of requested filters.

Parameters

scriptTypestringrequiredquery

Script type used for block filters. No script type is configured on the NOWNodes Bitcoin Cash endpoint, so send this parameter empty.

lastNinteger>= 1query

Return filters for the last N blocks.

frominteger>= 0query

First block height in the requested range.

tointeger>= 0query

Last block height in the requested range. Defaults to the current best height when omitted.

Response

200OK

Block filters keyed by block height.

400Bad Request

Bad Request

401Unauthorized

Unauthorized. Returned when the api-key header is missing, empty, or not accepted by the NOWNodes gateway. The body is plain text.

405Method Not Allowed

Method Not Allowed. Returned by the NOWNodes gateway for malformed or unsupported gateway-level requests.

422Unprocessable Entity

Unprocessable Entity. Returned by the NOWNodes gateway for requests it accepts but cannot process. The body is plain text.

500Internal Server Error

Internal Server Error

503Service Unavailable

Service Unavailable

default

Public API error.

Get a normalized transaction.

GET
https://bchbook.nownodes.io/api/v2/tx/{txid}

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

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

txidstringrequiredpath

Transaction id/hash.

spendingbooleanquery

Include spending transaction metadata for UTXO outputs when available.

Response

200OK

Normalized transaction.

400Bad Request

Bad Request

401Unauthorized

Unauthorized. Returned when the api-key header is missing, empty, or not accepted by the NOWNodes gateway. The body is plain text.

405Method Not Allowed

Method Not Allowed. Returned by the NOWNodes gateway for malformed or unsupported gateway-level requests.

422Unprocessable Entity

Unprocessable Entity. Returned by the NOWNodes gateway for requests it accepts but cannot process. The body is plain text.

500Internal Server Error

Internal Server Error

503Service Unavailable

Service Unavailable

default

Public API error.

Get blockchain-specific transaction JSON.

GET
https://bchbook.nownodes.io/api/v2/tx-specific/{txid}

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

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

txidstringrequiredpath

Transaction id/hash.

Response

200OK

Chain-specific transaction payload.

400Bad Request

Bad Request

401Unauthorized

Unauthorized. Returned when the api-key header is missing, empty, or not accepted by the NOWNodes gateway. The body is plain text.

405Method Not Allowed

Method Not Allowed. Returned by the NOWNodes gateway for malformed or unsupported gateway-level requests.

422Unprocessable Entity

Unprocessable Entity. Returned by the NOWNodes gateway for requests it accepts but cannot process. The body is plain text.

500Internal Server Error

Internal Server Error

503Service Unavailable

Service Unavailable

default

Public API error.

Get raw transaction hex (Ethereum-type networks only).

GET
https://bchbook.nownodes.io/api/rawtx/{txid}

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

Unversioned public endpoint exposed by Blockbook for raw transaction data.

Available on Ethereum-type networks only. It is not supported on Bitcoin Cash, where requests to this endpoint return an error.

To get the raw transaction hex on Bitcoin Cash, use /api/v2/tx-specific/{txid} and read its hex field, or call the getrawtransaction JSON-RPC method.

Load estimate: Medium; payload size grows with raw transaction size.

Parameters

txidstringrequiredpath

Transaction id/hash.

Response

200OK

Raw transaction hex as a JSON string. Not returned on Bitcoin Cash; see the endpoint description.

400Bad Request

Bad Request

401Unauthorized

Unauthorized. Returned when the api-key header is missing, empty, or not accepted by the NOWNodes gateway. The body is plain text.

405Method Not Allowed

Method Not Allowed. Returned by the NOWNodes gateway for malformed or unsupported gateway-level requests.

422Unprocessable Entity

Unprocessable Entity. Returned by the NOWNodes gateway for requests it accepts but cannot process. The body is plain text.

500Internal Server Error

Internal Server Error

503Service Unavailable

Service Unavailable

default

Public API error.

Broadcast a raw transaction using the path.

GET
https://bchbook.nownodes.io/api/v2/sendtx/{hex}

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

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

hexstringrequiredpath

Raw transaction.

Response

200OK

Broadcast result.

400Bad Request

Bad Request

401Unauthorized

Unauthorized. Returned when the api-key header is missing, empty, or not accepted by the NOWNodes gateway. The body is plain text.

405Method Not Allowed

Method Not Allowed. Returned by the NOWNodes gateway for malformed or unsupported gateway-level requests.

422Unprocessable Entity

Unprocessable Entity. Returned by the NOWNodes gateway for requests it accepts but cannot process. The body is plain text.

500Internal Server Error

Internal Server Error

503Service Unavailable

Service Unavailable

default

Public API error.

Broadcast a raw transaction using the request body.

POST
https://bchbook.nownodes.io/api/v2/sendtx

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

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

text/plain

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.

Alternative schema variant for this parameter or payload.

string

Response

200OK

Broadcast result.

401Unauthorized

Unauthorized. Returned when the api-key header is missing, empty, or not accepted by the NOWNodes gateway. The body is plain text.

405Method Not Allowed

Method Not Allowed. Returned by the NOWNodes gateway for malformed or unsupported gateway-level requests.

422Unprocessable Entity

Unprocessable Entity. Returned by the NOWNodes gateway for requests it accepts but cannot process. The body is plain text.

500Internal Server Error

Internal Server Error

default

Public API error.

Get address/account details.

GET
https://bchbook.nownodes.io/api/v2/address/{address}

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

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

addressstringrequiredpath

Bitcoin Cash address, XPUB, or descriptor value accepted by Blockbook.

pageinteger<int32>>= 11query

Page number of the returned transaction list. Pagination starts from 1.

pageSizeinteger<int32>[1, 1000]1000query

Maximum number of transactions returned on one page.

frominteger<int64>>= 0query

Start block height filter for transactions, inclusive.

tointeger<int64>>= 0query

End block height filter for transactions, inclusive.

detailsstringbasictokenstokenBalancestxidstxslighttxstxidsquery

Controls how much transaction or token detail is included in the response. Supported values: basic, tokens, tokenBalances, txids, txslight, txs.

tokensstringusednonzeroderivedquery

Token list mode for the address response. Use used to include tokens used by the address, nonzero to include only non-zero balances, or derived to include derived token information when supported.

secondarystringquery

Secondary currency code. When set, balance and transaction fields are additionally returned in this currency.

contractstringquery

Smart-contract address used to filter token-related address data.

filterstring | integerquery

Filter account history by input/output side, or by numeric token/internal filter id.

protocolsArray<string>query

Optional protocol enrichments. Available on Ethereum-type networks only; on Bitcoin Cash any value returns an error, so the parameter should be omitted.

Response

200OK

Address/account details.

400Bad Request

Bad Request

401Unauthorized

Unauthorized. Returned when the api-key header is missing, empty, or not accepted by the NOWNodes gateway. The body is plain text.

405Method Not Allowed

Method Not Allowed. Returned by the NOWNodes gateway for malformed or unsupported gateway-level requests.

422Unprocessable Entity

Unprocessable Entity. Returned by the NOWNodes gateway for requests it accepts but cannot process. The body is plain text.

500Internal Server Error

Internal Server Error

503Service Unavailable

Service Unavailable

default

Public API error.

Get XPUB or descriptor account details.

GET
https://bchbook.nownodes.io/api/v2/xpub/{xpub}

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

Returns balances and transactions of an XPUB or output descriptor for Bitcoin-type coins. Transactions are sorted by block height with newest blocks first. URL-encode descriptors before placing them after /xpub/.

Blockbook expects XPUBs at level 3 of the derivation path, for example m/purpose'/coin_type'/account'. It derives the remaining change/address_index path. The BIP scheme is inferred from the XPUB prefix; unknown prefixes default to BIP44.

Supported descriptors are pkh(xpub), sh(wpkh(xpub)), wpkh(xpub), and tr(xpub). Descriptors can include origin paths and change selectors such as <0;1> or {0,1}; when change is omitted, Blockbook defaults to <0;1>.

Note: usedTokens always reports the total number of used addresses for the XPUB, regardless of the tokens query filter.

Load estimate: High for broad accounts; grows with derived addresses, gap, used address count, pageSize, transaction history, token rows, and protocol enrichment.

Parameters

xpubstringrequiredpath

Extended public key or output descriptor to query in Blockbook.

pageinteger<int32>>= 11query

Page number of the returned transaction list. Pagination starts from 1.

pageSizeinteger<int32>[1, 1000]1000query

Maximum number of transactions returned on one page.

frominteger<int64>>= 0query

Start block height filter for transactions, inclusive.

tointeger<int64>>= 0query

End block height filter for transactions, inclusive.

detailsstringbasictokenstokenBalancestxidstxslighttxstxidsquery

Controls how much transaction or token detail is included in the response. Supported values: basic, tokens, tokenBalances, txids, txslight, txs.

tokensstringnonzerousedderivednonzeroquery

Controls which XPUB-derived address rows are included.

filterstring | integerquery

Filter by input/output side or numeric id.

contractstringquery

Contract address filter.

protocolsArray<string>query

Protocol enrichments.

secondarystringquery

Secondary currency code.

gapinteger[0, 10000]query

XPUB/address derivation gap limit.

Response

200OK

XPUB/descriptor account details.

400Bad Request

Bad Request

401Unauthorized

Unauthorized. Returned when the api-key header is missing, empty, or not accepted by the NOWNodes gateway. The body is plain text.

405Method Not Allowed

Method Not Allowed. Returned by the NOWNodes gateway for malformed or unsupported gateway-level requests.

422Unprocessable Entity

Unprocessable Entity. Returned by the NOWNodes gateway for requests it accepts but cannot process. The body is plain text.

500Internal Server Error

Internal Server Error

503Service Unavailable

Service Unavailable

default

Public API error.

Get UTXOs for an address, XPUB, or descriptor.

GET
https://bchbook.nownodes.io/api/v2/utxo/{descriptor}

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

Returns unspent outputs for an address, XPUB, or descriptor on Bitcoin-type coins. By default both confirmed and unconfirmed UTXOs are returned; confirmed=true filters out unconfirmed entries. Results are sorted by block height with newest entries first.

Unconfirmed UTXOs omit height, have confirmations set to 0, and can include lockTime. XPUB and descriptor UTXOs also include address and derivation path when available. Coinbase UTXOs include coinbase=true only up to the coinbase confirmation limit, currently 100 blocks.

Load estimate: Variable; address lookups are usually medium, while XPUB/descriptor lookups grow with gap, derived addresses, and UTXO count.

Parameters

descriptorstringrequiredpath

Address, XPUB, or supported descriptor. URL-encode descriptors.

confirmedbooleanquery

When true, return only confirmed UTXOs.

gapinteger[0, 10000]query

XPUB/address derivation gap limit.

Response

200OK

UTXO list.

400Bad Request

Bad Request

401Unauthorized

Unauthorized. Returned when the api-key header is missing, empty, or not accepted by the NOWNodes gateway. The body is plain text.

405Method Not Allowed

Method Not Allowed. Returned by the NOWNodes gateway for malformed or unsupported gateway-level requests.

422Unprocessable Entity

Unprocessable Entity. Returned by the NOWNodes gateway for requests it accepts but cannot process. The body is plain text.

500Internal Server Error

Internal Server Error

503Service Unavailable

Service Unavailable

default

Public API error.

Get account balance history.

GET
https://bchbook.nownodes.io/api/v2/balancehistory/{descriptor}

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

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

descriptorstringrequiredpath

Address, XPUB, or supported descriptor. URL-encode descriptors.

frominteger<int64>query

Unix timestamp lower bound.

tointeger<int64>query

Unix timestamp upper bound.

fiatcurrencystringquery

Optional fiat currency code to include in rates.

groupByinteger>= 1query

Aggregation interval in seconds. Defaults to 3600.

gapinteger[0, 10000]query

XPUB/address derivation gap limit.

Response

200OK

Balance history points.

400Bad Request

Bad Request

401Unauthorized

Unauthorized. Returned when the api-key header is missing, empty, or not accepted by the NOWNodes gateway. The body is plain text.

405Method Not Allowed

Method Not Allowed. Returned by the NOWNodes gateway for malformed or unsupported gateway-level requests.

422Unprocessable Entity

Unprocessable Entity. Returned by the NOWNodes gateway for requests it accepts but cannot process. The body is plain text.

500Internal Server Error

Internal Server Error

503Service Unavailable

Service Unavailable

default

Public API error.