eth_getTransactionCount
Retrieve the transaction count (nonce) for an Ethereum address to determine the next nonce for sending transactions.
Instructions
Returns the number of transactions sent from an address (nonce). Useful for determining the next nonce for sending transactions.
Args:
address (string): 20-byte Ethereum address in hex format (e.g., '0x742d35Cc6634C0532925a3b844Bc9e7595f...')
tag (string, optional): Block tag - 'latest', 'earliest', or 'pending', defaults to 'latest'
network (string, optional): Ethereum network to query, defaults to 'mainnet'
Returns:
Hex-encoded integer representing the number of transactions sent from the address
Examples:
"Get current nonce for address": { "address": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e" }
"Get pending transaction count": { "address": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e", "tag": "pending" }
Errors:
InvalidParams: When address format is invalid or tag is not a valid block tag
InternalError: When Infura API is unavailable
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| address | Yes | The Ethereum address to query. | |
| tag | No | The block tag to use for the query. | |
| network | No | The Ethereum network to query, e.g., 'mainnet' or 'sepolia'. | mainnet |
| response_format | No | Output format: 'json' for structured data, 'markdown' for human-readable. | json |