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

# Get Earn Vault History

> Returns snapshot history for a vault. `timeLookback` is the window in seconds back from now; `sampleIntervalSecs` optionally buckets the points (for example `3600` for hourly).



## OpenAPI

````yaml post /markets/earn/vaults/history
openapi: 3.1.0
info:
  title: Loopscale API
  version: 0.1.0
servers:
  - url: https://tars.loopscale.com/v1
    description: Loopscale Production Server
security: []
paths:
  /markets/earn/vaults/history:
    post:
      tags:
        - earn_data
      summary: Get Earn Vault History
      description: >-
        Returns snapshot history for a vault. `timeLookback` is the window in
        seconds back from now; `sampleIntervalSecs` optionally buckets the
        points (for example `3600` for hourly).
      operationId: query_get_earn_vault_history
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EarnVaultHistoryRequest'
        required: true
      responses:
        '200':
          description: Snapshot history points, oldest first
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/EarnVaultHistoryPoint'
        '400':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    EarnVaultHistoryRequest:
      type: object
      required:
        - address
        - timeLookback
      properties:
        address:
          type: string
        sampleIntervalSecs:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        timeLookback:
          type: integer
          format: int64
    EarnVaultHistoryPoint:
      type: object
      required:
        - timestamp
        - snapshotSlot
        - shareSupply
        - navPerShareE18
        - totalAumAssets
        - pendingWithdrawalsAssets
      properties:
        displayApyBps:
          type:
            - integer
            - 'null'
          format: int32
          description: >-
            Forward-looking headline vault APY, mirrored from the snapshot.
            Signed

            basis points; `null` when coverage is insufficient at that snapshot.
        leverageX100:
          type:
            - integer
            - 'null'
          format: int32
          minimum: 0
        navPerShareE18:
          type: string
        pendingWithdrawalsAssets:
          type: string
        realizedApyBps24h:
          type:
            - integer
            - 'null'
          format: int32
          description: DEPRECATED — use `realizedReturnBps24h`.
        realizedApyBps30d:
          type:
            - integer
            - 'null'
          format: int32
          description: >-
            DEPRECATED — use `realizedReturnBps30d`. Mirrored for one release
            cycle.
        realizedApyBps7d:
          type:
            - integer
            - 'null'
          format: int32
          description: DEPRECATED — use `realizedReturnBps7d`.
        realizedReturnBps24h:
          type:
            - integer
            - 'null'
          format: int32
          description: >-
            Backward-looking NAV-delta return over the trailing 24h, in basis
            points.
        realizedReturnBps30d:
          type:
            - integer
            - 'null'
          format: int32
          description: >-
            Backward-looking NAV-delta return over the trailing 30d, in basis
            points.
        realizedReturnBps7d:
          type:
            - integer
            - 'null'
          format: int32
          description: >-
            Backward-looking NAV-delta return over the trailing 7d, in basis
            points.
        rewardsApyBps:
          type:
            - integer
            - 'null'
          format: int32
        shareSupply:
          type: string
        snapshotSlot:
          type: string
        timestamp:
          type: integer
          format: int64
        totalAumAssets:
          type: string
        utilizationBps:
          type:
            - integer
            - 'null'
          format: int32
          minimum: 0
    ErrorResponse:
      type: object
      description: |-
        Canonical error envelope for every endpoint. The `x-request-id` response
        header carries the correlation id for the failing request.
      required:
        - error
      properties:
        error:
          $ref: '#/components/schemas/ErrorDetails'
          description: error detail
    ErrorDetails:
      type: object
      description: Inner detail of the [`ErrorResponse`] envelope.
      required:
        - code
        - message
      properties:
        code:
          type: integer
          format: int32
          description: HTTP status code, mirrored in the response status line
          example: 400
          minimum: 0
        message:
          type: string
          description: human-readable, client-safe message (sensitive data redacted)
          example: Request could not be processed.

````