⚠️Blast API (blastapi.io) ends Oct 31. Migrate to Dwellir and skip Alchemy's expensive compute units.
Switch Today →
Skip to main content

eth_getTransactionCount

Get the number of transactions sent from an address on Avalanche C-Chain.

Parameters

  1. DATA, 20 Bytes - address
  2. QUANTITY|TAG - integer block number, or the string "latest", "earliest" or "pending"
{
"jsonrpc": "2.0",
"method": "eth_getTransactionCount",
"params": [
"0xa7d9ddbe1f17865597fbd27ec712455208b6b76d",
"latest"
],
"id": 1
}

Returns

QUANTITY - Integer of the number of transactions sent from this address.

Implementation Example

curl -X POST https://api-avalanche-mainnet-archive.n.dwellir.com/YOUR_API_KEY/ext/bc/C/rpc \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "eth_getTransactionCount",
"params": [
"0xa7d9ddbe1f17865597fbd27ec712455208b6b76d",
"latest"
],
"id": 1
}'

Response Example

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

Note: This value represents the nonce to use for the next transaction from this address.


Need help? Contact our support team or check the Avalanche documentation.