Skip to main content

eth_getAccount RPC Method

Retrieve account details by specifying an address and a block number/tag.

Updated on
Nov 2, 2023

eth_getAccount RPC Method

Parameters

address
string
REQUIRED
The account address for which the information is to be retrieved
blockReference
string
REQUIRED
The block number in either hexadecimal or integer format, or utilize tags for convenience. Available tags include latest for the latest mined block, pending for the pending state/transactions, and safe or finalized to indicate different degrees of block confirmation

Returns

result
object
A result object which contains the following fields:
codeHash
string
A 32 byte hash of the code of the account
storageRoot
string
The hash of the account's storage data
balance
string
The current balance of the account in wei
nonce
string
The transaction count of an account
Request
1
curl https://docs-demo.xdai.quiknode.pro/ \
2
--header 'Content-Type: application/json' \
3
--data '{
4
"method": "eth_getAccount",
5
"params":["0xA023f7D7B75c6a8b9E2f9fCD7fA44632485f1cFd", "latest"],
6
"id": 1,
7
"jsonrpc": "2.0"
8
}'
Don't have an account yet?
Create your QuickNode endpoint in seconds and start building
Get started for free