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

# Yield Pool Ranking



## OpenAPI

````yaml openapi.json GET /gateway/v1/onchain/yield/ranking
openapi: 3.1.0
info:
  title: Hermod
  version: 0.0.1
servers:
  - url: https://api.asksurf.ai
security: []
paths:
  /gateway/v1/onchain/yield/ranking:
    get:
      tags:
        - Onchain
      summary: Yield Pool Ranking
      description: |-
        Returns DeFi yield pools ranked by APY or TVL.

        Returns the latest snapshot. Filter by protocol.
      operationId: onchain-yield-ranking
      parameters:
        - description: Filter by protocol name like `lido`, `aave`, or `uniswap`
          explode: false
          in: query
          name: project
          schema:
            description: Filter by protocol name like `lido`, `aave`, or `uniswap`
            examples:
              - aave
            type: string
        - description: >-
            Ranking metric: `apy` or `tvl_usd`. When sorted by `apy`, only pools
            with TVL >= $100k are included
          explode: false
          in: query
          name: sort_by
          schema:
            default: apy
            description: >-
              Ranking metric: `apy` or `tvl_usd`. When sorted by `apy`, only
              pools with TVL >= $100k are included
            enum:
              - apy
              - tvl_usd
            examples:
              - apy
            type: string
        - description: Sort direction
          explode: false
          in: query
          name: order
          schema:
            default: desc
            description: Sort direction
            enum:
              - asc
              - desc
            examples:
              - desc
            type: string
        - description: Results per page
          explode: false
          in: query
          name: limit
          schema:
            default: 20
            description: Results per page
            examples:
              - 20
            format: int64
            maximum: 100
            minimum: 1
            type: integer
        - description: Pagination offset
          explode: false
          in: query
          name: offset
          schema:
            default: 0
            description: Pagination offset
            examples:
              - 0
            format: int64
            minimum: 0
            type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataResponseYieldRankingItem'
          description: OK
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataAPIError'
          description: Error
      security:
        - AccessToken: []
components:
  schemas:
    DataResponseYieldRankingItem:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/DataResponseYieldRankingItem.json
          format: uri
          readOnly: true
          type: string
        data:
          items:
            $ref: '#/components/schemas/YieldRankingItem'
          type:
            - array
            - 'null'
        meta:
          $ref: '#/components/schemas/OffsetMeta'
      required:
        - data
        - meta
      type: object
    DataAPIError:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/DataAPIError.json
          format: uri
          readOnly: true
          type: string
        error:
          $ref: '#/components/schemas/DataAPIErrorDetail'
      required:
        - error
      type: object
    YieldRankingItem:
      additionalProperties: false
      properties:
        apy:
          description: Total APY (base + reward)
          format: double
          type: number
        apy_base:
          description: Base APY from pool fees or interest
          format: double
          type: number
        apy_reward:
          description: Reward token APY
          format: double
          type: number
        pool_address:
          description: Pool or vault contract address
          type: string
        project:
          description: Protocol name
          type: string
        symbol:
          description: Token symbol
          type: string
        token_address:
          description: Underlying token address
          type: string
        tvl_usd:
          description: Pool TVL in USD
          format: double
          type: number
        version:
          description: Protocol version
          type: string
      required:
        - project
        - version
        - symbol
        - pool_address
        - token_address
        - apy
        - apy_base
        - apy_reward
        - tvl_usd
      type: object
    OffsetMeta:
      additionalProperties: false
      properties:
        cached:
          description: Whether this response was served from cache
          type: boolean
        credits_used:
          description: Credits deducted for this request
          format: int64
          type: integer
        limit:
          description: Maximum number of items returned in this response
          format: int64
          type: integer
        offset:
          description: Number of items skipped (pagination offset)
          format: int64
          type: integer
        total:
          description: >-
            Total number of matching items (before pagination). Omitted when
            total is unknown.
          format: int64
          type: integer
      required:
        - limit
        - offset
        - credits_used
        - cached
      type: object
    DataAPIErrorDetail:
      additionalProperties: false
      properties:
        code:
          type: string
        message:
          type: string
      required:
        - code
        - message
      type: object

````