Query native balances for Para wallets on EVM networks.

Prerequisites

Before querying balances, ensure you have a wallet to check.

Core Hook

Para provides a simple React hook to query the native balance of a wallet. This is useful for checking available funds before performing transactions.

useWalletBalance

Basic Usage

import { useWalletBalance } from '@getpara/react-sdk';

const { data: balance, isLoading, error } = useWalletBalance();

// Balance is returned as a string in wei (for EVM)
console.log(balance); // "1000000000000000000" (1 ETH in wei)

Query Specific Wallet

import { useWalletBalance } from '@getpara/react-sdk';

const { data: balance } = useWalletBalance({
  walletId: 'wallet_123'
});

console.log(balance); // Balance in wei

External Wallet with RPC

import { useWalletBalance } from '@getpara/react-sdk';

const { data: balance } = useWalletBalance({
  walletId: 'external_wallet_id',
  rpcUrl: 'https://mainnet.infura.io/v3/YOUR_KEY'
});

console.log(balance); // Balance from external RPC

Important Notes

  • EVM only: Currently only supports EVM wallets. Returns null for COSMOS and SOLANA wallets
  • Native balance only: Does not support token balances
  • Wei format: Returns balance as a string in wei (smallest unit)
  • No formatting: Returns raw balance value without formatting or symbol information

Next Steps