Skip to content

eth_getAccount ​

served · same as reth

Returns the four fields of an account at the latest block: nonce, balance, storage root and code hash.

When to use ​

Use it to read the storage root or the code hash of an account in one request.

Example ​

bash
curl -s -X POST -H 'Content-Type: application/json' \
  --data '{"jsonrpc": "2.0", "id": 1, "method": "eth_getAccount", "params": ["0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", "0x18faced"]}' \
  http://127.0.0.1:8547
json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getAccount",
  "params": [
    "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
    "0x18faced"
  ]
}

Response ​

Live mainnet, block 26193133, 2026-10-14. Checked against reth 2.7: equal.

json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "nonce": "0x1",
    "balance": "0x1d48c558ed568b00ef1da",
    "storageRoot": "0x0df003cadcca8325668b079b1af98aa70be1995a38efe8bd971c229c14304b98",
    "codeHash": "0xd0a06b12ac47863b5c7be4185c2deaad1c61557033f56c7d4ea74429cbb25e23"
  }
}

Full response

Parameters ​

NameTypeRequiredMeaning
addressaddress (20 bytes, hex)yesThe account.
blockblock number in hex, or a tag, see Block parameteryesThe block. Only the latest block works.

Returns ​

An object with nonce, balance, storageRoot and codeHash. null when the account does not exist.

Notes and limits ​

  • Only the latest block works, as for eth_getProof.

Errors ​

CodeMessageWhen
-32602distance to target block exceeds maximum proof windowThe block is not the latest block, whatever its age. Also a block below the history, and earliest.
-32602Invalid paramsA parameter is missing or does not parse. data has the text of reth, with the position.
-32001block not found: pendingThe block is pending, as in reth.

Compared with reth ​

reth answers this method from its proof code, so it also accepts the latest block only.

The live example above gives the same answer on Cinder and on reth 2.7.

eth_getAccountInfo, eth_getProof.

Schema (OpenRPC) ​

Parameter address: Address
json
{
  "title": "hex encoded address",
  "type": "string",
  "pattern": "^0x[0-9a-fA-F]{40}$"
}
Parameter block: BlockSelector
json
{
  "title": "Block number, tag or block identifier",
  "description": "A block number, a tag, or an object with blockHash or blockNumber. Null means latest.",
  "oneOf": [
    {
      "title": "hex encoded unsigned integer",
      "type": "string",
      "pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
    },
    {
      "title": "Block tag",
      "type": "string",
      "enum": [
        "earliest",
        "finalized",
        "safe",
        "latest",
        "pending"
      ],
      "description": "latest is the head of the last forkchoice update, as reth. pending is the block that Cinder builds from its transaction pool after latest, as reth. safe and finalized are the blocks of the last forkchoice update, as reth. Before the first update, they name no block. earliest is the first block that the node stored, as reth."
    },
    {
      "type": "object",
      "properties": {
        "blockHash": {
          "title": "32 byte hex value",
          "type": "string",
          "pattern": "^0x[0-9a-f]{64}$"
        },
        "blockNumber": {
          "title": "hex encoded unsigned integer",
          "type": "string",
          "pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
        }
      },
      "additionalProperties": false
    },
    {
      "type": "null"
    }
  ]
}
Result: Account or null
json
{
  "oneOf": [
    {
      "title": "Account",
      "type": "object",
      "properties": {
        "nonce": {
          "title": "hex encoded unsigned integer",
          "type": "string",
          "pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
        },
        "balance": {
          "title": "hex encoded unsigned integer",
          "type": "string",
          "pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
        },
        "storageRoot": {
          "title": "32 byte hex value",
          "type": "string",
          "pattern": "^0x[0-9a-f]{64}$"
        },
        "codeHash": {
          "title": "32 byte hex value",
          "type": "string",
          "pattern": "^0x[0-9a-f]{64}$"
        }
      }
    },
    {
      "type": "null"
    }
  ]
}