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
20-byte address to check balance for
Block number in hex, or "latest", "earliest", "pending", "safe", "finalized"
Response Body
Integer of the current balance in wei (hexadecimal)
Code Examples
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 Code | Message | Description |
|---|---|---|
| -32602 | Invalid params | Invalid address format or block parameter |
| -32000 | Execution error | Node execution error |
Related Methods
eth_getCode- Get contract bytecodeeth_getTransactionCount- Get account nonce
eth_getBlockByHash
Retrieve complete block data by block hash on Zetachain. Essential for cross-chain dApp developers, Bitcoin DeFi builders, and teams requiring native multi-chain interoperability building on the universal omnichain blockchain enabling cross-chain smart contracts across 50+ chains including Bitcoin.
eth_getCode
Get contract bytecode on Zetachain. Essential for verifying smart contracts for omnichain DeFi, native Bitcoin smart contracts, cross-chain asset management, and unified liquidity aggregation.