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

# Get finality provider rewards metrics

> This endpoint returns the historical rewards earned by a single finality provider.

Using this endpoint, you can query the historical daily rewards of a finality provider by their unique `finality_provider` identifier/s. This identifier can be their Babylon address, BTC public key, or BTC address.

`totalDelegationRewards` are the rewards, with its denomination specified by the `token` field, which delegators are entitled to receive from the finality provider they have staked to. The rewards from the commission a finality provider charges are given by the `totalCommissionRewards`.

You can use the `fromDate` and `toDate` parameters to query a range of days.


## OpenAPI

````yaml get /v1/babylon/finalityProviders/{finality_provider}/rewards
openapi: 3.1.0
info:
  title: Rated API
  description: >

    Welcome to Rated API Swagger doc for developers! This doc outlines the Rated
    API functionality and API architecture.


    V0: It is separated into seven categories:


    -   **Validators**: Endpoints to query into individual validator indices or
    aggregations of validator indices.

    -   **Operators**: Endpoints to query into pre-materialized operator
    groupings.

    -   **Network**: Endpoints to query into network aggregate stats.

    -   **Slashings**: Endpoints to query into network aggregate stats.

    -   **Withdrawals (beta)**: Endpoints to query into when a withdrawal is
    expected to land.

    -   **Self Report (beta)**: Endpoint to query into all slashed validators
    and individual slashed validator indices


    V1: It is separated into six categories:

    -   **Overview**: Endpoints encapsulating the current status of operators,
    pools and validators.

    -   **Performance**: Endpoints that dive into performance and effectiveness
    metrics on execution and consensus layer for operators, pools and
    validators.

    -   **Rewards**: Endpoints that dive into relevant metrics around rewards
    and penalties for operators, pools and validators.

    -   **Private Sets**: Endpoints that aggregate custom group of validators
    privately for performance and reward drill downs.

    -   **Metadata**: Endpoints that provide metadata about mappings, slashings
    and APRs for validators, pools and operators.

    -   **Network**: Endpoints that provide network level metrics about
    performance, rewards, and distributions.


    [Terms of Use](https://docs.rated.network/legal/terms/api-terms-of-service)


    [API
    Reference](https://docs.rated.network/rated-api/api-reference/introduction)
  version: '1.0'
servers: []
security: []
paths:
  /v1/babylon/finalityProviders/{finality_provider}/rewards:
    get:
      tags:
        - Babylon Rewards
      summary: Get finality provider rewards metrics
      description: >-
        This endpoint returns the historical rewards earned by a single finality
        provider.
      operationId: >-
        get_finality_provider_rewards_v1_babylon_finalityProviders__finality_provider__rewards_get
      parameters:
        - name: finality_provider
          in: path
          required: true
          schema:
            type: string
            title: Finality Provider
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            description: The number of results returned per page
            default: 10
            title: Limit
          description: The number of results returned per page
        - name: offset
          in: query
          required: false
          schema:
            type: integer
            description: The number of results to skip before starting to return
            default: 0
            title: Offset
          description: The number of results to skip before starting to return
        - name: fromDate
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date
              - type: 'null'
            description: Start date
            examples:
              - '2023-01-01'
            title: Fromdate
          description: Start date
        - name: toDate
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date
              - type: 'null'
            description: End date
            examples:
              - '2023-12-31'
            title: Todate
          description: End date
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/api__schemas__paginator__paginated_response_for_result_model___locals___PaginatedResponseWithResultModel__84
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Bad Request
      security:
        - HTTPBearer: []
components:
  schemas:
    api__schemas__paginator__paginated_response_for_result_model___locals___PaginatedResponseWithResultModel__84:
      properties:
        previous:
          anyOf:
            - type: string
            - type: 'null'
          title: Previous
        next:
          anyOf:
            - type: string
            - type: 'null'
          title: Next
        pages:
          type: integer
          minimum: 0
          title: Pages
        results:
          items:
            properties:
              day:
                type: string
                format: date
                title: Day
              finalityProviderAddress:
                type: string
                title: Finalityprovideraddress
              finalityProviderName:
                type: string
                title: Finalityprovidername
              btcPubkey:
                type: string
                title: Btcpubkey
              btcAddress:
                type: string
                title: Btcaddress
              identity:
                anyOf:
                  - type: string
                  - type: 'null'
                title: Identity
              fromBlockNumber:
                type: integer
                title: Fromblocknumber
              toBlockNumber:
                type: integer
                title: Toblocknumber
              token:
                type: string
                title: Token
              totalDelegationRewards:
                anyOf:
                  - type: number
                  - type: string
                title: Totaldelegationrewards
              totalCommissionRewards:
                anyOf:
                  - type: number
                  - type: string
                title: Totalcommissionrewards
              commissionRate:
                anyOf:
                  - type: number
                  - type: string
                title: Commissionrate
            type: object
            required:
              - day
              - finalityProviderAddress
              - finalityProviderName
              - btcPubkey
              - btcAddress
              - identity
              - fromBlockNumber
              - toBlockNumber
              - token
              - totalDelegationRewards
              - totalCommissionRewards
              - commissionRate
            title: BabylonFinalityProviderRewards
            examples:
              - btcAddress: bc1p3j9zphqncyj2c8m657hkngf6fcfp406exnnt8pxx6y79vclacces468ehv
                btcPubkey: >-
                  8c8a20dc13c124ac1f7aa7af69a13a4e121abf5934e6b384c6d13c5663fdc633
                commissionRate: 0.03
                day: '2025-01-21'
                finalityProviderAddress: bbn14q9h3m6fy9d66p6mzdksc55lq3ug7djdhxp0a0
                finalityProviderName: Babylon Labs 1
                fromBlockNumber: 100001
                toBlockNumber: 107701
                token: BBN
                totalCommissionRewards: 1357.0956718392758
                totalDelegationRewards: 45236.52239464253
          type: array
          title: Results
      type: object
      required:
        - previous
        - next
        - pages
        - results
      title: PaginatedV1DetailBabylonFinalityProviderRewards
      examples:
        - next: >-
            https://api.rated.network//v1/babylon/finalityProviders/{finality_provider}/rewards?limit=10&offset=30
          pages: 10
          previous: >-
            https://api.rated.network//v1/babylon/finalityProviders/{finality_provider}/rewards?limit=10&offset=10
          results:
            - - btcAddress: bc1p3j9zphqncyj2c8m657hkngf6fcfp406exnnt8pxx6y79vclacces468ehv
                btcPubkey: >-
                  8c8a20dc13c124ac1f7aa7af69a13a4e121abf5934e6b384c6d13c5663fdc633
                commissionRate: 0.03
                day: '2025-01-21'
                finalityProviderAddress: bbn14q9h3m6fy9d66p6mzdksc55lq3ug7djdhxp0a0
                finalityProviderName: Babylon Labs 1
                fromBlockNumber: 100001
                toBlockNumber: 107701
                token: BBN
                totalCommissionRewards: 1357.0956718392758
                totalDelegationRewards: 45236.52239464253
    ErrorResponse:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/Error'
          type: array
          title: Detail
      type: object
      required:
        - detail
      title: ErrorResponse
    Error:
      properties:
        loc:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Loc
        msg:
          type: string
          title: Msg
        type:
          type: string
          title: Type
      type: object
      required:
        - msg
        - type
      title: Error
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````