> ## Documentation Index
> Fetch the complete documentation index at: https://docs.validationcloud.io/llms.txt
> Use this file to discover all available pages before exploring further.

# eth_getBalance

Returns the balance of the account of given address.

This method will use `40` [Compute Units](/nodeapi/about/billing).

***

<Info>
  Unichain Mainnet keeps historical state for roughly the last 10,000 blocks, about 2.8 hours at Unichain's 1-second block time. Requests for an older block return JSON-RPC error `-32603` with a message that contains `state at block #<number> is pruned`.
</Info>

## Reference: [Here](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getbalance)

## **Parameters**

1. `DATA`, 20 Bytes - address to check for balance.
2. `QUANTITY|TAG` - integer block number, or the string `"latest"`, `"earliest"` or `"pending"`, see the [default block parameter](https://ethereum.org/en/developers/docs/apis/json-rpc/#default-block-parameter)

## Returns

`QUANTITY` - hexadecimal value of the current balance in wei.

```json theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
// Result
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "0xa308e53e2943ccae"
}
```

<CodeGroup>
  ```bash title="mainnet" theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
  curl https://mainnet.unichain.validationcloud.io/v1/<YOUR_API_KEY_HERE> \
      -X POST \
      -H "Content-Type: application/json" \
      -d '{"jsonrpc":"2.0","method":"eth_getBalance","params":["0xcabba9e7f4b3a885c5aa069f88469ac711dd4acc","latest"],"id":1}'
  ```
</CodeGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.