> ## 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 APR information for Pools, Operators and Addresses.

> This endpoint returns windowed APR information for a single pool, node operator or deposit/withdrawal address.

<Warning>
  This endpoint is available only to annual commitment and custom Enterprise plans. Get in touch with [hello@rated.network ](<mailto:hello@rated.network >)to learn more.
</Warning>

This endpoint returns historical data on the returns of an entity. What's really exciting about this one, is the ability to dig deep into the components of the aggregate return (e.g. returned earned on the execution layer vs the consensus layer etc).

`window` refers to the time window of the aggregation, with `1d`, `7d`, `30d` and `all` being the supported values.

<Note>
  A validator must be active throughout the time window for the value to be produced. For `all` time the last 90 days are considered.
</Note>


## OpenAPI

````yaml get /v1/eth/entities/{entity_id}/aprs
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/eth/entities/{entity_id}/aprs:
    get:
      tags:
        - Metadata
      summary: Get APR information for Pools, Operators and Addresses.
      description: >-
        This endpoint returns windowed APR information for a single pool, node
        operator or deposit/withdrawal address.
      operationId: get_entity_aprs_v1_eth_entities__entity_id__aprs_get
      parameters:
        - name: entity_id
          in: path
          required: true
          schema:
            type: string
            title: Entity 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: entityType
          in: query
          required: true
          schema:
            $ref: '#/components/schemas/IdType'
            description: The type of entity class you would like returned
          description: The type of entity class you would like returned
        - name: window
          in: query
          required: false
          schema:
            anyOf:
              - $ref: '#/components/schemas/TimeWindow'
              - type: 'null'
            description: The time window for the APR calculation
            title: Window
          description: The time window for the APR calculation
        - name: X-Rated-Network
          in: header
          required: false
          schema:
            $ref: '#/components/schemas/Network'
            default: mainnet
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/api__schemas__paginator__paginated_response_for_result_model___locals___PaginatedResponseWithResultModel__61
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Bad Request
      security:
        - HTTPBearer: []
components:
  schemas:
    IdType:
      type: string
      enum:
        - depositAddress
        - withdrawalAddress
        - nodeOperator
        - pool
        - poolShare
        - entity
        - validator
        - privateSet
      title: IdType
    TimeWindow:
      type: string
      enum:
        - 1d
        - 7d
        - 30d
        - all
      title: TimeWindow
    Network:
      type: string
      enum:
        - mainnet
        - hoodi
        - holesky
      title: Network
    api__schemas__paginator__paginated_response_for_result_model___locals___PaginatedResponseWithResultModel__61:
      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:
            $defs:
              IdType:
                type: string
                enum:
                  - depositAddress
                  - withdrawalAddress
                  - nodeOperator
                  - pool
                  - poolShare
                  - entity
                  - validator
                  - privateSet
                title: IdType
              TimeWindow:
                type: string
                enum:
                  - 1d
                  - 7d
                  - 30d
                  - all
                title: TimeWindow
            properties:
              id:
                type: string
                title: Id
              idType:
                $ref: '#/components/schemas/IdType'
              window:
                $ref: '#/components/schemas/TimeWindow'
              percentage:
                type: number
                title: Percentage
              percentageConsensus:
                type: number
                title: Percentageconsensus
              percentageExecution:
                type: number
                title: Percentageexecution
              activeStake:
                type: number
                title: Activestake
              activeValidators:
                type: integer
                minimum: 0
                title: Activevalidators
            type: object
            required:
              - id
              - idType
              - window
              - percentage
              - percentageConsensus
              - percentageExecution
              - activeStake
              - activeValidators
            title: EntityAprs
            examples:
              - activeStake: 4823520000000000
                activeValidators: 150735
                percentage: 5.35
                percentageConsensus: 4.04
                percentageExecution: 1.31
                window: 1d
          type: array
          title: Results
      type: object
      required:
        - previous
        - next
        - pages
        - results
      title: PaginatedV1EntityAprs
      examples:
        - next: >-
            https://api.rated.network//v1/eth/entities/{entity_id}/aprs?limit=10&offset=30
          pages: 10
          previous: >-
            https://api.rated.network//v1/eth/entities/{entity_id}/aprs?limit=10&offset=10
          results:
            - - activeStake: 4823520000000000
                activeValidators: 150735
                percentage: 5.35
                percentageConsensus: 4.04
                percentageExecution: 1.31
                window: 1d
    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

````