Docs

system_accountNextIndex - Bittensor RPC Method

Get the next valid transaction nonce for an account on Bittensor, including pending pool transactions.

Returns the next valid transaction index (nonce) for an account on Bittensor. Unlike reading the nonce directly from storage, this method accounts for pending transactions in the transaction pool, giving you the correct nonce for the next transaction you want to submit.

Parameters

ParameterTypeRequiredDescription
accountIdstringYesSS58-encoded address or hex-encoded AccountId (32 bytes) of the account to query.

Response

FieldTypeDescription
resultnumberThe next valid nonce. Accounts for pending (unconfirmed) transactions in the pool.

Code Examples

Use Cases

  • Transaction construction -- Get the correct nonce before signing and submitting extrinsics (transfers, staking, subnet registrations, etc.) on Bittensor.
  • Sequential transaction submission -- When sending multiple transactions in sequence, use this as the starting nonce and increment manually for each additional transaction.
  • Pool-aware nonce -- Avoid "nonce too low" or "future transaction" errors by using a nonce that accounts for unconfirmed pool transactions.

Notes

  • This is the canonical method. account_nextIndex is an alias that returns the same result.
  • The nonce includes pending pool transactions. If those transactions are dropped, the effective nonce may change.
  • For high-throughput submission, consider manually tracking nonces rather than querying between each transaction.
  • The account can be specified as an SS58 address or a raw hex-encoded AccountId.