Yield Pool Ranking

GET/gateway/v1/onchain/yield/ranking

List individual DeFi yield pools ranked by APY or TVL. Example: filter by protocol like `lido` or `aave` for pool-level yield data.

Query Parameters

projectstring

Filter by protocol name like `lido`, `aave`, or `uniswap`

Example: aave
sort_byenum<string>

Ranking metric: `apy` or `tvl_usd`. When sorted by `apy`, only pools with TVL >= $100k are included

Available options:apytvl_usd
Example: apy
orderenum<string>

Sort direction

Available options:ascdesc
Example: desc
limitinteger

Results per page

Example: 20
offsetinteger

Pagination offset

Example: 0
Yield Pool Ranking
const options = {method: 'GET'};

fetch('https://api.asksurf.ai/gateway/v1/onchain/yield/ranking?project=aave&sort_by=apy&order=desc&limit=20&offset=0', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
OK
{
  "$schema": "https://example.com/schemas/DataResponseYieldRankingItem.json",
  "data": [
    {
      "apy": 123,
      "apy_base": 123,
      "apy_reward": 123,
      "pool_address": "<string>",
      "project": "<string>",
      "symbol": "<string>",
      "token_address": "<string>",
      "tvl_usd": 123,
      "version": "<string>"
    }
  ],
  "meta": {
    "cached": true,
    "credits_used": 123,
    "empty_reason": "<string>",
    "has_more": true,
    "limit": 123,
    "offset": 123,
    "total": 123,
    "watermark": 123
  }
}