eth_getTransactionCount - Optimism
Returns the number of transactions sent from an address.

Parameters

  • DATA, 20 Bytes - address.
  • QUANTITY|TAG - integer block number, or the string "latest", "earliest" or "pending", see the default block parameter.
1
params: [
2
'0xd44fd1c1fe3f3f0d93a8867af4041ab231783fcb',
3
'latest' // state at the latest block
4
]
Copied!

Returns

QUANTITY - integer of the number of transactions send from this address.
Request
Curl
Postman
1
curl https://opt-mainnet.g.alchemy.com/v2/your-api-key \
2
-X POST \
3
-H "Content-Type: application/json" \
4
-d '{"jsonrpc":"2.0","method":"eth_getTransactionCount","params":["0xd44fd1c1fe3f3f0d93a8867af4041ab231783fcb","latest"],"id":0}'
Copied!
1
URL: https://opt-mainnet.g.alchemy.com/v2/your-api-key
2
RequestType: POST
3
Body:
4
{
5
"jsonrpc":"2.0",
6
"method":"eth_getTransactionCount",
7
"params":["0xd44fd1c1fe3f3f0d93a8867af4041ab231783fcb","latest"],
8
"id":0
9
}
Copied!
Result
1
{
2
"jsonrpc": "2.0",
3
"id": 0,
4
"result": "0x2fcf"
5
}
Copied!
Optimism API
Alchemy Documentation
Copy link
Contents