L0vdL0vd

eth_getBalance

Returns the native token balance of an address at a given block.

Archive · Works on any past block

Pass a past block number to read the balance as it was then. This is the classic archive read.

curl https://eth.l0vdinfra.com/YOUR_KEY \
  -X POST \
  -H "Content-Type: application/json" \
  --data '{"jsonrpc":"2.0","id":1,"method":"eth_getBalance","params":["0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045","0x1208a5f"]}'

Example response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "0x63495bbdb7fa5e302"
}
Params and your endpoint

Parameters

addressstringrequired
20-byte address, hex encoded.
blockstringrequired
Block number in hex (e.g. "0x1208a5f") or a tag: "latest", "safe", "finalized", "earliest" or "pending". L0vd endpoints run archive nodes, so any historical block works.

Returns

string Balance in wei, hex encoded.

When to use it

Read how much native token (ETH on Ethereum, BNB on BNB Chain, POL on Polygon, AVAX on Avalanche) an address held at a block.

Pass a historical block number to rebuild balances at a date: end of month for accounting, the block before an exploit for forensics, or a snapshot block for an airdrop.

How to read the result

The result is wei as a hex string. Divide by 10^18 to get whole tokens: 0x63495bbdb7fa5e302 = 114,469,605,655,173,260,034 wei ≈ 114.47 ETH.

In JavaScript use BigInt(result) or viem's formatEther; in Python int(result, 16) / 10**18. Plain floats lose precision on large balances.

Tips

  • This is the native balance only. ERC-20 balances live in the token contract: call balanceOf with eth_call.
  • To find the block at a date, binary-search eth_getBlockByNumber on the timestamp field.
  • Batch many addresses at the same block in one HTTP request (JSON array) to save round trips.

Related methods