> ## 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 validator rewards metrics

> This endpoint returns the historical rewards earned by a single validator and their potential rewards.

Using this endpoint, you can query the historical daily rewards of a validator by their unique `node_id`. In Avalanche, rewards are distributed at the end of validation periods for validators (`VALIDATOR` and `VALIDATOR_FEE` reward types) and delegation periods for delegators (`DELEGATOR` reward type). This is how we match the rewards to a particular date. We match delegator rewards to the validator where delegators have staked/delegated to in order to give a full picture of rewards related to a validator.

As mentioned earlier, there are different reward types but Avalanche also computes the maximum potential reward a validator can receive at the end of validation and delegation periods. This is based on a validator having 100% uptime for its validation period (i.e. receiving the maximum rewards possible). In the response, this is given by the prefix `potential_` and is specified per reward type, wherein we return these potential rewards as of a particular date.


## OpenAPI

````yaml get /v1/avalanche/validators/{node_id}/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/avalanche/validators/{node_id}/rewards:
    get:
      tags:
        - Avalanche Rewards
      summary: Get validator rewards metrics
      description: >-
        This endpoint returns the historical rewards earned by a single
        validator and their potential rewards.
      operationId: get_validator_rewards_v1_avalanche_validators__node_id__rewards_get
      parameters:
        - name: node_id
          in: path
          required: true
          schema:
            type: string
            title: Node Id
        - 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: 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
        - 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
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/api__schemas__paginator__paginated_response_for_result_model___locals___PaginatedResponseWithResultModel__68
        '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__68:
      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
              nodeId:
                type: string
                title: Nodeid
              validationStatus:
                type: string
                title: Validationstatus
              validatorPubkey:
                type: string
                title: Validatorpubkey
              totalDelegatorRewards:
                anyOf:
                  - type: number
                  - type: string
                title: Totaldelegatorrewards
              totalValidatorRewards:
                anyOf:
                  - type: number
                  - type: string
                title: Totalvalidatorrewards
              totalValidatorFeeRewards:
                anyOf:
                  - type: number
                  - type: string
                title: Totalvalidatorfeerewards
              totalPotentialDelegatorRewards:
                anyOf:
                  - type: number
                  - type: string
                title: Totalpotentialdelegatorrewards
              totalPotentialValidatorRewards:
                anyOf:
                  - type: number
                  - type: string
                title: Totalpotentialvalidatorrewards
              totalPotentialValidatorFeeRewards:
                anyOf:
                  - type: number
                  - type: string
                title: Totalpotentialvalidatorfeerewards
            type: object
            required:
              - day
              - nodeId
              - validationStatus
              - validatorPubkey
              - totalDelegatorRewards
              - totalValidatorRewards
              - totalValidatorFeeRewards
              - totalPotentialDelegatorRewards
              - totalPotentialValidatorRewards
              - totalPotentialValidatorFeeRewards
            title: AvalancheValidatorRewards
            examples:
              - day: '2023-01-01'
                nodeId: NodeID-EggGmnQFaTffeRNG1Kzs9dXJzFGdxac3D
                totalDelegatorRewards: 42
                totalPotentialDelegatorRewards: 230
                totalPotentialValidatorFeeRewards: 6
                totalPotentialValidatorRewards: 120
                totalValidatorFeeRewards: 1.2
                totalValidatorRewards: 24
                validationStatus: Active
                validatorPubkey: >-
                  0x8f95423f7142d00a48e1014a3de8d28907d420dc33b3052a6dee03a3f2941a393c2351e354704ca66a3fc29870282e15
          type: array
          title: Results
      type: object
      required:
        - previous
        - next
        - pages
        - results
      title: PaginatedV1AvalancheValidatorRewards
      examples:
        - next: >-
            https://api.rated.network//v1/avalanche/validators/{node_id}/rewards?limit=10&offset=30
          pages: 10
          previous: >-
            https://api.rated.network//v1/avalanche/validators/{node_id}/rewards?limit=10&offset=10
          results:
            - - day: '2023-01-01'
                nodeId: NodeID-EggGmnQFaTffeRNG1Kzs9dXJzFGdxac3D
                totalDelegatorRewards: 42
                totalPotentialDelegatorRewards: 230
                totalPotentialValidatorFeeRewards: 6
                totalPotentialValidatorRewards: 120
                totalValidatorFeeRewards: 1.2
                totalValidatorRewards: 24
                validationStatus: Active
                validatorPubkey: >-
                  0x8f95423f7142d00a48e1014a3de8d28907d420dc33b3052a6dee03a3f2941a393c2351e354704ca66a3fc29870282e15
    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

````