GET
/
v1
/
chains
/
{chainId}
/
addresses
/
{address}
/
balances:listErc1155
import { AvaCloudSDK } from "@avalabs/avacloud-sdk";

const avaCloudSDK = new AvaCloudSDK({
  chainId: "43114",
  network: "mainnet",
});

async function run() {
  const result = await avaCloudSDK.data.evm.balances.listErc1155Balances({
    blockNumber: "6479329",
    chainId: "43114",
    address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F",
    contractAddress: "0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7",
  });

  for await (const page of result) {
    // Handle the page
    console.log(page);
  }
}

run();
{
  "nextPageToken": "<string>",
  "nativeTokenBalance": {
    "name": "Wrapped AVAX",
    "symbol": "WAVAX",
    "decimals": 18,
    "logoUri": "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg",
    "chainId": "43114",
    "price": {
      "currencyCode": "usd",
      "value": "42.42"
    },
    "balance": "2000000000000000000",
    "balanceValue": {
      "currencyCode": "usd",
      "value": "42.42"
    }
  },
  "erc1155TokenBalances": [
    {
      "address": "0x71C7656EC7ab88b098defB751B7401B5f6d8976F",
      "ercType": "ERC-1155",
      "tokenId": "<string>",
      "tokenUri": "<string>",
      "metadata": {
        "indexStatus": "indexed",
        "metadataLastUpdatedTimestamp": 123,
        "name": "<string>",
        "symbol": "<string>",
        "imageUri": "<string>",
        "description": "<string>",
        "animationUri": "<string>",
        "externalUrl": "<string>",
        "background": "<string>",
        "decimals": 123,
        "properties": "<string>"
      },
      "chainId": "43114",
      "balance": "2000000000000000000"
    }
  ]
}

Authorizations

x-glacier-api-key
string
header
required

Api keys provide higher access to rate limits. To obtain an api key, sign up for an account at https://avacloud.io/.

Path Parameters

chainId
string
required

A supported evm chain id or blockchain id. Use the /chains endpoint to get a list of supported chain ids.

address
string
required

A wallet address.

Query Parameters

blockNumber
string

The block number, if not defined the block number will be the latest block.

pageToken
string

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

pageSize
integer
default:
10

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

Required range: 1 < x < 100
contractAddress
string

A contract addresses to filter by.

Response

200
application/json
Successful response
nativeTokenBalance
object
required

The native token balance for the address.

erc1155TokenBalances
object[]
required

The list of ERC-1155 token balances for the address.

nextPageToken
string

A token, which can be sent as pageToken to retrieve the next page. If this field is omitted or empty, there are no subsequent pages.