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

# Get TVL history

> Get a time series of a yield's total value locked, in underlying token units.

Window, `interval` and pagination work as in [reward rate history](/api-reference/YieldsController_getYieldRewardRateHistory): `period` (default `30d`) or `from`/`to`, `interval` of `day`, `week` or `month` (`period=all` with `day` returns weekly points), and `limit` up to `365` (default `100`).

Each point carries `tvl` in human-readable token units and `tvlRaw` in the smallest unit. `feeConfigurationId` selects a partner allocator vault: pass a fee configuration ID to get that vault's TVL history, and omit it for the underlying yield's TVL. See [Rewards and history](/documentation/earn/core-concepts/rewards-history).


## OpenAPI

````yaml openapi.json GET /v1/yields/{yieldId}/tvl/history
openapi: 3.0.0
info:
  title: 'Yield API: Earn'
  description: API Documentation
  version: '1.0'
  contact: {}
servers:
  - url: https://api.yield.xyz
    description: Production
security: []
tags:
  - name: Discovery
    description: >-
      Browse and discover yield opportunities, networks, and providers, plus
      yield-level risk, reward rate, and TVL data
  - name: Portfolio
    description: User-specific balances and KYC status
  - name: Actions
    description: Generate transactions to enter, exit, and manage yields
externalDocs:
  description: For more information
  url: https://docs.yield.xyz
paths:
  /v1/yields/{yieldId}/tvl/history:
    get:
      tags:
        - Discovery
      summary: Get historical TVL snapshots for a yield
      description: >-
        Returns a chronological time series of Total Value Locked for the
        specified yield, expressed in underlying token units. Supports
        configurable time ranges, sampling intervals (day/week/month), and
        pagination.
      operationId: YieldsController_getYieldTvlHistory_v1
      parameters:
        - name: yieldId
          required: true
          in: path
          description: The unique identifier of the yield
          schema:
            example: ethereum-usdc-aave-v3-lending
            type: string
        - name: offset
          required: false
          in: query
          description: Pagination offset
          schema:
            minimum: 0
            default: 0
            example: 0
            type: number
        - name: limit
          required: false
          in: query
          description: Maximum number of data points to return (default 100, max 365)
          schema:
            minimum: 1
            maximum: 365
            default: 100
            example: 20
            type: number
        - name: from
          required: false
          in: query
          description: Start of time range (ISO 8601). Overrides period when provided.
          schema:
            example: '2025-01-01T00:00:00Z'
            type: string
        - name: to
          required: false
          in: query
          description: End of time range (ISO 8601). Defaults to now.
          schema:
            example: '2025-07-10T00:00:00Z'
            type: string
        - name: period
          required: false
          in: query
          description: >-
            Predefined time window. Ignored when from/to are provided. Default:
            30d.
          schema:
            enum:
              - 1d
              - 7d
              - 30d
              - 90d
              - 1y
              - all
            type: string
        - name: interval
          required: false
          in: query
          description: 'Sampling resolution (day/week/month). Default: day.'
          schema:
            enum:
              - day
              - week
              - month
            type: string
        - name: feeConfigurationId
          required: false
          in: query
          description: >-
            Fee configuration ID used to resolve partner allocator vault TVL
            history. Omit for underlying yield TVL history.
          schema:
            example: 66f299cd-aaaa-bbbb-cccc-d1f26e3a02db
            type: string
      responses:
        '200':
          description: Returns a time series of TVL snapshots in token units
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TvlHistoryResponseDto'
        '400':
          description: >-
            Invalid request parameters, or the yield is not enabled for your
            project
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Validation failed
                  error:
                    type: string
                    example: Bad Request
                  statusCode:
                    type: number
                    example: 400
        '401':
          description: Invalid or missing API key
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Invalid API key
                  error:
                    type: string
                    example: Unauthorized
                  statusCode:
                    type: number
                    example: 401
        '404':
          description: Yield not found with the specified ID
        '429':
          description: Rate limit exceeded
          headers:
            x-ratelimit-limit:
              description: Request limit per window
              schema:
                type: string
            x-ratelimit-remaining:
              description: Remaining requests (will be 0)
              schema:
                type: string
            x-ratelimit-reset:
              description: Unix timestamp when window resets
              schema:
                type: string
            retry-after:
              description: Seconds to wait before retrying
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Rate limit exceeded
                  error:
                    type: string
                    example: Too Many Requests
                  statusCode:
                    type: number
                    example: 429
                  retryAfter:
                    type: number
                    example: 30
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Internal server error
                  error:
                    type: string
                    example: Internal Server Error
                  statusCode:
                    type: number
                    example: 500
      security:
        - ApiKey: []
components:
  schemas:
    TvlHistoryResponseDto:
      type: object
      properties:
        total:
          type: number
          description: Total number of items available
          example: 100
        offset:
          type: number
          description: Offset of the current page
          example: 0
        limit:
          type: number
          description: Limit of the current page
          example: 20
        yieldId:
          type: string
          description: Unique identifier of the yield
          example: ethereum-usdc-aave-v3
        interval:
          type: string
          description: Sampling interval used for this response
          enum:
            - day
            - week
            - month
          example: day
        from:
          type: string
          description: Start of the returned date range (ISO 8601)
          example: '2025-06-12T00:00:00.000Z'
        to:
          type: string
          description: End of the returned date range (ISO 8601)
          example: '2025-07-12T00:00:00.000Z'
      required:
        - total
        - offset
        - limit
        - yieldId
        - interval
        - from
        - to
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: x-api-key

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.