Docs
Supported ChainsZetachainJSON-RPC APIAccount Methods

eth_getBalance - Zetachain RPC Method

Query account balance on Zetachain. Essential for wallet applications and omnichain DeFi, native Bitcoin smart contracts, cross-chain asset management, and unified liquidity aggregation on the universal omnichain blockchain enabling cross-chain smart contracts across 50+ chains including Bitcoin.

Returns the balance of a given address on Zetachain.

Why Zetachain? Build on the universal omnichain blockchain enabling cross-chain smart contracts across 50+ chains including Bitcoin with native Bitcoin support, 50+ chain interoperability via UNISON, no bridging required, and partnerships with Curve and SushiSwap.

Use Cases

The eth_getBalance method is essential for:

  • Wallet applications - Display user balances
  • Transaction validation - Check if account has sufficient funds
  • DeFi applications - Monitor collateral and liquidity for omnichain DeFi, native Bitcoin smart contracts, cross-chain asset management, and unified liquidity aggregation
  • Account monitoring - Track balance changes over time

Request Parameters

Request
addressDATA

20-byte address to check balance for

blockParameterQUANTITY|TAG

Block number in hex, or "latest", "earliest", "pending", "safe", "finalized"

Response Body

Response
resultQUANTITY

Integer of the current balance in wei (hexadecimal)

Code Examples

Bash
curl -X POST https://api-zetachain-mainnet.n.dwellir.com/YOUR_API_KEY \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "method": "eth_getBalance",
    "params": [
      "0x5F0b1a82749cb4E2278EC87F8BF6B618dC71a8bf",
      "latest"
    ],
    "id": 1
  }'

Error Handling

Error CodeMessageDescription
-32602Invalid paramsInvalid address format or block parameter
-32000Execution errorNode execution error