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

# getRecentPrioritizationFees

> Trả về danh sách phí ưu tiên từ các khối gần đây.



## OpenAPI

````yaml vi/openapi/rpc-http/getRecentPrioritizationFees.yaml POST /
openapi: 3.1.0
info:
  title: API RPC Solana
  version: 1.0.0
  description: >-
    API giám sát thị trường phí giao dịch để theo dõi các khoản phí ưu tiên gần
    đây đã trả trên Solana, qua đó tối ưu hóa mức phí và việc thực thi giao dịch
    khi mạng bị tắc nghẽ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: getRecentPrioritizationFees
      description: >
        Truy xuất các mức phí ưu tiên gần đây mà giao dịch đã trả trên mạng
        Solana.

        API thị trường phí động này cung cấp thông tin chuyên sâu về xu hướng
        định giá giao dịch,

        giúp xác định mức phí tối ưu trong thời gian mạng bị tắc nghẽn. API trả
        về

        dữ liệu lịch sử về phí đã trả trên mỗi đơn vị tính toán trong các khối
        gần đây và có thể lọc

        theo các tài khoản cụ thể được ghi vào. Đây là công cụ thiết yếu cho ví,
        sàn giao dịch và DApp

        cần đảm bảo giao dịch được xác nhận kịp thời bằng cách đặt mức phí cạnh
        tranh

        dựa trên điều kiện mạng hiện tại và diễn biến của thị trường phí.
      operationId: getRecentPrioritizationFees
      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:
                    - getRecentPrioritizationFees
                  example: getRecentPrioritizationFees
                  default: getRecentPrioritizationFees
                params:
                  type: array
                  description: Mảng địa chỉ tài khoản không bắt buộc.
                  items:
                    type: array
                    description: >-
                      Mảng địa chỉ tài khoản (tối đa 128), dưới dạng chuỗi được
                      mã hóa base-58.
                    items:
                      type: string
                      description: >-
                        Địa chỉ tài khoản Solana cụ thể dùng để lọc các khoản
                        phí ưu tiên liên quan đến thao tác ghi vào tài khoản
                        này.
                      example: CxELquR1gPP8wHe33gZ4QxqGB3sZ9RSwsJ2KshVewkFY
      responses:
        '200':
          description: Đã truy xuất thành công các khoản phí ưu tiên gần đây.
          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 khoản phí ưu tiên gần đây.
                    items:
                      type: object
                      description: Thông tin chi tiết về phí ưu tiên trong một slot cụ thể.
                      properties:
                        slot:
                          type: integer
                          description: >-
                            Số slot trên blockchain Solana nơi các mức phí ưu
                            tiên này được ghi nhận.
                          example: 348125
                        prioritizationFee:
                          type: integer
                          description: >-
                            Mức phí ưu tiên tính bằng micro-lamport trên mỗi đơn
                            vị tính toán mà các giao dịch trong slot này đã trả.
                          example: 1234
        '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: Chưa được xác thực - 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: Chưa được xác thực
                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).

````