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

# getInflationReward

> Trả về phần thưởng lạm phát / staking cho một danh sách địa chỉ trong một epoch.

## Tham số yêu cầu

<ParamField body="address" type="array" required>
  Danh sách địa chỉ Solana (validator hoặc delegator) cần truy xuất phần thưởng staking, dưới dạng chuỗi mã hóa base-58.
</ParamField>

<ParamField body="commitment" type="string">
  Mức commitment cho yêu cầu.

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

<ParamField body="epoch" type="number">
  Số epoch Solana cụ thể cần truy xuất phần thưởng. Nếu bỏ qua, phương thức sẽ trả về các phần thưởng được phân phối gần đây nhất.
</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/getInflationReward.yaml POST /
openapi: 3.1.0
info:
  title: Solana RPC API
  version: 1.0.0
  description: >-
    API phân tích phần thưởng staking để truy xuất và tính toán thu nhập dựa
    trên lạm phát được trả cho người ủy quyền và trình xác thực Solana trong các
    epoch cụ thể.
  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: getInflationReward
      description: >
        Truy xuất thông tin chi tiết về phần thưởng staking cho trình xác thực
        và tài khoản người ủy quyền Solana.

        API staking thiết yếu này cung cấp dữ liệu chính xác về phần thưởng SOL
        được phân phối cho các

        tài khoản được chỉ định trong một epoch cụ thể. Các phần thưởng dựa trên
        lạm phát này là thu nhập từ

        việc tham gia cơ chế đồng thuận bằng chứng cổ phần của Solana, trực tiếp
        với vai trò trình xác thực hoặc

        gián tiếp với vai trò người ủy quyền. Trả về số tiền thưởng, tỷ lệ hoa
        hồng, dữ liệu số dư sau giao dịch

        và thông tin thời gian để tính toán chính xác lợi suất staking. Thiết
        yếu cho bảng điều khiển staking,

        công cụ theo dõi lợi suất, ứng dụng ví, công cụ báo cáo thuế và mọi dịch
        vụ theo dõi lợi nhuận

        từ hoạt động staking Solana.
      operationId: getInflationReward
      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:
                    - getInflationReward
                  example: getInflationReward
                  default: getInflationReward
                params:
                  type: array
                  description: Các tham số cho phương thức.
                  default:
                    - - 6dmNQ5jwLeLk5REvio1JcMshcbvkYMwy26sJ8pbkvStu
                  items:
                    oneOf:
                      - type: array
                        description: >-
                          Danh sách địa chỉ Solana (trình xác thực hoặc người ủy
                          quyền) cần truy xuất phần thưởng staking, ở dạng chuỗi
                          mã hóa base-58.
                        items:
                          type: string
                        example:
                          - 6dmNQ5jwLeLk5REvio1JcMshcbvkYMwy26sJ8pbkvStu
                          - BGsqMegLpV6n6Ve146sSX2dTjUMj3M92HnU8BbNRMhF2
                      - type: object
                        description: Đối tượng cấu hình chứa các tham số tùy chọn.
                        properties:
                          commitment:
                            type: string
                            description: Mức độ cam kết cho yêu cầu.
                            enum:
                              - confirmed
                              - finalized
                            example: finalized
                          epoch:
                            type: integer
                            description: >-
                              Số epoch Solana cụ thể cần truy xuất phần thưởng.
                              Nếu bỏ qua, API sẽ trả về phần thưởng được phân
                              phối gần đây nhất.
                            example: 2
                          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 thông tin phần thưởng lạm phá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: >-
                      Mảng thông tin chi tiết về phần thưởng staking cho từng
                      tài khoản được yêu cầu, theo đúng thứ tự yêu cầu.
                    items:
                      oneOf:
                        - type: object
                          description: >-
                            Chi tiết phần thưởng staking Solana cho tài khoản
                            này.
                          properties:
                            epoch:
                              type: integer
                              description: >-
                                Số epoch Solana khi các phần thưởng staking này
                                được phân phối.
                              example: 2
                            effectiveSlot:
                              type: integer
                              description: >-
                                Slot blockchain cụ thể khi các phần thưởng này
                                được tính toán và bắt đầu có hiệu lực.
                              example: 224
                            amount:
                              type: integer
                              description: >-
                                Số tiền thưởng staking tính bằng lamport (1 SOL
                                = 1.000.000.000 lamport) mà tài khoản này nhận
                                được.
                              example: 2500
                            postBalance:
                              type: integer
                              description: >-
                                Số dư tài khoản tính bằng lamport sau khi phần
                                thưởng staking này được ghi có.
                              example: 499999442500
                            commission:
                              type: integer
                              description: >-
                                Tỷ lệ phần trăm hoa hồng của trình xác thực được
                                khấu trừ từ phần thưởng của người ủy quyền (null
                                đối với tài khoản người ủy quyền, 0-100 đối với
                                trình xác thực).
                              nullable: true
                              example: 5
                        - type: 'null'
                          description: >-
                            Null nếu tài khoản này không nhận được phần thưởng
                            staking nào trong epoch được chỉ định.
                          example: null
        '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: Invalid params
                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: Unauthorized
                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: Too many requests
                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: Internal error
                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: Service unavailable
                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: Gateway timeout
                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).

````