> ## 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`](/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.
</Note>

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`](/javascript/reference/wallets/get-token-balances). For balances across multiple chains, use [`getMultichainTokenBalances`](/javascript/reference/wallets/get-multichain-token-balances) instead.

## Usage

<Tabs>
  <Tab title="JavaScript">
    ```javascript theme={"system"}
    import { getNativeBalance } from '@dynamic-labs-sdk/client';

    const { balance } = await getNativeBalance({ walletAccount });
    console.log(balance);
    ```
  </Tab>

  <Tab title="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>;
    }
    ```
  </Tab>
</Tabs>

## Related functions

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