Skip to main content
GET
/
v1
/
chains
/
{chainId}
/
addresses
/
{address}
/
balances:getNative
JavaScript
import { Avalanche } from "@avalanche-sdk/chainkit";

const avalanche = new Avalanche({
  chainId: "43114",
});

async function run() {
  const result = await avalanche.data.evm.address.balances.getNative({
    blockNumber: "6479329",
    address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F",
    currency: "usd",
  });

  console.log(result);
}

run();
{
  "nativeTokenBalance": {
    "name": "<string>",
    "symbol": "<string>",
    "decimals": 123,
    "chainId": "<string>",
    "balance": "<string>",
    "logoUri": "<string>",
    "price": {
      "currencyCode": "usd",
      "value": 123
    },
    "balanceValue": {
      "currencyCode": "usd",
      "value": 123
    }
  }
}

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.

currency
enum<string>

The currency that return values should use. Defaults to USD. ISO 4217 currency code.

Available options:
usd,
eur,
aud,
cad,
chf,
clp,
cny,
czk,
dkk,
gbp,
hkd,
huf,
jpy,
nzd

Response

Successful response

nativeTokenBalance
object
required

The native token balance for the address.