Get the latest nonce

Retrieves the latest nonce values used by an account by inspecting the mempool and anchored transactions.

GET

Parameters

Path Parameters

principal
REQUIRED
string

Query Parameters

block_height
integer Optionally get the nonce at a given block height.
block_hash
string Optionally get the nonce at a given block hash. Note - Use either of the query parameters but not both at a time.
Status codeDescription
200The latest nonce values used by an account by inspecting the mempool, microblock transactions, and anchored transactions
4XXDefault Response
cURL
curl -L \
"https://api.hiro.so/extended/v1/address/{principal}/nonces?block_height=66119&block_hash=0x72d53f3cba39e149dcd42708e535bdae03d73e60d2fe853aaf61c0b392f521e9" \
-H 'Accept: application/json'
Response
{
"last_mempool_tx_nonce": 0,
"last_executed_tx_nonce": 144000,
"possible_next_nonce": 144000,
"detected_missing_nonces": [
0
],
"detected_mempool_nonces": [
0
]
}

How is this guide?