> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dynamic.xyz/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Getting Native Balance

> [!NOTE]
>
> For most apps, prefer [`getMultichainTokenBalances`](https://docs.dynamic.xyz/docs/javascript/reference/wallets/get-multichain-token-balances) —
> 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`](https://docs.dynamic.xyz/docs/javascript/reference/wallets/get-token-balances). For balances across multiple chains, use [`getMultichainTokenBalances`](https://docs.dynamic.xyz/docs/javascript/reference/wallets/get-multichain-token-balances) instead.

## Usage

> [tab] JavaScript
>
> ```javascript theme={"system"}
> import { getNativeBalance } from '@dynamic-labs-sdk/client';
>
> const { balance } = await getNativeBalance({ walletAccount });
> console.log(balance);
> ```

> [tab] React
>
> ```tsx theme={"system"}
> import { useGetNativeBalance } from '@dynamic-labs-sdk/react-hooks';
>
> function WalletBalance({ walletAccount }) {
>   // Disabled until `walletAccount` is defined, then re-fetches whenever it changes.
>   const { data, isLoading } = useGetNativeBalance({ walletAccount });
>
>   return <p>Balance: {isLoading ? '…' : (data?.balance ?? '0')}</p>;
> }
> ```

## Related functions

* [Getting Multichain Token Balances](https://docs.dynamic.xyz/docs/javascript/reference/wallets/get-multichain-token-balances.md) - Recommended default for token balances across chains
* [Getting Token Balances](https://docs.dynamic.xyz/docs/javascript/reference/wallets/get-token-balances.md) - Token balances for a single chain (one or more networks)
* [Getting the Wallet Account Given an Address and Chain](https://docs.dynamic.xyz/docs/javascript/reference/wallets/get-wallet-account-from-address.md)
* [Getting Active Network](https://docs.dynamic.xyz/docs/javascript/reference/wallets/get-active-network.md)
* [Switching Active Network](https://docs.dynamic.xyz/docs/javascript/reference/wallets/switch-active-network.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.