# DeFi TVL by Chain — DefiLlama

**Use case:** 

Total value locked in DeFi for the top 30 blockchains, ranked by TVL: chain, TVL in USD, native token symbol, chain id and CoinGecko id, with a link to each chain's DefiLlama page. For analysts, investors and ecosystem teams comparing chains. Raise limit to cover every chain, or use mode=chainHistory for the TVL trend of selected chains.

## Input

```json
{
  "mode": "chains",
  "limit": 30,
  "fields": [],
  "chains": [],
  "categories": [],
  "excludeCategories": [
    "CEX",
    "Chain"
  ],
  "slugs": [],
  "auditedOnly": false,
  "includeChainTvls": false,
  "chainDetails": true,
  "projects": [],
  "symbols": [],
  "stablecoinOnly": false,
  "singleExposureOnly": false,
  "noIlOnly": false,
  "excludeOutliers": true,
  "poolIds": [],
  "pegTypes": [],
  "pegMechanisms": [],
  "includeChainBreakdown": false,
  "feeMetric": "dailyFees",
  "volumeType": "dexs",
  "includeBreakdown": false,
  "aggregate": "daily",
  "sortDir": "desc"
}
```

## Output

```json
{
  "name": {
    "label": "Name",
    "format": "string"
  },
  "category": {
    "label": "Category",
    "format": "string"
  },
  "chain": {
    "label": "Chain",
    "format": "string"
  },
  "chainCount": {
    "label": "Chain count",
    "format": "number"
  },
  "tvl": {
    "label": "TVL (USD)",
    "format": "number"
  },
  "change1d": {
    "label": "Change 1d (%)",
    "format": "number"
  },
  "change7d": {
    "label": "Change 7d (%)",
    "format": "number"
  },
  "change1m": {
    "label": "Change 30d (%)",
    "format": "number"
  },
  "mcapTvl": {
    "label": "Mcap / TVL",
    "format": "number"
  },
  "listedAt": {
    "label": "Listed at",
    "format": "string"
  },
  "sourceUrl": {
    "label": "DefiLlama page",
    "format": "string"
  }
}
```

## About this Actor

This example demonstrates how to use [DefiLlama Scraper — Protocol TVL, Chains, Yields & Stablecoins](https://apify.com/yadroo/defillama-protocols.md) with a specific input configuration. Visit the [Actor detail page](https://apify.com/yadroo/defillama-protocols.md) to learn more, explore other use cases, and run it yourself.


## How to integrate an Actor?

This Task's input is already configured above. Use it as-is rather than inventing a new one.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For full API examples (JavaScript, Python, CLI, MCP, OpenAPI), see this Task's Actor page: https://apify.com/yadroo/defillama-protocols.md

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).
