Pendle Statistics API

The Statistics API from Pendle — 1 operation(s) for statistics.

OpenAPI Specification

pendle-statistics-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  title: Pendle V2 API Docs Assets Statistics 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: Statistics
paths:
  /v1/statistics/get-distinct-user-from-token:
    get:
      description: "Returns a list of unique wallet addresses that have interacted with a specific token across Pendle markets. \n\nUse the optional `chainId` parameter to filter results to a specific chain, or omit it to get users across all chains. \n\nCommon use cases include:\n- Token holder analysis\n- User adoption metrics\n- Market participation statistics"
      operationId: StatisticsController_getDistinctUserFromToken
      parameters:
      - name: token
        required: true
        in: query
        description: Token address to query. Can be any Pendle token (PT, YT, SY, LP). Address will be normalized to lowercase.
        schema:
          example: '0x0000000000000000000000000000000000000000'
          type: string
      - name: chainId
        required: false
        in: query
        description: Optional chain ID to filter results. If provided, returns only users who interacted with the token on the specified chain. If omitted, returns users across all chains where the token exists.
        schema:
          type: number
      responses:
        '200':
          description: Array of unique wallet addresses that have interacted with the specified token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetDistinctUsersFromTokenEntity'
              example:
                users:
                - '0x1234567890123456789012345678901234567890'
                - '0x0987654321098765432109876543210987654321'
                - '0xabcdefabcdefabcdefabcdefabcdefabcdefabcd'
      summary: Get distinct users for a specific token
      tags:
      - Statistics
      x-computing-unit: '3'
      x-retail-api-rank: 6969
components:
  schemas:
    GetDistinctUsersFromTokenEntity:
      type: object
      properties:
        users:
          description: Array of unique wallet addresses (lowercase) that have interacted with the specified token. Addresses are deduplicated across both Sentio and internal data sources.
          example:
          - '0x1234567890123456789012345678901234567890'
          - '0x0987654321098765432109876543210987654321'
          - '0xabcdefabcdefabcdefabcdefabcdefabcdefabcd'
          type: array
          items:
            type: string
      required:
      - users