eth_getTransactionCount RPC Method

Retrieves the nonce (total outbound transactions) for a given account.

Parameters#

stringrequired

Account address, 20 bytes, hex-encoded.

stringrequired

Block identifier — a tag (latest, safe, finalized, pending) or a 32-byte block hash.

Result#

string - The account nonce (number of transactions sent), hex-encoded.

Code sample#

{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionCount",
  "params": [
    "0x407d73d8a49eeb85d32cf465507dd71d507100c1",
    "latest"
  ],
  "id": 1
}

Response#

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