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

Retrieves the latest nonce values used by an account by inspecting the mempool 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
Terminal
curl -X GET "https://api.mainnet.hiro.so/extended/v1/address/SP31DA6FTSJX2WGTZ69SFY11BH51NZMB0ZW97B5P0/nonces"

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

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