DefiLlama TVL API

The TVL API from DefiLlama — 6 operation(s) for tvl.

GitHub OpenAPI
Business capability
On-Chain Data & Indexing AE-240.30

Operations 6

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

0 of 6 operations are conformant: apis.io called them with no credentials and the responses matched this contract; 2 more answered but could not be checked against a schema. Checked 2026-11-12. how this works · status file

GET /protocols List DeFi protocols by TVL · List all protocols with current TVL #
Ask an LLM
“Which DeFi protocols have the highest TVL?”
“Can I get current TVL for every DeFi protocol at once?”
Tell an agent
List all DeFi protocols ranked by TVL.
Show every protocol with its current TVL.
GET /protocol/{protocol} Get a protocol's historical TVL · Historical TVL of a protocol with chain and token breakdowns #
Ask an LLM
“How has a protocol's TVL changed over time?”
“Can I see a protocol's TVL broken down by chain and token?”
Tell an agent
Show historical TVL for {protocol}.
Get the chain and token breakdown of {protocol}'s TVL.
GET /tvl/{protocol} Get a protocol's current TVL · Current TVL of a protocol #
Ask an LLM
“What is a protocol's TVL right now?”
“Can I get just the current TVL for one protocol?”
Tell an agent
Get the current TVL of {protocol}.
Tell me how much TVL {protocol} holds today.
GET /v2/historicalChainTvl Get historical TVL across all chains · Historical TVL across all chains observed #
Ask an LLM
“How has total TVL across all chains moved over time?”
“Can I chart chain TVL history for every chain?”
Tell an agent
Show historical TVL across all chains.
Plot chain TVL history for every chain.
GET /v2/historicalChainTvl/{chain} Get a chain's historical TVL · Historical TVL for a specific chain #
Ask an LLM
“How has the total value locked on a single chain changed over time?”
“Can I pull the TVL history of one specific blockchain as a time series?”
Tell an agent
Get the historical TVL for the {chain} chain.
Show how {chain}'s TVL trended day by day.
GET /v2/chains List chains by current TVL · Current TVL of all chains observed #
Ask an LLM
“Which chains have the most TVL right now?”
“Can I get current TVL for every chain?”
Tell an agent
List all chains ranked by TVL.
Show current TVL for every chain.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/defillama:defillama-tvl-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

defillama-tvl-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: DefiLlama Public TVL API
  version: 1.0.0
  description: DefiLlama is the largest open-source DeFi TVL and yield aggregator. The public REST API at api.llama.fi exposes TVL, prices, stablecoins, yields, DEX/options volumes, fees, and revenue datasets without authentication. The Pro API at pro-api.llama.fi provides higher rate limits and additional endpoints under a paid plan.
  contact:
    name: DefiLlama
    url: https://defillama.com/docs/api
  license:
    name: Open Data
    url: https://defillama.com
servers:
- url: https://api.llama.fi
  description: Free public API (no auth)
- url: https://coins.llama.fi
  description: Coins and prices API
- url: https://stablecoins.llama.fi
  description: Stablecoins API
- url: https://yields.llama.fi
  description: Yields API
- url: https://pro-api.llama.fi/{apiKey}
  description: Pro API (paid)
  variables:
    apiKey:
      default: YOUR_API_KEY
      description: DefiLlama Pro API key
security: []
tags:
- name: TVL
paths:
  /protocols:
    get:
      tags:
      - TVL
      summary: List all protocols with current TVL
      operationId: listProtocols
      responses:
        '200':
          description: Array of protocols
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
  /protocol/{protocol}:
    get:
      tags:
      - TVL
      summary: Historical TVL of a protocol with chain and token breakdowns
      operationId: getProtocol
      parameters:
      - in: path
        name: protocol
        required: true
        schema:
          type: string
        description: Protocol slug, e.g. aave
      responses:
        '200':
          description: Protocol detail
          content:
            application/json:
              schema:
                type: object
  /tvl/{protocol}:
    get:
      tags:
      - TVL
      summary: Current TVL of a protocol
      operationId: getProtocolTvl
      parameters:
      - in: path
        name: protocol
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Current TVL value
          content:
            application/json:
              schema:
                type: number
  /v2/historicalChainTvl:
    get:
      tags:
      - TVL
      summary: Historical TVL across all chains
      operationId: getHistoricalChainTvl
      responses:
        '200':
          description: Historical TVL series
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
  /v2/historicalChainTvl/{chain}:
    get:
      tags:
      - TVL
      summary: Historical TVL for a specific chain
      operationId: getHistoricalChainTvlByChain
      parameters:
      - in: path
        name: chain
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Historical TVL series for the chain
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
  /v2/chains:
    get:
      tags:
      - TVL
      summary: Current TVL of all chains
      operationId: listChains
      responses:
        '200':
          description: Array of chains with TVL
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
components:
  securitySchemes:
    apiKeyPath:
      type: apiKey
      in: query
      name: apiKey
      description: Pro API key is supplied as a path segment in the base URL (pro-api.llama.fi/{apiKey}); this scheme is a placeholder.
x-provenance:
  method: harvested
  publisher: DefiLlama
  source: https://raw.githubusercontent.com/defillama/api-docs/HEAD/defillama-openapi-free.json
  note: split by refine-openapis from the provider's own published document, verified by fetch (openapi/_original/*.fetch.json);
    stamped by stamp-openapi-provenance.py (roadmap#793)