GET
/
v1
/
{chainName}
/
address
/
{walletAddress}
/
balances_native
import { GoldRushClient } from "@covalenthq/client-sdk";

const ApiServices = async () => {
    const client = new GoldRushClient("YOUR_API_KEY");
    const resp = await client.BalanceService.getNativeTokenBalance({chainName: "chainName", walletAddress: "walletAddress"});
    console.log(resp.data);
};

ApiServices();
{
  "address": "<string>",
  "updated_at": "2023-11-07T05:31:56Z",
  "quote_currency": "<string>",
  "chain_id": 123,
  "chain_name": "<string>",
  "items": [
    {
      "contract_decimals": 123,
      "contract_name": "<string>",
      "contract_ticker_symbol": "<string>",
      "contract_address": "<string>",
      "supports_erc": [
        "<string>"
      ],
      "logo_url": "<string>",
      "block_height": 123,
      "balance": "<string>",
      "quote_rate": 123,
      "quote": 123,
      "pretty_quote": "<string>"
    }
  ]
}
Credit Cost: 0.5 per call.
Processing: Realtime

Path Parameters

chainName
string
required

The chain name eg: eth-mainnet.

walletAddress
string
required

The requested address. Passing in an ENS, RNS, Lens Handle, or an Unstoppable Domain resolves automatically.

Query Parameters

quote-currency
string

The currency to convert. Supports USD, CAD, EUR, SGD, INR, JPY, VND, CNY, KRW, RUB, TRY, NGN, ARS, AUD, CHF, and GBP.

block-height
integer

Ending block to define a block range. Omitting this parameter defaults to the latest block height.

Response

200 - application/json
Successful response
address
string

The requested address.

updated_at
string

The timestamp when the response was generated. Useful to show data staleness to users.

quote_currency
string

The requested quote currency eg: USD.

chain_id
integer

The requested chain ID eg: 1.

chain_name
string

The requested chain name eg: eth-mainnet.

items
object[]

List of response items.