eth_getBalance

EthereumC1

Returns the balance of an account in wei at the requested block. Pass a historic block number to read a past balance — this resolves against our archive nodes, so old heights work, not just the latest state.

Endpoint
POST https://api.1st-node.com/v1/ethereum/rpc

Parameters

NameTypeDescription
addressDATA, 20 bytesAddress to query the balance for.
blockQUANTITY | TAGBlock number, or "latest"/"earliest"/"pending".

Returns

QUANTITY — the current balance in wei, hex-encoded.

Request

curl https://api.1st-node.com/v1/ethereum/rpc \
  -H "Authorization: Bearer $ONE_KEY" \
  -H "content-type: application/json" \
  -d '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBalance",
  "params": ["0x3f5ce5fbfe3e9af3971dd833d26ba9b5c936f0be", "latest"]
}'
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBalance",
  "params": ["0x3f5ce5fbfe3e9af3971dd833d26ba9b5c936f0be", "latest"]
}

Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "0x7c2562030800"
}
More state methods on Ethereum

Ethereum API

Perguntas frequentes

Can I read a historic balance?

Yes — pass a past block number and our archive nodes resolve the balance at that height.

What unit is the balance in?

Wei, hex-encoded. Divide by 1e18 for the native token amount.

Recarregue, pegue a chave e publique.

Autoatendimento. Pague em cripto ou cartão. Medido por créditos: primitivas pesadas custam mais, as simples são baratas.

Obter chave de API