Docs

starknet_getNonce - Get the nonce associate...

Get the nonce associated with the given address in the given block

Get the nonce associated with the given address in the given block

Request Parameters

Request
block_idstring

Block reference ("latest", "l1_accepted", block hash, or block number)

contract_addressfelt252

Contract address

Response Body

Response
resultOBJECT

The contract's nonce at the requested state Contract nonce (felt252)

Errors

CodeMessage
24Block not found
20Contract not found

Examples

Bash
curl -X POST https://api-starknet-mainnet.n.dwellir.com/YOUR_API_KEY \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "method": "starknet_getNonce",
    "params": [
      "latest",
      "0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7"
    ],
    "id": 1
  }'

On this page