Skip to main content

eth_createAccessList

Overview

The 'eth_getBalance' method returns the balance of the specified address in wei.

Request

    curl --request POST \
--url https://ethereum-mainnet-geth-archive.node.coinapi.io \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--header 'X-CoinAPI-Key: 73034021-THIS-IS-SAMPLE-KEY' \
--data '
{
"id": 1,
"jsonrpc": "2.0",
"params": [
"0xe5cB067E90D5Cd1F8052B83562Ae670bA4A211a8",
"latest"
],
"method": "eth_getBalance"
}
'

Request Parameters

  1. 'address' (20 Bytes) - The address to get the balance of.
  2. 'block' (optional) - The block number to retrieve the balance from. It can be one of the following:
    • 'earliest': For the earliest/genesis block.
    • 'latest:' For the latest mined block.
    • 'pending:' For the pending state/transactions.
    • Or you can specify a block number.

Response

{
"jsonrpc": "2.0",
"id": 1,
"result": "0x7f49b9052e509c"
}

'result (String)'' - The current balance of the address in wei.

Notes:

  • The balance is returned in wei, which is the smallest denomination of ether. To convert the balance to ether, divide the result by 10^18.
  • Always ensure to use a valid Ethereum address and specify the correct block parameter.