eth_getTransactionCount
Returns the nonce of an account in the state. NOTE: The name eth_getTransactionCount reflects the historical fact that an account's nonce and sent transaction count were the same. After the Pectra fork, with the inclusion of EIP-7702, this is no longer true.
Ethereum specification · All supported methods
Parameters
Parameters are positional, in the order below.
| Parameter | Type | Required | Description |
|---|---|---|---|
Address | 20-byte address | Yes | Account or contract address. |
Block | Block number, tag, or EIP-1898 hash selector | No | default: 'latest'. The state is the one after the block has been executed. |
Return value
The account’s transaction count (nonce) as a hexadecimal quantity.
Example
Replace <gateway-url> with your gateway base URL and <service-url> with the chain’s service path, such as service/ethereum.
sh
curl -X POST "<gateway-url>/<service-url>" \
-H "Content-Type: application/json" \
--data '{"jsonrpc":"2.0","id":1,"method":"eth_getTransactionCount","params":["0xc94770007dda54cF92009BFF0dE90c06F603a09f","latest"]}'Illustrative response; values depend on the selected network and request:
json
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x1"
}Direct behavior
State at the network head and its 128 preceding blocks is available through the recent service. Older state requests are automatically routed to providers with archive state.
Requests using latest follow Direct’s reference-block rules. The selected reference is preserved during recovery; separate requests can see a newer reference.
A pending nonce reflects the selected provider’s transaction pool and can differ across providers. It is outside the reference-block guarantee.
For providers
Support the recent-state window and the covered EIP-1898 selectors, including requireCanonical. Historical requests require verified archive state.
See provider qualification for checks and continued eligibility.