Get the latest nonce

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


GET
/extended/v1/address/{principal}/nonces

Get the latest nonce used by an account

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

Query Parameters

block_heightinteger

Optionally get the nonce at a given block height.

Minimum: 1

block_hashstring

Optionally get the nonce at a given block hash. Note - Use either of the query parameters but not both at a time.

Path Parameters

principal
Required
Any properties in STX Address, Smart Contract ID

Status codeDescription
200The latest nonce values used by an account by inspecting the mempool, microblock transactions, and anchored transactions
4XXDefault Response
/extended/v1/address/{principal}/nonces

curl -X GET "https://api.hiro.so/extended/v1/address/SP318Q55DEKHRXJK696033DQN5C54D9K2EE6DHRWP/nonces?block_height=1&block_hash=string"

The latest nonce values used by an account by inspecting the mempool, microblock transactions, and anchored transactions

{
"last_mempool_tx_nonce": 0,
"last_executed_tx_nonce": 0,
"possible_next_nonce": 0,
"detected_missing_nonces": [
0
],
"detected_mempool_nonces": [
0
]
}