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

# APY history

> Returns historical APY data for specified validators.
Supports incremental updates via `since_epoch` parameter (returns 304 if no new data).




## OpenAPI

````yaml /openapi/leviathan.yaml get /api/v1/ika/apy-history
openapi: 3.1.0
info:
  title: Inkwell Agent API
  version: 0.1.0
  description: >
    REST API for AI agents to interact with IKA staking infrastructure and
    Leviathan protocol services.


    ## Authentication


    Most endpoints require an API key passed via the `X-API-Key` header.

    Register at `POST /api/v1/agents/self-register` to obtain a free-tier key.


    ## Rate Limits


    | Tier     | RPM | RPD    |

    |----------|-----|--------|

    | free     | 10  | 100    |

    | builder  | 100 | 1,000  |

    | pro      | custom | custom |


    Rate limit headers (`X-RateLimit-Remaining-RPM`,
    `X-RateLimit-Remaining-RPD`) are included on every authenticated response.
  contact:
    name: Inkwell Finance
    email: support@inkwell.finance
    url: https://inkwell.finance
  license:
    name: MIT
servers:
  - url: https://backend.inkwell.finance
    description: Production
  - url: http://localhost:3000
    description: Local development
security:
  - ApiKeyAuth: []
tags:
  - name: IKA Staking (Agent)
    description: >-
      Authenticated endpoints for staking allocation, transaction building, and
      rebalancing. Requires API key.
  - name: IKA Staking (Public)
    description: >-
      Public read-only endpoints for validator data, pricing, and APY history.
      No auth required.
  - name: Agent Identity
    description: Register API keys, manage agents, rotate credentials.
paths:
  /api/v1/ika/apy-history:
    get:
      tags:
        - IKA Staking (Public)
      summary: APY history
      description: >
        Returns historical APY data for specified validators.

        Supports incremental updates via `since_epoch` parameter (returns 304 if
        no new data).
      operationId: ikaPublicApyHistory
      parameters:
        - name: validators
          in: query
          required: true
          description: Comma-separated validator IDs
          schema:
            type: string
        - name: lookback
          in: query
          required: true
          description: Number of epochs to look back
          schema:
            type: integer
        - name: since_epoch
          in: query
          required: false
          description: Only return entries newer than this epoch (for incremental polling)
          schema:
            type: integer
      responses:
        '200':
          description: APY history
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApyHistoryResponse'
        '304':
          description: No new data since requested epoch
      security: []
components:
  schemas:
    ApyHistoryResponse:
      type: object
      properties:
        epoch:
          type: integer
        data:
          type: array
          items:
            type: object
            properties:
              validatorId:
                type: string
              epoch:
                type: integer
              apy:
                type: number
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: Agent API key obtained via self-registration or admin registration

````