Pendle Ve Pendle API

The Ve Pendle API from Pendle — 2 operation(s) for ve pendle.

OpenAPI Specification

pendle-ve-pendle-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  title: Pendle V2 API Docs Assets Ve Pendle API
  description: "\n## Terms used in the documentation/API\n\nBelow are some terms used in the documentation/API:\n\n- Pendle Assets/Tokens: PT, YT, LP, SY\n- Non-Pendle Assets: other tokens that are not Pendle assets, such as USDC, USDT, DAI, etc.\n- Asset ID/Token Id: Is the combination of chain id and token address, e.g. 1-0x5fe30ac5cb1abb0e44cdffb2916c254aeb368650\n- Computing unit: Cost of an API call, this is use to rate limit the API calls. More on it at [our document](https://docs.pendle.finance/pendle-v2/Developers/Backend/ApiOverview#rate-limiting)\n- APY/APR/ROI Format: All APY, APR, and ROI values are returned as decimals. For example, 0.5 means 50%, 0.05 means 5%, 1.2 means 120%\n- Percentage Change Format: All percentage change values (e.g., 24h changes) are returned as decimals. For example, 0.05 means 5% change\n- Logarithmic Values: Some fields like `lnImpliedRate` are natural logarithms. To get the actual rate, use e^(value)\n\n## Recommended way to fetch data\n\nWe have a lot of markets, if you call an API for each market, it will be very slow and you will likely get rate limited. Therefore, in some APIs we support fetch all data at once (example the get all markets data, get all assets data/prices), you could use that to fetch all data at once. They also support filter by asset id, type, so if you don't want to fetch, you can filter it down to the specific ones you want.\n\nFor detailed documentation, visit:\n\n[https://docs.pendle.finance/pendle-v2/Developers/Backend/ApiOverview](https://docs.pendle.finance/pendle-v2/Developers/Backend/ApiOverview)\n\n## Support\n\n- We have a telegram for developers to ask about the API at [https://t.me/peepo_the_engineer_bot](https://t.me/peepo_the_engineer_bot)\n- We have an announcement channel for API updates at [https://t.me/pendledevelopers](https://t.me/pendledevelopers), follow it to get the latest updates on the API.\n\n## FAQ\n\n- How to fetch prices for assets?\n  * Use [Get asset prices by IDs](#tag/assets/get/v1/prices/assets)\n\n- What if i want real time prices?\n  * Price in our systems are calculate every 15 seconds. However, if you want real time prices, use [Swapping price](#tag/sdk/get/v1/sdk/{chainId}/markets/{market}/swapping-prices), it return price for PT/YT when swapping with underlying token and vice versa, we don't have real time prices for other assets.\n\n- Can i use the SDK to get price, instead of using the `swapping-price` endpoint?\n  * **Don't use the SDK to get price**, we don't recommend it. SDK endpoints are designed for you to get the calldata for **sending transaction**, not for getting the price. Also, SDK endpoints are very costly and will get rate limited easily if you use it to get price of many tokens. \n\n- How to get token names, expiries, etc?\n  * Use [Get asset metadata by IDs](#tag/assets/get/v1/assets/all)\n\n- Do you have historical data, breakdown to minutes?\n  * No we don't, all historical data is aggregated to hourly/daily/weekly data.\n"
  version: '1.0'
  contact: {}
servers:
- url: http://127.0.0.1:9000
tags:
- name: Ve Pendle
paths:
  /v2/ve-pendle/data:
    get:
      deprecated: true
      description: '**Deprecated**: vePENDLE has been replaced by sPENDLE. This endpoint returns vePENDLE governance data and will not reflect the new sPENDLE staking system.


        Returns aggregate vePENDLE governance statistics, updated every 5 minutes.


        The response includes:

        - **Revenue**: cumulative and monthly protocol revenue from swap fees

        - **PENDLE supply**: current circulating and total supply

        - **Voting epoch data**: per-pool vote counts, swap fees, and voter APR for both the current and previous epoch

        - **Pool caps**: the vePENDLE vote weight cap per pool for this epoch and the projected cap for the next epoch


        Epochs run weekly starting on Thursdays. Vote allocations and APRs reset at the start of each new epoch.'
      operationId: VePendleController_vePendleExtendedData
      parameters: []
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VePendleExtendedDataResponse'
      summary: Get vePendle statistics
      tags:
      - Ve Pendle
      x-computing-unit: '3'
      x-retail-api-rank: 6969
  /v1/ve-pendle/market-fees-chart:
    get:
      deprecated: true
      description: '**Deprecated**: vePENDLE has been replaced by sPENDLE. The epoch-based fee distribution model no longer applies.


        Returns weekly trading fee revenue across all Pendle markets, grouped by voting epoch (epochs start on Thursdays).


        Useful for tracking protocol revenue trends and understanding which markets generate the most fee income.


        Filter by date range using `timestamp_start` and `timestamp_end` (Unix seconds).'
      operationId: VePendleController_allMarketTotalFees
      parameters:
      - name: timestamp_start
        required: false
        in: query
        description: Should be rounded up to time frame (in UTC)
        schema:
          format: date-time
          type: string
      - name: timestamp_end
        required: false
        in: query
        description: Should be rounded up to time frame (in UTC)
        schema:
          format: date-time
          type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AllMarketTotalFeesResponse'
      summary: Get market fees chart
      tags:
      - Ve Pendle
      x-computing-unit: '8'
      x-retail-api-rank: 6969
