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

# Fetch staking rewards

> Fetch staking rewards for a list of addresses. This API is available for mainnet only.



## OpenAPI

````yaml POST /v1/stake/rewards/search
openapi: 3.0.3
info:
  title: Coinbase Developer Platform API
  license:
    name: MIT License
    url: https://opensource.org/license/mit
  version: 0.0.1-alpha
servers:
  - url: https://api.cdp.coinbase.com/platform
security:
  - bearerAuth: []
tags:
  - name: Addresses
    description: Addresses belong to a wallet and are scoped to a network.
  - name: Assets
    description: Assets are the digital assets that can be held in a wallet.
  - name: Networks
    description: Blockchain networks that are supported by the platform.
  - name: Staking
    description: Staking operations and rewards for addresses on supported networks.
paths:
  /v1/stake/rewards/search:
    post:
      tags:
        - Staking
      summary: Fetch staking rewards
      description: >-
        Fetch staking rewards for a list of addresses. This API is available for
        mainnet only.
      operationId: fetchStakingRewards
      parameters:
        - description: >-
            A limit on the number of objects to be returned. Limit can range
            from 1 to 100, and the default is 50.
          in: query
          name: limit
          required: false
          schema:
            type: integer
          example: 10
          style: form
        - description: >-
            A cursor for pagination across multiple pages of results. Don't
            include this parameter on the first call. Use the next_page value
            returned in a previous response to request subsequent results.
          in: query
          name: page
          required: false
          schema:
            maxLength: 5000
            type: string
          style: form
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                network_id:
                  type: string
                  example: ethereum-mainnet
                  description: The ID of the blockchain network.
                asset_id:
                  type: string
                  example: ETH
                  description: >-
                    The symbol of the asset for which the staking rewards are
                    being fetched.
                address_ids:
                  type: array
                  description: >-
                    The onchain addresses for which the staking rewards are
                    being fetched
                  items:
                    type: string
                  example: '[0xfc807D1bE4997e5C7B33E4d8D57e60c5b0f02B1a]'
                start_time:
                  type: string
                  format: date-time
                  example: '2024-07-21T00:00:00Z'
                  description: The start time of this reward period
                end_time:
                  type: string
                  format: date-time
                  example: '2024-07-21T00:00:00Z'
                  description: The end time of this reward period
                format:
                  $ref: '#/components/schemas/StakingRewardFormat'
              required:
                - network_id
                - asset_id
                - address_ids
                - start_time
                - end_time
                - format
      responses:
        '200':
          description: The list of staking rewards
          content:
            application/json:
              schema:
                description: ''
                properties:
                  data:
                    items:
                      $ref: '#/components/schemas/StakingReward'
                    type: array
                  has_more:
                    description: >-
                      True if this list has another page of items after this one
                      that can be fetched.
                    type: boolean
                  next_page:
                    description: The page token to be used to fetch the next page.
                    type: string
                required:
                  - data
                  - has_more
                  - next_page
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Error response
components:
  schemas:
    StakingRewardFormat:
      description: >-
        The format in which the rewards are to be fetched i.e native or in
        equivalent USD
      type: string
      example: usd
      enum:
        - usd
        - native
      default: usd
    StakingReward:
      description: The staking rewards for an address.
      type: object
      properties:
        address_id:
          type: string
          example: '0xfc807D1bE4997e5C7B33E4d8D57e60c5b0f02B1a'
          description: The onchain address for which the staking rewards are being fetched.
        date:
          type: string
          format: date
          example: '2024-07-21'
          description: The date of the reward in format 'YYYY-MM-DD' in UTC.
        amount:
          type: string
          example: '100'
          description: The reward amount in requested "format". Default is USD.
        state:
          type: string
          example: pending
          enum:
            - pending
            - distributed
          description: The state of the reward.
        format:
          $ref: '#/components/schemas/StakingRewardFormat'
        usd_value:
          $ref: '#/components/schemas/StakingRewardUSDValue'
      required:
        - address_id
        - date
        - amount
        - state
        - format
        - usd_value
      xml:
        name: staking_reward
    Error:
      description: An error response from the Coinbase Developer Platform API
      properties:
        code:
          description: >-
            A short string representing the reported error. Can be use to handle
            errors programmatically.
          maxLength: 5000
          type: string
        message:
          description: A human-readable message providing more details about the error.
          maxLength: 5000
          type: string
        correlation_id:
          description: >-
            A unique identifier for the request that generated the error. This
            can be used to help debug issues with the API.
          type: string
      required:
        - code
        - message
      type: object
      xml:
        name: error
    StakingRewardUSDValue:
      description: The USD value of the reward
      type: object
      properties:
        amount:
          type: string
          example: '100'
          description: The value of the reward in USD
        conversion_price:
          type: string
          example: '100'
          description: The conversion price from native currency to USD
        conversion_time:
          type: string
          format: date-time
          example: '2024-07-21T00:00:00Z'
          description: The time of the conversion in UTC.
      required:
        - amount
        - conversion_price
        - conversion_time
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Enter your JSON Web Token (JWT) here. Refer to the [Generate
        JWT](/api-reference/authentication#2-generate-jwt-server-only) section
        of our Authentication docs for information on how to generate your
        Bearer Token.

````