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

# getRecentPerformanceSamples

> getRecentPerformanceSamples trả về các mẫu hiệu năng của Solana theo thứ tự slot giảm dần — số lượng giao dịch và slot trong mỗi khoảng thời gian 60 giây, dùng để đánh giá TPS.



## OpenAPI

````yaml vi/openapi/rpc-http/getRecentPerformanceSamples.yaml POST /
openapi: 3.1.0
info:
  title: Solana RPC API
  version: 1.0.0
  description: >-
    API phân tích hiệu suất mạng để giám sát thông lượng blockchain Solana, tốc
    độ xử lý giao dịch và các chỉ số tình trạng theo thời gian thực trong những
    khoảng thời gian gần đây.
  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: getRecentPerformanceSamples
      description: >
        Truy xuất các chỉ số hiệu suất chi tiết về hiệu quả hoạt động gần đây
        của blockchain Solana.

        API phân tích mạng này cung cấp dữ liệu chuỗi thời gian về thông lượng
        giao dịch, hoạt động tạo slot

        và biểu quyết trong các khoảng lấy mẫu định kỳ. Đây là dữ liệu thiết yếu
        để giám sát tình trạng mạng,

        phân tích năng lực blockchain, theo dõi xu hướng hiệu suất và xác minh
        độ tin cậy của mạng.

        Các chỉ số cung cấp thông tin chuyên sâu về cả tổng khối lượng giao dịch
        và riêng các giao dịch

        không biểu quyết, giúp phân biệt chi phí đồng thuận với hoạt động thực
        tế của người dùng trên mạng.
      operationId: getRecentPerformanceSamples
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - jsonrpc
                - id
                - method
              properties:
                jsonrpc:
                  type: string
                  description: Phiên bản giao thức JSON-RPC.
                  enum:
                    - '2.0'
                  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
                  description: Tên của phương thức RPC cần gọi.
                  enum:
                    - getRecentPerformanceSamples
                  example: getRecentPerformanceSamples
                  default: getRecentPerformanceSamples
                params:
                  type: array
                  description: Tham số tùy chọn để giới hạn số lượng mẫu được trả về.
                  default:
                    - 4
                  items:
                    type: integer
                    description: >-
                      Số khoảng mẫu hiệu suất trước đây cần truy xuất (tối đa
                      720, tương ứng với tối đa 12 giờ).
                    example: 4
      responses:
        '200':
          description: Đã truy xuất thành công các mẫu hiệu suất.
          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: array
                    description: Danh sách các mẫu hiệu suất.
                    items:
                      type: object
                      description: Dữ liệu mẫu hiệu suất.
                      properties:
                        slot:
                          type: integer
                          description: >-
                            Slot blockchain Solana tại thời điểm kết thúc giai
                            đoạn lấy mẫu hiệu suất này.
                          example: 348125
                        numTransactions:
                          type: integer
                          description: >-
                            Tổng số giao dịch được xử lý trong khoảng lấy mẫu
                            này, bao gồm cả giao dịch của người dùng và phiếu
                            bầu của trình xác thực.
                          example: 126
                        numNonVoteTransactions:
                          type: integer
                          description: >-
                            Số lượng giao dịch thực tế của người dùng (không bao
                            gồm phiếu bầu đồng thuận của trình xác thực) được xử
                            lý trong giai đoạn này.
                          example: 1
                        samplePeriodSecs:
                          type: integer
                          format: int16
                          description: >-
                            Thời lượng của khoảng đo hiệu suất này tính bằng
                            giây, thường là các khoảng 60 giây.
                          example: 60
                        numSlots:
                          type: integer
                          description: >-
                            Số lượng slot Solana được tạo thành công trong giai
                            đoạn lấy mẫu này, cho biết tiến trình của
                            blockchain.
                          example: 126
        '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
            không đúng đị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:
  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).

````