components:
  schemas:
    PoolV2Response:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier of the pool (market)
        symbol:
          type: string
          description: Symbol of the pool (market)
        expiry:
          type: string
          description: Expiry date of the pool (market)
        currentVoterApr:
          type: number
          description: Voter APR for current epoch
        lastEpochVoterApr:
          type: number
          description: Voter APR from last epoch
        currentSwapFee:
          type: number
          description: Swap fees collected in current epoch (in USD)
        lastEpochSwapFee:
          type: number
          description: Swap fees collected in last epoch (in USD)
        projectedVoterApr:
          type: number
          description: Projected voter APR for next epoch
        projectedVotes:
          nullable: true
          description: Projected votes for next epoch
          allOf:
          - $ref: '#/components/schemas/VoteV2Response'
        currentVotes:
          nullable: true
          description: Votes in current epoch
          allOf:
          - $ref: '#/components/schemas/VoteV2Response'
        expectedCap:
          type: string
          description: Expected incentive cap for next epoch (BigInt string)
        currentCap:
          type: string
          description: Current incentive cap for this epoch (BigInt string)
      required:
      - id
      - symbol
      - expiry
    TotalFeesWithTimestamp:
      type: object
      properties:
        time:
          format: date-time
          type: string
          description: timestamp where total fee is being calculated
        totalFees:
          type: number
          description: total fees at given timestamp
      required:
      - time
      - totalFees
    AllMarketTotalFeesResponse:
      type: object
      properties:
        results:
          description: all market total fees response
          type: array
          items:
            $ref: '#/components/schemas/MarketTotalFeesData'
      required:
      - results
    PendleTokenSupplyResponse:
      type: object
      properties:
        timestamp:
          format: date-time
          type: string
          description: Timestamp of the token supply data
        totalPendleCirculating:
          type: number
          description: Total circulating supply of PENDLE tokens (not locked)
        totalPendleLocked:
          type: number
          description: Total amount of PENDLE tokens locked in vePENDLE
        totalPendleSupply:
          type: number
          description: Total supply of PENDLE tokens
      required:
      - timestamp
      - totalPendleCirculating
      - totalPendleLocked
      - totalPendleSupply
    MarketMetaData:
      type: object
      properties:
        id:
          type: string
          description: market id
      required:
      - id
    VoteV2Response:
      type: object
      properties:
        votes:
          type: number
          description: Absolute number of votes
        percentage:
          type: number
          description: Percentage of total votes
      required:
      - votes
      - percentage
    VePendleExtendedDataResponse:
      type: object
      properties:
        avgLockDuration:
          type: number
          description: Average lock duration in days
        totalPendleLocked:
          type: number
          description: Total amount of PENDLE tokens locked in vePENDLE
        vePendleSupply:
          type: number
          description: Total supply of vePENDLE tokens
        totalProjectedVotes:
          type: number
          description: Total projected votes for next epoch
        totalCurrentVotes:
          type: number
          description: Total votes in current epoch
        pools:
          description: List of voting pools with their APY, fees, and voting data
          type: array
          items:
            $ref: '#/components/schemas/PoolV2Response'
        tokenSupply:
          description: Current circulating and total supply of PENDLE tokens
          allOf:
          - $ref: '#/components/schemas/PendleTokenSupplyResponse'
        monthlyRevenue:
          description: Monthly protocol revenue breakdown and trends
          allOf:
          - $ref: '#/components/schemas/GetMonthlyRevenueResponse'
      required:
      - avgLockDuration
      - totalPendleLocked
      - vePendleSupply
      - totalProjectedVotes
      - totalCurrentVotes
      - pools
    MarketTotalFeesData:
      type: object
      properties:
        market:
          description: market metadata
          allOf:
          - $ref: '#/components/schemas/MarketMetaData'
        values:
          description: total fee at each timestamp
          type: array
          items:
            $ref: '#/components/schemas/TotalFeesWithTimestamp'
      required:
      - market
      - values
    GetMonthlyRevenueResponse:
      type: object
      properties:
        revenues:
          description: The revenues of the month in USD within the time range
          type: array
          items:
            type: number
        epochStartDates:
          description: The start dates of the month in Date within the time range
          type: array
          items:
            type: string
        accumulatedRevenue:
          type: number
          description: all time revenues in USD
      required:
      - revenues
      - epochStartDates
      - accumulatedRevenue