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

# eth_getTransactionCount | Monad

> Monad API method that returns the number of transactions sent from an address. Reference for eth_getTransactionCount on Monad via Chainstack.

Monad API method that returns the number of transactions sent from an address. This is also known as the account nonce, which is used to prevent transaction replay and ensure proper transaction ordering.

<Note>
  When called against a block older than the latest \~128 blocks, this method is treated as an archive request (2 RUs instead of 1 RU). See [request units](/docs/request-units#archive-state-methods).
</Note>

## Parameters

* `data` — the 20-byte address.
* `quantity or tag` — integer block number, or the string `latest`, `earliest`, or `pending`.

## Response

* `result` — the number of transactions sent from the address, encoded as hexadecimal.

## `eth_getTransactionCount` code examples

<CodeGroup>
  ```javascript ethers.js theme={"system"}
  const { ethers } = require("ethers");

  const provider = new ethers.JsonRpcProvider("CHAINSTACK_NODE_URL");

  async function getTransactionCount() {
    const address = "0xa54F56e8Cfff25b17105d6073aB0f0E7DA087225";
    const nonce = await provider.getTransactionCount(address);
    console.log(`Transaction count: ${nonce}`);
  }

  getTransactionCount();
  ```

  ```python web3.py theme={"system"}
  from web3 import Web3

  node_url = "CHAINSTACK_NODE_URL"

  web3 = Web3(Web3.HTTPProvider(node_url))

  address = "0xa54F56e8Cfff25b17105d6073aB0f0E7DA087225"
  nonce = web3.eth.get_transaction_count(address)
  print(f'Transaction count: {nonce}')
  ```
</CodeGroup>

## Use case

A practical use case for `eth_getTransactionCount` is obtaining the correct nonce when manually constructing transactions, ensuring they are processed in the correct order.


## OpenAPI

````yaml openapi/monad_node_api/accounts_info/eth_getTransactionCount.json POST /
openapi: 3.0.0
info:
  title: Monad Node API
  version: 1.0.0
  description: This is an API for interacting with a Monad node.
servers:
  - url: https://monad-testnet.core.chainstack.com/9c5b265f20b3ea5df4f54f70eb74b800
security: []
paths:
  /:
    post:
      tags:
        - Accounts info
      summary: eth_getTransactionCount
      operationId: eth_getTransactionCount
      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: eth_getTransactionCount
                params:
                  type: array
                  items:
                    type: string
                  default:
                    - '0xa54F56e8Cfff25b17105d6073aB0f0E7DA087225'
                    - latest
      responses:
        '200':
          description: The number of transactions sent from the address.
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    type: string
                  id:
                    type: integer
                  result:
                    type: string

````