# starknet\_getNonce

#### **Parameters:**

**block\_id** - The hash of the requested block, or number (height) of the requested block, or a block tag

**contract\_address** - The address of the contract whose nonce we're seeking

#### **Returns:**

The contract's nonce at the requested state

#### Example:

{% code overflow="wrap" %}

```json
// Request
curl https://starknet.blockpi.network/v1/rpc/your-rpc-key -X POST -H "Content-Type: application/json" 
--data '{"jsonrpc":"2.0","method":"starknet_getNonce","params":["latest", "0x04c0a5193d58f74fbace4b74dcf65481e734ed1714121bdc571da345540efa05"],"id":1}'

// Result
{
    "id": 1,
    "jsonrpc": "2.0",
    "result": "0x0"
}
```

{% endcode %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.blockpi.io/build/api-reference/starknet/starknet_getnonce.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
