api/v2/utxo - Litecoin

This endpoint returns the unspent transaction outputs for an address, extended public key, or descriptor. These outputs are the 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
addressOrXpubstringpathYesAddress, 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/LMRmNEdhi5F43vtW5qPdv1q9s7xsMp4XK5?confirmed=true'

example.js

javascriptconst response = await fetch(
    'https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/api/v2/utxo/LMRmNEdhi5F43vtW5qPdv1q9s7xsMp4XK5?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/LMRmNEdhi5F43vtW5qPdv1q9s7xsMp4XK5?confirmed=true')

print(response.json())

Response

json[
    {
        "txid": "51a31c4236a99bfd17cda606f079c9c4814851119e7593ab7c739bd5972b1969",
        "vout": 0,
        "value": "8324080358",
        "height": 3179800,
        "confirmations": 17
    },
    {
        "txid": "4c3d9548bb03a42551c10f2472e99cd86776ed00fd3bfb530c4466b93e7ddac7",
        "vout": 0,
        "value": "8080253532",
        "height": 3179209,
        "confirmations": 608
    }
]

An address query returns no address or path, because the owning address is the one in the request. Querying an xpub or descriptor adds both, identifying which derived address owns each output:

json[
    {
        "txid": "da184ddc2f8f641765bc8b6073be10f4fed8e7bdc4c40cbddc5e86939ce6d3ab",
        "vout": 0,
        "value": "2680044",
        "height": 2923739,
        "confirmations": 256078,
        "address": "LLwLECw5AyVcFsB8bbXVhvtfAxgiYr1v5Q",
        "path": "m/44'/2'/0'/0/1"
    }
]

Response Parameters

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

This endpoint replaces the Litecoin Core listunspent wallet RPC, which is disabled on shared nodes because those nodes carry no user wallets.

Use Cases

  • Coin Selection: Read spendable outputs when building a transaction
  • Balance Construction: Sum output values to compute a spendable balance
  • Wallet Funding: Find the UTXOs behind a wallet before spending
  • Confirmed Filtering: Restrict to confirmed outputs for settlement flows

Error Handling

HTTP StatusMessageDescription
400Bad requestThe address, XPUB, or descriptor is malformed
403ForbiddenMissing or invalid ACCESS-TOKEN
404Not foundNo indexed data exists for the requested account
500Internal errorThe indexer failed to read account data