> ## Documentation Index
> Fetch the complete documentation index at: https://chainstack-docs-polygon-erigon-trace-deprecation.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# starknet_getNonce | Starknet

> Starknet API method that returns the nonce for a given account. starknet_getNonce JSON-RPC method available on the Starknet blockchain via Chainstack.

<Note>
  **Starknet OpenRPC spec**

  For the latest version of the publicly maintained OpenRPC spec, see the [Starknet specs GitHub repo](https://github.com/starkware-libs/starknet-specs).
</Note>

Starknet API method that returns the nonce for a given account.

It provides the nonce of the account, which is the number of transactions sent from the account's address. This is useful for clients or wallets to determine the nonce to include in a transaction to ensure that the network processes it in the correct order.

## Parameters

* `address` — the string of the address of the account.

## Response

* `result` — the nonce of the account, represented as a hexadecimal string.

## Use case

A practical use case for `starknet_getNonce` is to retrieve the nonce for an account before sending a transaction. The nonce is an important factor in transactions, as it determines the order in which the network processes transactions from a given account. For example, if an account has a nonce of 10, the next transaction sent from that account should include a nonce of 11 to ensure that it is processed after all previous transactions.

## Deprecated feeder gateway method

The feeder gateway was deprecated on [December 11, 2023](https://community.starknet.io/t/feeder-gateway-deprecation/100233).

Example of the call you had to make to the feeder gateway before the deprecation:

```Text Shell theme={null}
curl 'https://alpha-mainnet.starknet.io/feeder_gateway/get_nonce?contractAddress=0x0569b13e8164bc8000c0bbcf4887856516643af123c5bc3b01e229e92f9cfd10'
```


## OpenAPI

````yaml openapi/starknet_node_api/starknet_getNonce.json POST /365cf697a3ad6d950b4c4a911e2e4f4d
openapi: 3.0.0
info:
  title: starknet
  version: 1.0.0
  contact: {}
servers:
  - url: https://starknet-mainnet.core.chainstack.com
security: []
paths:
  /365cf697a3ad6d950b4c4a911e2e4f4d:
    post:
      summary: starknet_getNonce
      description: starknet_getNonce
      operationId: starknetGetNonce
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  default: 1
                jsonrpc:
                  type: string
                  default: '2.0'
                method:
                  type: string
                  default: starknet_getNonce
                params:
                  type: array
                  items:
                    anyOf:
                      - type: object
                        properties:
                          block_number:
                            type: integer
                            default: 385940
                      - type: string
                        default: >-
                          0x0569b13e8164bc8000c0bbcf4887856516643af123c5bc3b01e229e92f9cfd10
              default:
                id: 1
                jsonrpc: '2.0'
                method: starknet_getNonce
                params:
                  - block_number: 385940
                  - >-
                    0x0569b13e8164bc8000c0bbcf4887856516643af123c5bc3b01e229e92f9cfd10
      responses:
        '200':
          description: Successful response

````