Granite Upgrade Activates in11d:16h:53m:08s
Utxos

List UTXOs v2 - Supports querying for more addresses

Lists UTXOs on one of the Primary Network chains for the supplied addresses. This v2 route supports increased page size and address limit.

POST
/v1/networks/{network}/blockchains/{blockchainId}/utxos
x-glacier-api-key<token>

Api keys provide higher access to rate limits. To obtain an api key, sign up for an account at https://build.avax.network/console/utilities/data-api-keys.

In: header

Path Parameters

blockchainIdstring

A primary network blockchain id or alias.

Value in"11111111111111111111111111111111LpoYY" | "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM" | "2JVSBoinj9C2J33VntvzYtVJNZdN2NKiwwKjcumHUWEb5DbBrm" | "2q9e4r6Mu3U68nU1fYjgbR6JvwrRx36CohpAX5UQxse55x1Q5" | "yH8D7ThNJkxmtkuv2jgBa4P1Rn3Qpr4pPr7QYNfcdoS6k6HWp" | "p-chain" | "x-chain" | "c-chain"
networkstring

Either mainnet or testnet/fuji.

Value in"mainnet" | "fuji" | "testnet"

Query Parameters

pageToken?string

A page token, received from a previous list call. Provide this to retrieve the subsequent page.

pageSize?integer

The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 1024.

Default10
Range1 <= value <= 1024
assetId?string

Asset ID for any asset (only applicable X-Chain)

includeSpent?boolean

Boolean filter to include spent UTXOs.

sortBy?string

Which property to sort by, in conjunction with sortOrder.

Value in"timestamp" | "amount"
sortOrder?string

The order by which to sort results. Use "asc" for ascending order, "desc" for descending order. Sorted by timestamp or the sortBy query parameter, if provided.

Value in"asc" | "desc"
addressesstring

Comma-separated list of primary network addresses

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://data-api.avax.network/v1/networks/mainnet/blockchains/p-chain/utxos?pageSize=10&sortOrder=asc" \  -H "Content-Type: application/json" \  -d '{    "addresses": "P-avax1abc123,X-avax1def456,C-avax1ghi789"  }'
{
  "nextPageToken": "string",
  "utxos": [
    {
      "addresses": [
        "avax1qm2a25eytsrj235hxg6jc0mwk99tss64eqevsw"
      ],
      "asset": {
        "assetId": "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof",
        "name": "Avalanche",
        "symbol": "AVAX",
        "denomination": 9,
        "type": "secp256k1",
        "amount": "5001000"
      },
      "consumedOnChainId": "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM",
      "consumingTxHash": "3j9JpF1aGuQtLLbo3YkvvKkWrCZViXZjdeJQWUSEY5hcqUn2c",
      "createdOnChainId": "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM",
      "utxoId": "68vLva9kfKUsX88ZPM8jdbf8qHUZRoZSFH6NdpAVTspkfrXDC",
      "utxoBytes": "string",
      "amount": "string",
      "assetId": "string",
      "blockNumber": "string",
      "blockTimestamp": 0,
      "consumingBlockNumber": "string",
      "consumingBlockTimestamp": 0,
      "platformLocktime": 0,
      "outputIndex": 0,
      "rewardType": "VALIDATOR",
      "stakeableLocktime": 0,
      "staked": true,
      "threshold": 0,
      "txHash": "string",
      "utxoEndTimestamp": 0,
      "utxoStartTimestamp": 0,
      "utxoType": "STAKE"
    }
  ],
  "chainInfo": {
    "chainName": "p-chain",
    "network": "mainnet"
  }
}
{
  "message": "string",
  "statusCode": 400,
  "error": "Bad Request"
}
{
  "message": "string",
  "statusCode": 401,
  "error": "Unauthorized"
}
{
  "message": "string",
  "statusCode": 403,
  "error": "Forbidden"
}
{
  "message": "string",
  "statusCode": 404,
  "error": "Not Found"
}
{
  "message": "string",
  "statusCode": 429,
  "error": "Too Many Requests"
}
{
  "message": "string",
  "statusCode": 500,
  "error": "Internal Server Error"
}
{
  "message": "string",
  "statusCode": 502,
  "error": "Bad Gateway"
}
{
  "message": "string",
  "statusCode": 503,
  "error": "Service Unavailable"
}

Is this guide helpful?