Skip to main content

Documentation Index

Fetch the complete documentation index at: https://www.dynamic.xyz/docs/llms.txt

Use this file to discover all available pages before exploring further.

For most apps, prefer getMultichainTokenBalances — it batches token balances across chains, networks, and addresses in a single call. Reach for getNativeBalance only when you specifically need the native gas balance via RPC on the active network.
You can get the native gas balance in the active network of the wallet account by calling the getNativeBalance function. This goes directly to the chain via RPC. If you wish to get token balances for one chain (one or more networks of that chain), use getTokenBalances. For balances across multiple chains, use getMultichainTokenBalances instead.

Usage

import { getNativeBalance } from '@dynamic-labs-sdk/client';

const { balance } = await getNativeBalance({ walletAccount });
console.log(balance);