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.

Path Parameters

principal
Required
string

Stacks address

Example: "SP31DA6FTSJX2WGTZ69SFY11BH51NZMB0ZW97B5P0"

Query Parameters

block_heightnumber

Optionally get the nonce at a given block height.

Example: 66119

block_hashstring

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

Example: "0x72d53f3cba39e149dcd42708e535bdae03d73e60d2fe853aaf61c0b392f521e9"
Status codeDescription
200Success
/extended/v1/address/{principal}/nonces

curl -X GET "https://api.hiro.so/extended/v1/address/SP31DA6FTSJX2WGTZ69SFY11BH51NZMB0ZW97B5P0/nonces?block_height=66119&block_hash=0x72d53f3cba39e149dcd42708e535bdae03d73e60d2fe853aaf61c0b392f521e9"

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
  ]
}