api/v2/address - Zcash

This endpoint returns balance and transaction data for a single transparent Zcash address. The details query parameter controls how much data is returned, from a balance-only summary to full transaction objects.

Parameters

ParameterTypeLocationRequiredDescription
addressstringpathYesThe transparent Zcash address to query (t1... or t3...)
pageintegerqueryNo1-based page index for transaction history. Default 1
pageSizeintegerqueryNoHistory items per page. Default and maximum is 1000
fromintegerqueryNoFirst block height to include when filtering history
tointegerqueryNoLast block height to include when filtering history
detailsstringqueryNoDetail level: basic, txids, txslight, or txs. Default txids
secondarystringqueryNoSecondary fiat currency code for converted values

Request

bashcurl --location --request GET 'https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/api/v2/address/t1KfwsnwJeNRVjQGBDZhwKskpQbih2qx5Ua?page=1&pageSize=1000&details=txids'

example.js

javascriptconst response = await fetch(
    'https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/api/v2/address/t1KfwsnwJeNRVjQGBDZhwKskpQbih2qx5Ua?page=1&pageSize=1000&details=txids'
);
console.log(await response.json());

example.py

pythonimport requests

response = requests.get('https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/api/v2/address/t1KfwsnwJeNRVjQGBDZhwKskpQbih2qx5Ua?page=1&pageSize=1000&details=txids')

print(response.json())

Response

json{
    "page": 1,
    "totalPages": 17,
    "itemsOnPage": 1000,
    "address": "t1KfwsnwJeNRVjQGBDZhwKskpQbih2qx5Ua",
    "balance": "13956944343328",
    "totalReceived": "722382862810391",
    "totalSent": "708425918467063",
    "unconfirmedBalance": "0",
    "unconfirmedTxs": 0,
    "txs": 16868,
    "txids": [
        "e5514dac030111c2485ae57401e52bb646c83d196b7d01a7298db98e1973228d",
        "abb031d74760f4ff2eeb8ef03ed207c616a791842da1a0b375f02ccad57c30af"
    ]
}

Response Parameters

FieldTypeDescription
addressstringThe queried address
balancestringConfirmed transparent balance in zatoshis
totalReceivedstringTotal received in zatoshis
totalSentstringTotal sent in zatoshis
unconfirmedBalancestringUnconfirmed balance in zatoshis
unconfirmedTxsintegerNumber of unconfirmed transactions
txsintegerNumber of confirmed transactions
txidsarrayTransaction ids, present when details is txids
transactionsarrayFull transaction objects, present when details is txs

Only transparent addresses (t1, t3) can be queried. Shielded Sapling (zs1) and Orchard value is encrypted to the holder's viewing key and is not indexed, so a Unified Address's shielded balance cannot be read here. For a Unified Address, query its transparent receiver, which the JSON-RPC z_listunifiedreceivers method extracts.

Use Cases

  • Balance Display: Show the transparent balance of an address
  • History Pages: Page through an address's transaction ids or full transactions
  • Payment Detection: Detect transparent deposits by watching an address balance
  • Accounting: Read total received and sent for bookkeeping

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