Zcash Blockbook REST API

Blockbook is an address-indexed and xpub-indexed view of the Zcash chain, built by Trezor. It answers questions about a transparent address or a transparent wallet: balances, transaction history, and unspent outputs.

GetBlock's Blockbook add-on is provisioned as its own endpoint, separate from the Zcash JSON-RPC endpoint and with its own URL.

Blockbook sees transparent activity only. Shielded Sapling and Orchard value is encrypted to the holder's viewing key, so it is never indexed. Two consequences follow:

  • Balances, UTXOs, and history cover transparent (t1, t3) addresses and nothing else.
  • In the normalized transaction schema, a shielded transaction's fees usually reads 0, because the value entering from a shielded pool is invisible. See api/v2/tx for a worked example and how to compute the real fee.

Setting up a Blockbook endpoint

  1. Sign in to GetBlock and start a new endpoint in the configurator

  2. Select Zcash → Mainnet → Full → Blockbook(REST).

    Do not use the Zcash JSON-RPC endpoint for these paths. It does not serve /api/v2/.

  3. Use the access token the configurator returns. Every path below is appended to that URL

Base URL

bashhttps://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/api/v2/

Endpoints

MethodEndpointDescription
GET/api/statusReturns the indexer's sync state, the node's metadata, and the consensus branch ID
GET/api/v2/address/{address}Returns balance and transaction data for a transparent address
GET/api/v2/xpub/{xpub}Returns wallet-level data for a transparent extended public key or descriptor
GET/api/v2/utxo/{addressOrXpub}Returns the unspent transparent outputs for an address, extended public key, or descriptor
GET/api/v2/balancehistory/{address}Returns aggregated balance-change history over a time range
GET/api/v2/tx/{txid}Returns a normalized transaction, counting transparent value only
GET/api/v2/tx-specific/{txid}Returns the transaction in the node's own shape, including shielded components
GET/api/v2/block/{blockId}Returns a block by height or hash with a paged list of its transactions
GET/api/v2/block-index/{blockHeight}Returns the block hash at a given block height
GET/api/v2/feestats/{blockId}Returns fee statistics for one block, from transparent value only
POST/api/v2/sendtx/Broadcasts a signed, serialized transaction and returns its transaction id
GET/api/v2/tickers/Returns current or historical fiat exchange rates for Zcash
GET/api/v2/tickers-list/Returns the currencies with rate data at a given timestamp
GET/api/v2/multi-tickers/Returns fiat rate tickers for several timestamps at once

Not available on Zcash

Two Blockbook endpoints offered on the other UTXO chains return 500 Internal server error on Zcash and are not documented here:

EndpointWhy it failsUse instead
/api/v2/estimatefee/{blocks}Zebra implements neither estimatesmartfee nor estimatefee, so the indexer has no estimate to returnThe ZIP-317 conventional fee: 5,000 zatoshis per logical action, with a minimum of two actions
/api/v2/rawblock/{blockId}Fails for every block testedJSON-RPC getblock with verbosity 0

Zcash specifics

  • Amounts are in zatoshis, at 1e-8 ZEC.
  • Fees follow ZIP-317, not a fee market: 5,000 zatoshis per logical action, minimum two actions.
  • 75-second blocks. Heights advance about eight times as fast as Bitcoin's.
  • Consensus branch IDs. Transactions are signed for the network upgrade in force, reported under backend.consensus by api/status.
  • Transaction expiry. Zcash transactions carry an expiryheight and cannot be mined after it.
  • Derivation uses BIP44 coin type 133 for transparent accounts.

Troubleshooting

SymptomCauseFix
A shielded transaction shows fees: "0"The normalized schema cannot see shielded valueCompute the fee from api/v2/tx-specific value balances
500 Internal server error on estimatefeeThe Zebra node has no fee estimatorUse the ZIP-317 conventional fee
Invalid address, decoded address is of unknown formatA shielded or malformed address was suppliedQuery a transparent (t1, t3) address
403 ForbiddenThe token is missing, invalid, or belongs to a different endpoint configurationConfirm the token was provisioned as Zcash → Blockbook(REST)

Support