Granite Upgrade Activates in11d:22h:51m:55s
Balances

Get native token balance

Gets native token balance of a wallet address.

Balance at a given block can be retrieved with the blockNumber parameter.

GET
/v1/chains/{chainId}/addresses/{address}/balances:getNative
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

chainIdstring

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

addressstring

A wallet address.

Query Parameters

blockNumber?string

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

currency?string

The currency that return values should use. Defaults to USD.

Value in"usd" | "eur" | "aud" | "cad" | "chf" | "clp" | "cny" | "czk" | "dkk" | "gbp" | "hkd" | "huf" | "jpy" | "nzd"

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://data-api.avax.network/v1/chains/43114/addresses/0x71C7656EC7ab88b098defB751B7401B5f6d8976F/balances:getNative?blockNumber=6479329&currency=usd"
{
  "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"
    }
  }
}
{
  "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?