Docs

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 CodeMessageDescription
-32602Invalid paramsInvalid address format or block parameter
-32000Execution errorNode execution error