getAccountUtxo - Zcash

Returns the unspent transparent outputs for an address, extended public key, or descriptor over WebSocket. This is the WebSocket form of the REST api/v2/utxo endpoint.

Parameters

ParameterTypeRequiredDescription
descriptorstringYesTransparent address, extended public key, or descriptor

Message

bashwscat -c wss://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>

# then send:
{
    "id": "getblock.io",
    "method": "getAccountUtxo",
    "params": {
        "descriptor": "t1KfwsnwJeNRVjQGBDZhwKskpQbih2qx5Ua"
    }
}

Response

json{
    "id": "getblock.io",
    "data": [
        {
            "txid": "873df9973be48d17d305ec078fdea2c248c9a0e5b592c67b5909fd0a9280cc9f",
            "vout": 0,
            "value": "116166174",
            "height": 3489837,
            "confirmations": 1
        }
    ]
}

The array is truncated to one entry; the account above holds 179 outputs.

Response Fields

FieldTypeDescription
txidstringTransaction id of the output
voutintegerOutput index within the transaction
valuestringOutput value in zatoshis
heightintegerBlock height at which the output was confirmed
confirmationsintegerNumber of confirmations. 0 for unconfirmed outputs
addressstringOwning address, for xpub and descriptor queries only
pathstringDerivation path of the owning address, for xpub and descriptor queries only

This method has no confirmed parameter and no paging: every unspent transparent output is returned in one message. Filter on confirmations in the client, or use REST with confirmed=true when only settled outputs are wanted.

Use Cases

  • Coin Selection: Read spendable transparent outputs when building a transaction
  • Balance Construction: Sum output values to compute a spendable transparent balance

Error Handling

ErrorMessageDescription
errorInvalid addressThe descriptor is malformed
403 / RBAC: access deniedAccess deniedThe GetBlock access token is missing or incorrect