api/v2/utxo - Zcash

This endpoint returns the unspent transparent outputs for an address, extended public key, or descriptor. These outputs are the transparent inputs available when constructing a spending transaction.

Both confirmed and unconfirmed outputs are returned by default. Results are sorted by block height, newest first.

Parameters

ParameterTypeLocationRequiredDescription
addressOrXpubstringpathYesTransparent address, extended public key, or descriptor. URL-encode descriptors
confirmedbooleanqueryNoWhen true, return only confirmed outputs. Default false
gapintegerqueryNoDerivation gap limit for xpub inputs, capped by the server

Request

bashcurl --location --request GET 'https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/api/v2/utxo/t1KfwsnwJeNRVjQGBDZhwKskpQbih2qx5Ua?confirmed=true'

example.js

javascriptconst response = await fetch(
    'https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/api/v2/utxo/t1KfwsnwJeNRVjQGBDZhwKskpQbih2qx5Ua?confirmed=true'
);
console.log(await response.json());

example.py

pythonimport requests

response = requests.get('https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/api/v2/utxo/t1KfwsnwJeNRVjQGBDZhwKskpQbih2qx5Ua?confirmed=true')

print(response.json())

Response

json[
    {
        "txid": "e5514dac030111c2485ae57401e52bb646c83d196b7d01a7298db98e1973228d",
        "vout": 0,
        "value": "10209258",
        "height": 3487829,
        "confirmations": 7
    }
]

The array is truncated above; the address returns 221 outputs.

Response Parameters

FieldTypeDescription
txidstringTransaction id of the output
voutintegerOutput index within the transaction
valuestringOutput value in zatoshis
heightintegerBlock height at which the output was confirmed. Omitted when unconfirmed
confirmationsintegerNumber of confirmations. 0 for unconfirmed outputs
addressstringOwning address. Returned only for xpub and descriptor queries
pathstringDerivation path of the owning address. Only for xpub and descriptor queries
coinbasebooleanTrue for coinbase outputs, up to the coinbase maturity limit

Only transparent outputs are listed. Shielded notes are encrypted and cannot be enumerated by the indexer. The JSON-RPC getaddressutxos method answers the same question directly from the Zebra node.

Use Cases

  • Coin Selection: Read spendable transparent outputs when building a transaction
  • Balance Construction: Sum output values to compute a spendable transparent balance
  • Confirmed Filtering: Restrict to confirmed outputs for settlement flows

Error Handling

HTTP StatusMessageDescription
400Bad requestA path or query parameter is malformed
403ForbiddenMissing or invalid ACCESS-TOKEN
404Not foundNo indexed data exists for the request
500Internal errorThe indexer failed to process the request