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

> Get reward history for a Cardano stake account including staking rewards and withdrawal records.

# Stake account rewards



## OpenAPI

````yaml cardano/blockchain-indexer-api/openapi.json get /accounts/{stake_addr}/rewards
openapi: 3.0.3
info:
  title: Cardano - Blockchain Indexer API
  description: Core indexer endpoints dedicated to Cardano.
  contact:
    name: Maestro Blockchain Inc.
    url: https://gomaestro.org/
    email: info@gomaestro.org
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.txt
  version: v1.8.0
servers:
  - url: https://mainnet.gomaestro-api.org/v1
    description: Cardano Mainnet
  - url: https://preprod.gomaestro-api.org/v1
    description: Cardano Preprod
  - url: https://preview.gomaestro-api.org/v1
    description: Cardano Preview
security:
  - api-key: []
tags:
  - name: Maestro
paths:
  /accounts/{stake_addr}/rewards:
    get:
      tags:
        - Accounts
      summary: Stake account rewards
      description: >-
        Returns a list of staking-related rewards for the specified stake key
        (pool `member` or `leader` rewards, deposit `refund`)
      operationId: account_rewards
      parameters:
        - name: stake_addr
          in: path
          description: Bech32 encoded stake/reward address ('stake1...')
          required: true
          schema:
            type: string
        - name: count
          in: query
          description: The max number of results per page
          required: false
          schema:
            allOf:
              - type: integer
                default: 100
                minimum: 0
            nullable: true
        - name: order
          in: query
          description: The order in which the results are sorted (by epoch number)
          required: false
          schema:
            allOf:
              - type: string
                default: asc
                enum:
                  - asc
                  - desc
            nullable: true
        - name: cursor
          in: query
          description: >-
            Pagination cursor string, use the cursor included in a page of
            results to fetch the next page
          required: false
          schema:
            type: string
            nullable: true
        - name: amounts-as-strings
          in: header
          description: Large numbers returned as strings if set to `true`
          required: false
          schema:
            type: string
            nullable: true
      responses:
        '200':
          description: >-
            Staking rewards for the specified stake key (pool-member and
            pool-leader rewards, deposit refunds)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedAccountReward'
              example:
                data:
                  - type: leader
                    earned_epoch: 68
                    spendable_epoch: 70
                    amount: 576671933
                    pool_id: pool1egfg26w0syqly9qc65hz33gqv2qrzyka8tfue3ccsk3c73a56jp
                  - type: leader
                    earned_epoch: 69
                    spendable_epoch: 71
                    amount: 567061410
                    pool_id: pool1egfg26w0syqly9qc65hz33gqv2qrzyka8tfue3ccsk3c73a56jp
                  - type: leader
                    earned_epoch: 70
                    spendable_epoch: 72
                    amount: 559723577
                    pool_id: pool1egfg26w0syqly9qc65hz33gqv2qrzyka8tfue3ccsk3c73a56jp
                  - type: leader
                    earned_epoch: 71
                    spendable_epoch: 73
                    amount: 521198513
                    pool_id: pool1egfg26w0syqly9qc65hz33gqv2qrzyka8tfue3ccsk3c73a56jp
                  - type: leader
                    earned_epoch: 72
                    spendable_epoch: 74
                    amount: 541678766
                    pool_id: pool1egfg26w0syqly9qc65hz33gqv2qrzyka8tfue3ccsk3c73a56jp
                last_updated:
                  timestamp: '2022-10-10 20:25:28'
                  block_hash: >-
                    82b6eee6d8bc3ca82e450d94bed5bfbb7859417840e3db8a3bf639a46bcbe379
                  block_slot: 32265228
                next_cursor: null
        '400':
          description: Malformed query parameters
        '500':
          description: Internal server error
components:
  schemas:
    PaginatedAccountReward:
      type: object
      description: >-
        A paginated response. Pass in the `next_cursor` in a subsequent request
        as the `cursor` query parameter to fetch the next page of results.
      required:
        - data
        - last_updated
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/AccountReward'
          description: Endpoint response data
        last_updated:
          $ref: '#/components/schemas/LastUpdated'
        next_cursor:
          type: string
          description: Pagination cursor
          nullable: true
    AccountReward:
      type: object
      description: Stake account related reward
      required:
        - type
        - earned_epoch
        - spendable_epoch
        - amount
      properties:
        amount:
          $ref: '#/components/schemas/NumOrString'
        earned_epoch:
          type: integer
          format: int32
          description: Epoch in which the reward was earned
        pool_id:
          type: string
          description: Bech32 encoded pool ID (if relevant to reward type)
          nullable: true
        spendable_epoch:
          type: integer
          format: int32
          description: Epoch at which the reward is spendable
        type:
          $ref: '#/components/schemas/AccountStakingRewardType'
    LastUpdated:
      type: object
      description: >-
        Details of the most recent block processed by the indexer (aka chain
        tip); that is, the data returned is correct as of this block in time.
      required:
        - timestamp
        - block_hash
        - block_slot
      properties:
        block_hash:
          type: string
          description: >-
            Hex-encoded hash of the most recently processed block (aka chain
            tip)
        block_slot:
          type: integer
          format: int64
          description: Absolute slot of the most recently processed block (aka chain tip)
          minimum: 0
        timestamp:
          type: string
          description: UTC timestamp of when the most recently processed block was minted
    NumOrString:
      oneOf:
        - type: integer
          format: int64
          description: Unsigned 64-bit integer
          minimum: 0
        - type: integer
          description: Unsigned 128-bit integer
          minimum: 0
        - type: integer
          format: int64
          description: Signed 64-bit integer
        - type: number
          format: double
          description: 64-bit floating point number
        - type: string
          description: String representation of an integer or number
      description: >-
        Integer or number by default, or a string representation if the
        `amounts-as-strings` header is set to `true`
    AccountStakingRewardType:
      type: string
      description: Staking-related reward type
      enum:
        - member
        - leader
        - refund
  securitySchemes:
    api-key:
      type: apiKey
      in: header
      name: api-key
      description: Project API Key

````