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

# getTransactionCount

> Trả về số lượng giao dịch hiện tại từ sổ cái.

## Tham số yêu cầu

<ParamField body="commitment" type="string">
  Mức độ hoàn tất dùng để đo số lượng giao dịch (processed = gần đây, finalized = đã xác nhận).

  * `confirmed`
  * `finalized`
  * `processed`
</ParamField>

<ParamField body="minContextSlot" type="number">
  Slot tối thiểu mà tại đó yêu cầu có thể được đánh giá.
</ParamField>


## OpenAPI

````yaml vi/openapi/rpc-http/getTransactionCount.yaml POST /
openapi: 3.1.0
info:
  title: Solana RPC API
  version: 1.0.0
  description: >-
    API chỉ số khối lượng giao dịch để theo dõi hoạt động của mạng blockchain
    Solana và tổng số thao tác đã xử lý kể từ khối khởi nguyên.
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
servers:
  - url: https://mainnet.helius-rpc.com
    description: Điểm cuối RPC Mainnet
  - url: https://devnet.helius-rpc.com
    description: Điểm cuối RPC Devnet
security: []
paths:
  /:
    post:
      tags:
        - RPC
      summary: getTransactionCount
      description: >
        Truy xuất tổng số giao dịch được blockchain Solana xử lý kể từ khối khởi
        nguyên.

        Chỉ số hoạt động mạng này cung cấp thông tin chuyên sâu về thông lượng
        blockchain và khối lượng

        giao dịch trong quá khứ bằng cách theo dõi tổng số giao dịch đã được xử
        lý thành công trong

        toàn bộ lịch sử của mạng. Đây là chỉ số thiết yếu cho hoạt động phân
        tích blockchain, bảng điều khiển

        giám sát mạng, phân tích thông lượng và các ứng dụng theo dõi sự phát
        triển của Solana theo thời gian.

        Có thể truy vấn kết quả ở các mức cam kết khác nhau để có các mức độ
        hoàn tất khác nhau.
      operationId: getTransactionCount
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                jsonrpc:
                  type: string
                  enum:
                    - '2.0'
                  description: Phiên bản giao thức JSON-RPC.
                  example: '2.0'
                  default: '2.0'
                id:
                  type: string
                  description: Mã định danh duy nhất cho yêu cầu.
                  example: '1'
                  default: '1'
                method:
                  type: string
                  enum:
                    - getTransactionCount
                  description: Tên của phương thức RPC cần gọi.
                  example: getTransactionCount
                  default: getTransactionCount
                params:
                  type: array
                  description: Đối tượng cấu hình không bắt buộc.
                  items:
                    type: object
                    description: Các tùy chọn cấu hình cho yêu cầu.
                    properties:
                      commitment:
                        type: string
                        description: >-
                          Mức độ hoàn tất dùng để đo số lượng giao dịch
                          (processed = gần đây, finalized = đã xác nhận).
                        enum:
                          - confirmed
                          - finalized
                          - processed
                        example: finalized
                      minContextSlot:
                        type: integer
                        description: Slot tối thiểu mà tại đó yêu cầu có thể được đánh giá.
                        example: 1000
      responses:
        '200':
          description: Đã truy xuất thành công số lượng giao dịch.
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    type: string
                    description: Phiên bản giao thức JSON-RPC.
                    enum:
                      - '2.0'
                    example: '2.0'
                  id:
                    type: string
                    description: Mã định danh khớp với yêu cầu.
                    example: '1'
                  result:
                    type: integer
                    description: >-
                      Tổng số giao dịch được blockchain Solana xử lý kể từ khi
                      mạng ra mắt.
                    example: 268
              examples:
                sampleResponse:
                  $ref: '#/components/examples/responseExample'
        '400':
          description: >-
            Yêu cầu không hợp lệ - Tham số yêu cầu không hợp lệ hoặc yêu cầu sai
            định dạng.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32602
                  message: Tham số không hợp lệ
                id: '1'
        '401':
          description: Không được phép - Khóa API không hợp lệ hoặc bị thiếu.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32001
                  message: Không được phép
                id: '1'
        '429':
          description: Quá nhiều yêu cầu - Đã vượt quá giới hạn tốc độ.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32005
                  message: Quá nhiều yêu cầu
                id: '1'
        '500':
          description: Lỗi máy chủ nội bộ - Đã xảy ra lỗi trên máy chủ.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32603
                  message: Lỗi nội bộ
                id: '1'
        '503':
          description: Dịch vụ không khả dụng - Dịch vụ tạm thời không khả dụng.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32002
                  message: Dịch vụ không khả dụng
                id: '1'
        '504':
          description: Hết thời gian chờ cổng kết nối - Yêu cầu đã hết thời gian chờ.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32003
                  message: Hết thời gian chờ cổng kết nối
                id: '1'
      security:
        - ApiKeyQuery: []
components:
  examples:
    responseExample:
      value:
        jsonrpc: '2.0'
        id: '1'
        result: 268
  schemas:
    ErrorResponse:
      type: object
      properties:
        jsonrpc:
          type: string
          description: Phiên bản giao thức JSON-RPC.
          enum:
            - '2.0'
          example: '2.0'
        error:
          type: object
          properties:
            code:
              type: integer
              description: Mã lỗi.
              example: -32602
            message:
              type: string
              description: Thông báo lỗi.
            data:
              type: object
              description: Dữ liệu bổ sung về lỗi.
        id:
          type: string
          description: Mã định danh khớp với yêu cầu.
          example: '1'
  securitySchemes:
    ApiKeyQuery:
      type: apiKey
      in: query
      name: api-key
      description: >-
        Khóa API Helius của bạn. Bạn có thể nhận khóa miễn phí trong [bảng điều
        khiển](https://dashboard.helius.dev/api-keys).

````