Skip to main content

eth_getTransactionCount

Overview

The 'eth_getTransactionCount' method returns the number of transactions sent from an address.

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_getTransactionCount"
}'

Request Parameters

  • address: [ Required ] A string representing the address (20 bytes).
  • block parameter: [ Required ] A hexadecimal block number, or the string latest, earliest or pending. See the default block parameter.

Response

{
"jsonrpc": "2.0",
"id": 1,
"result": "0x31"
}
  • transaction count: A hexadecimal equivalent of the integer representing the number of transactions sent from the given address.