eth_getBalance - Cronos RPC Method
Query account balance on Cronos. Essential for wallet applications and DeFi protocols, NFT marketplaces, and Crypto.com ecosystem integrations on the EVM-compatible Crypto.com blockchain.
Returns the balance of a given address on Cronos.
Why Cronos? Build on the EVM-compatible Crypto.com blockchain with fast finality and deep Crypto.com ecosystem integration.
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 DeFi protocols, NFT marketplaces, and Crypto.com ecosystem integrations
- 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-cronos-mainnet-archive.n.dwellir.com/YOUR_API_KEY \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "eth_getBalance",
"params": [
"0x5C7F8A570d578ED84E63fdFA7b1eE72dEae1AE23",
"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 Cronos. Essential for Cronos developers building DeFi and payment applications building on the EVM-compatible Crypto.com blockchain.
eth_getCode
Get contract bytecode on Cronos. Essential for verifying smart contracts for DeFi protocols, NFT marketplaces, and Crypto.com ecosystem integrations.