avm.getUTXOs - AVAX

Example code for the avm.getUTXOs JSON-RPC method. Complete guide on how to use avm.getUTXOs JSON-RPC in GetBlock Web3 documentation.

Returns the UTXOs that reference one or more X-Chain addresses. UTXOs are returned encoded — wallets parse them to construct new transactions.

Parameters

Parameter
Type
Required
Description

addresses

array of string

Yes

Array of X-Chain Bech32 addresses

limit

integer

No

Maximum number of UTXOs to return

startIndex

object

No

Pagination cursor from a previous call

Request Example

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/ext/bc/X' \
--header 'Content-Type: application/json' \
--data-raw '{
    "jsonrpc": "2.0",
    "method": "avm.getUTXOs",
    "params": {
        "addresses": [
            "X-avax1fw57u4tp7xzx0k6ufn7tj9caua59mt9gqcvy7m"
        ],
        "limit": 100
    },
    "id": "getblock.io"
}'

Response Example

Response Parameters

Field
Type
Description

result.numFetched

string

Number of UTXOs returned (decimal string)

result.utxos

array of string

Encoded UTXOs

result.endIndex

object

Pagination cursor for the next call

result.encoding

string

Encoding used

Use Cases

  • Constructing new X-Chain transactions

  • Wallet sync flows for X-Chain accounts

  • UTXO-set indexing

Error Handling

Status Code
Error Message
Cause

404

Not found

Missing or invalid <ACCESS-TOKEN>

-32602

Invalid params

Request parameters are missing or malformed

429

Too Many Requests

Rate limit exceeded for your plan

SDK Integration

Last updated

Was this helpful?