Skip to main content

eth_getBalance

Returns the balance of a given address on Immutable.

Why Immutable? Build on the gaming-optimized zkEVM with 660+ games, 5.5M+ Passport signups, and $40M TVL with first EVM chain with enforceable royalties, Polygon zkEVM technology, $2B+ ecosystem funding, and Agglayer cross-chain liquidity.

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 Web3 gaming (Gods Unchained, RavenQuest), gaming NFTs with enforced royalties, and cross-chain game assets
  • Account monitoring - Track balance changes over time

Parameters#

ParameterTypeRequiredDescription
addressDATAYes20-byte address to check balance for
blockParameterQUANTITY|TAGYesBlock number in hex, or "latest", "earliest", "pending", "safe", "finalized"

Request#

{
"jsonrpc": "2.0",
"method": "eth_getBalance",
"params": [
"0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb",
"latest"
],
"id": 1
}

Returns#

TypeDescription
QUANTITYInteger of the current balance in wei (hexadecimal)

Note: 1 native token = 10^18 wei. Convert using balance / 10^18.

Response#

{
"jsonrpc": "2.0",
"id": 1,
"result": "0x1a055690d9db80000"
}

Code Examples#

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

Error Handling#

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