> ## 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.

<AgentInstructions>

## Submitting Feedback

If you encounter incorrect, outdated, or confusing documentation on this page, submit feedback:

POST https://docs.chainstack.com/feedback

```json
{
  "path": "/reference/bitcoin-getchaintxstats",
  "feedback": "Description of the issue"
}
```

Only submit feedback when you have something specific and actionable to report.

</AgentInstructions>

# getchaintxstats | Bitcoin

The `getchaintxstats` method computes statistics about the total number and rate of transactions in the blockchain up to a specified block height or hash.

<Check>
  **Get your own node endpoint today**

  [Start for free](https://console.chainstack.com/) and get your app to production levels immediately. No credit card required.

  You can sign up with your GitHub, X, Google, or Microsoft account.
</Check>

## Parameters

* `nblocks` (required) — the time frame in blocks to which to compute the statistics.
* `blockhash` (required) — the block hash up to which to compute the statistics.

## Response

* `result` — an object containing statistics about the total number and rate of transactions in the chain up to the specified block.
* `error` — an object containing an error message if an error occurred, otherwise `null`.
* `id` — an integer representing the ID of the request, used to match requests with responses.

## Use case

The `getchaintxstats` method is useful for analyzing the transaction activity and growth of the blockchain up to a specific block. It provides valuable insights into the transaction volume and rate within the chain, aiding in blockchain analysis and monitoring.


## OpenAPI

````yaml /openapi/bitcoin_node_api/getchaintxstats.json POST /788f110831fe13808302bd79796d55e8
openapi: 3.0.0
info:
  title: getchaintxstats example
  version: 1.0.0
  description: >-
    This is an API example for getchaintxstats, a method to compute statistics
    about the total number and rate  of transactions in the chain.
servers:
  - url: https://nd-202-842-353.p2pify.com
security: []
paths:
  /788f110831fe13808302bd79796d55e8:
    post:
      tags:
        - Blockchain Operations
      summary: getchaintxstats
      operationId: getChainTxStats
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                jsonrpc:
                  type: string
                  default: '1.0'
                method:
                  type: string
                  default: getchaintxstats
                params:
                  type: object
                  properties:
                    nblocks:
                      type: integer
                      description: The block height
                      example: 100
                    blockhash:
                      type: string
                      description: The block hash
                      example: >-
                        000000000000000000024b16f3c9bfd109d0c666dd8a694cfaeca1b6a0f0d112
                  required:
                    - nblocks
                    - blockhash
                  default:
                    nblocks: 100
                    blockhash: >-
                      000000000000000000024b16f3c9bfd109d0c666dd8a694cfaeca1b6a0f0d112
                id:
                  type: integer
                  default: 1
      responses:
        '200':
          description: >-
            Statistics about the total number and rate of transactions in the
            chain
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    type: object
                    description: An object containing transaction statistics
                  error:
                    type: object
                  id:
                    type: integer

````