DeFi Protocol Ranking

GET/gateway/v1/project/defi/ranking

Returns a DeFi protocol leaderboard (e.g. Aave, Uniswap, Lido) ranked by TVL, fees, revenue, or users. For individual pool/vault yields, use `onchain-yield-ranking` instead.

Available metrics: `tvl`, `revenue`, `fees`, `volume`, `users`.

Query Parameters

metricenum<string>required

Ranking metric. Can be `tvl`, `revenue`, `fees`, `volume`, or `users`.

Available options:tvlrevenuefeesvolumeusers
Example: tvl
limitinteger

Results per page

Example: 20
offsetinteger

Pagination offset

Example: 0
DeFi Protocol Ranking
const options = {method: 'GET'};

fetch('https://api.asksurf.ai/gateway/v1/project/defi/ranking?metric=tvl&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/DataResponseProjectTopRankItem.json",
  "data": [
    {
      "fees": 123,
      "id": "<string>",
      "logo_url": "<string>",
      "name": "<string>",
      "revenue": 123,
      "slug": "<string>",
      "symbol": "<string>",
      "tvl": 123,
      "users": 123,
      "volume": 123
    }
  ],
  "meta": {
    "cached": true,
    "credits_used": 123,
    "empty_reason": "<string>",
    "has_more": true,
    "limit": 123,
    "offset": 123,
    "total": 123,
    "watermark": 123
  }
}