> ## Documentation Index
> Fetch the complete documentation index at: https://docs.uniblock.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# starknet_getNonce

> Returns the nonce associated with the specified contract address in the specified block.

### Parameters

<ParamField query="chainId" type="string" default="starknet-sepolia" required>
  Unique identifier for a blockchain network.
</ParamField>

<ParamField body="id" type="number" default={1} required>
  Request identifier used to match responses.
</ParamField>

<ParamField body="jsonrpc" type="string" default="2.0" required>
  JSON-RPC version.
</ParamField>

<ParamField body="method" type="string" default="starknet_getNonce" required>
  JSON-RPC method name.
</ParamField>

<ParamField body="params" type="object" default={{"block_id":{"block_number":470207},"contract_address":"0x0555ec3ba8aea37915c4cf850b4f9d33e4a0a1caa0ad3953d725860e38fa6e17"}} placeholder="{&#x22;block_id&#x22;:{&#x22;block_number&#x22;:470207},&#x22;contract_address&#x22;:&#x22;0x0555ec3ba8aea37915c4cf850b4f9d33e4a0a1caa0ad3953d725860e38fa6e17&#x22;}" required>
  Parameters for starknet\_getNonce: \[block\_id, contract\_address].

  Parameters for <code>starknet\_getNonce</code>:

  <ul>
    <li><code>params.block\_id</code>: BlockID object containing hash and number.</li>
    <li><code>params.contract\_address</code>: The address of the request contract.</li>
  </ul>
</ParamField>

### Returns

<ResponseField name="result" type="string">
  The last nonce used for the requested contract. Example: <code>"0x1c"</code>.
</ResponseField>

<RequestExample>
  ```bash Curl theme={null}
  curl --request POST \
    --url https://api.uniblock.dev/uni/v1/json-rpc?chainId=starknet-sepolia \
    --header 'content-type: application/json' \
    --data '{
      "id": 1,
      "jsonrpc": "2.0",
      "method": "starknet_getNonce",
      "params": {
        "block_id": {
          "block_number": 470207
        },
        "contract_address": "0x0555ec3ba8aea37915c4cf850b4f9d33e4a0a1caa0ad3953d725860e38fa6e17"
      }
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json Success theme={null}
  {
    "jsonrpc": "2.0",
    "id": 1,
    "result": "0x1c"
  }
  ```
</ResponseExample>
