> For the complete documentation index, see [llms.txt](/llms.txt).

# `eth_getAccount`

Returns account details (code hash, storage root, balance, nonce) for a given address at a specified block. This method uses [80 credits](/services/get-started/pricing/) from your daily balance.

## Parameters[​](#parameters "Direct link to Parameters")

- `address`: [_Required_] The account address to query.
- `blockReference`: [_Required_] Block number (hex quantity) or a tag (`latest`, `pending`, `safe`, `finalized`, `earliest`).

## Returns[​](#returns "Direct link to Returns")

Account fields at the requested block:

- `codeHash`: 32-byte hash of the account code.
- `storageRoot`: Storage trie root for the account.
- `balance`: Account balance in wei (hex quantity).
- `nonce`: Transaction count for the account (hex quantity).

## Example[​](#example "Direct link to Example")

Replace `<YOUR-API-KEY>` with an API key from your [Infura dashboard](https://app.infura.io/).

### Request[​](#request "Direct link to Request")

- curl
- WSS

```
curl https://megaeth-mainnet.infura.io/v3/<YOUR-API-KEY> \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{
  "jsonrpc": "2.0",
  "method": "eth_getAccount",
  "params": [
    "0xA887dCB9D5f39Ef79272801d05Abdf707CFBbD1d",
    "latest"
  ],
  "id": 1
}'

```

```
wscat -c wss://megaeth-mainnet.infura.io/ws/v3/<YOUR-API-KEY> -x '{"jsonrpc":"2.0","method":"eth_getAccount","params":["0xA887dCB9D5f39Ef79272801d05Abdf707CFBbD1d","latest"],"id":1}'

```

### Response[​](#response "Direct link to Response")

- JSON

```
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
    "storageRoot": "0x0000000000000000000000000000000000000000000000000000000000000000",
    "balance": "0x0",
    "nonce": "0x2c160f5"
  }
}

```
