eth_getTransactionCount
Returns the number of transactions sent from an address
- CURL
curl --request POST \
     --url https://evm.confluxrpc.com \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data '
{
  "id": 1,
  "jsonrpc": "2.0",
  "params": ["0x1e6309dc46a2a4936abda54b69c91d7a3c75a39e",null],
  "method": "eth_getTransactionCount"
}'
Params
address required
Schema
type : string
Pattern : 
^0x[0-9,a-f,A-F]{40}$blocknumber optional
Block Number or Tags
oneOf
- U64
- BlockHash
- BlockNumber
- string
type : string
Pattern : 
^0x([1-9a-f][0-9a-f]{0,15}|0)$type : object
- blockHash string requiredtype : stringPattern :- ^0x[0-9,a-f,A-F]{64}$
- requireCanonical booleantype : boolean
type : object
- blockNumber string requiredtype : stringPattern :- ^0x([1-9a-f][0-9a-f]{0,15}|0)$
type : string
Possible values : 
- earliest
- latest
- pending
Result
Schema
type : string
Pattern : 
^0x([1-9a-f][0-9a-f]{0,63}|0)$Examples
- eth_getTransactionCount
- eth_getTransactionCount
- eth_getTransactionCount
- eth_getTransactionCount
Request
curl -X POST --data \
'{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "eth_getTransactionCount",
    "params": [
        "0x1e6309dc46a2a4936abda54b69c91d7a3c75a39e"
    ]
}' \
-H "Content-Type: application/json" \
localhost:12539
Response
"0x6"
Request
curl -X POST --data \
'{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "eth_getTransactionCount",
    "params": [
        "0x1e6309dc46a2a4936abda54b69c91d7a3c75a39e",
        "earliest"
    ]
}' \
-H "Content-Type: application/json" \
localhost:12539
Response
{
  "code": -32016,
  "message": "Error processing request: State for epoch (number=0 hash=0x3fb9d350f95424c3c27fcf248d9a6f633a83c2a75c11ef887ea41540c85e7804) does not exist: out-of-bound StateAvailabilityBoundary { synced_state_height: 0, lower_bound: 71248001, upper_bound: 71252846, optimistic_executed_height: None }"
}
Request
curl -X POST --data \
'{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "eth_getTransactionCount",
    "params": [
        "0x1e6309dc46a2a4936abda54b69c91d7a3c75a39e",
        "latest"
    ]
}' \
-H "Content-Type: application/json" \
localhost:12539
Response
"0x6"
Request
curl -X POST --data \
'{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "eth_getTransactionCount",
    "params": [
        "0x1e6309dc46a2a4936abda54b69c91d7a3c75a39e",
        "pending"
    ]
}' \
-H "Content-Type: application/json" \
localhost:12539
Response
"0x6"