getAccountUtxo - Dogecoin

Returns the unspent transaction 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
descriptorstringYesAddress, extended public key, or descriptor to read outputs for

Message

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

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

Response

json{
    "id": "getblock.io",
    "data": [
        {
            "txid": "4c5519699240ed1f23e1ec46ea4bc85f019982f6ef48afdb7698054230a4b76e",
            "vout": 0,
            "value": "1000000",
            "height": 6378960,
            "confirmations": 5
        },
        {
            "txid": "8d99a37f27d702b35bcc74dfea0d1a006a67c20571e1de660a30defc16316c8f",
            "vout": 1,
            "value": "248941280401251",
            "height": 6378956,
            "confirmations": 9
        }
    ]
}

Response Fields

FieldTypeDescription
txidstringTransaction id of the output
voutintegerOutput index within the transaction
valuestringOutput value in koinu
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

Unlike the REST endpoint, this method has no confirmed parameter: both confirmed and unconfirmed outputs are returned, and there is no paging. The account above holds 585 outputs in a single 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 outputs when building a transaction
  • Balance Construction: Sum output values to compute a spendable balance
  • Consolidation: Identify small outputs worth combining

Error Handling

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