web3_getTransactionCount

Returns the number of transactions sent from an address.

Parameters

  • address: [Required] 20 bytes. The address you are inquiring about.

  • block parameter: A string representing a block number, block hash, or one of the string tags latest, earliest, pending, safe, or finalized. See the default block parameter.

Returns

A hexadecimal representation of the number of transactions sent from the given address.

Example

Request

curl https://rpc.testnet.tryradi.us/<YOUR-RPC-ENDPOINT> \
  -X POST \
  -H "Content-Type: application/json" \
  -d '
{
  "id": 1,
  "jsonrpc": "2.0",
  "params": [
    "0xcae4d474a43b186606bb836f463d4b4072b7fbe3",
    "latest"
  ],
  "method": "web3_getTransactionCount"
}
'

Response

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

Last updated

Was this helpful?