Skip to main content
Immutable LogoImmutable Logo
DocsGuides
SDKs
  • Overview
  • TypeScript
  • Unity
  • Unreal
API
  • Overview
  • Keys
  • Changelog
  • Reference
Tools
  • Overview
  • Immutable zkEVM Faucet
  • Network Status
Blog
v2
  • v2
  • v1
Immutable Hub
Docs
  • Flagship Products
    • Passport
      • FAQ
      • Setup
      • Identity
      • Wallet
        • Connecting wallet
        • Sending transactions
        • Signing messages
        • Pre-approved transactions
        • Key management
        • Link external wallets
        • JSON-RPC API
          • eth_requestAccounts
          • eth_sendTransaction
          • eth_accounts
          • eth_gasPrice
          • eth_getBalance
          • eth_getStorageAt
          • eth_estimateGas
          • eth_call
          • eth_blockNumber
          • eth_chainId
          • eth_getBlockByHash
          • eth_getBlockByNumber
          • eth_getTransactionByHash
          • eth_getTransactionReceipt
          • eth_getTransactionCount
          • eth_getCode
          • eth_signTypedData_v4
          • personal_sign
    • Immutable zkEVM
  • About Our Chain
  • How to Add Web3 to Your Game
  • Advanced Products
    • Immutable Hub
    • Checkout
    • Minting
    • Orderbook
    • Blockchain Data APIs
    • Contracts
  • Cheat Sheet
  • Flagship Products
  • Passport
  • Wallet
  • JSON-RPC API
  • eth_getBalance
Version: v2

eth_getBalance

Returns the balance of the account of given address in wei.

Params​

  1. Address: string. The address to get the balance of.
  2. BlockNumber: string (optional). The block number to get the balance at. If omitted, the latest block is used.

Result​

Returns a Promise that resolves with a string containing the hexadecimal balance of the account in wei.

Example​

const balance = await provider.request({
method: 'eth_getBalance',
params: [
'0x...',
'latest'
]
});
console.log(balance); // ['0x...']
Previous
eth_gasPrice
Next
eth_getStorageAt

IMX Whitepaper • IMX Tokenomics • Block Explorer • Careers • Contact Us