๐ Get transaction count (nonce) for address
Code samples
GET /api/v1/eth/account/{address}/nonce
curl 'https://settla.net/api/v1/eth/account/0x315d2ee4fccda0def532ef4108ff57204f8d9eba/nonce?block=latest' \
-H 'X-API-Key: $SETTLA_API_KEY' \
-H 'Accept: application/json'
Returns the transaction count (nonce) for an address using eth_getTransactionCount.
๐ ๏ธ Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| address | path | string | true | Ethereum address (0x-prefixed). |
| block | query | string | false | Block number as hex QUANTITY, or tag (latest, earliest, pending). Use pending to include transactions still in the mempool when building the next nonce. |
Example responses
200 Response
{
"address": "0x315d2ee4fccda0def532ef4108ff57204f8d9eba",
"block": "latest",
"transactionCount": "0xc2ea1"
}
500 Response
{
"error": "Could not connect to ETH node."
}
๐ Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Nonce information. transactionCount is the number of transactions already sent from the address, so it is also the nonce to use for the next one. | Inline |
| 500 | Internal Server Error | Could not connect to ETH node | Inline |
๐ Response Schema
Status Code 200
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| ยป address | string | false | none | none |
| ยป block | string | false | none | none |
| ยป transactionCount | string | false | none | Nonce as hex QUANTITY from eth_getTransactionCount. |
Status Code 500
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| ยป error | string | false | none | none |