eth_getBalance - MegaETH RPC Method
Query account balance on MegaETH. Essential for wallet applications and high-frequency trading, real-time gaming, instant payments, and latency-sensitive applications on the first real-time blockchain with sub-millisecond latency and 100,000+ TPS.
Returns the balance of a given address on MegaETH.
Why MegaETH? Build on the first real-time blockchain with sub-millisecond latency and 100,000+ TPS with sub-millisecond transaction streaming with 100,000+ sustained TPS and full EVM compatibility.
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 high-frequency trading, real-time gaming, instant payments, and latency-sensitive applications
- Account monitoring - Track balance changes over time
Code Examples
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_getBlockReceipts
Return every transaction receipt in a block on MegaETH. Useful for indexers, analytics pipelines, and event backfills across high-frequency trading, real-time gaming, instant payments, and latency-sensitive applications.
eth_getCode
Get contract bytecode on MegaETH. Essential for verifying smart contracts for high-frequency trading, real-time gaming, instant payments, and latency-sensitive applications.