# DeFiLlama API
> Decentralized-finance analytics as an API, powered by DeFiLlama — the most-used, independent dashboard for tracking Total Value Locked (TVL) across the DeFi ecosystem. TVL is the dollar value of assets deposited in a protocol, the key measure of a DeFi protocol's size and health. This API wraps DeFiLlama's open data into clean, compact JSON. /v1/protocols ranks DeFi protocols by TVL and lets you filter by blockchain (chain=Ethereum) and by category (category=Lending, Dexes, Liquid Staking, CDP, Yield, Bridge and more) — each protocol with its slug, token symbol, category, the chains it runs on, its TVL in USD and 1-day and 7-day TVL change. /v1/protocol?slug=aave returns a single protocol's profile and its current TVL broken down by blockchain (real chains only, so the headline figure is not inflated by staking or borrowed aggregates). /v1/chains ranks every blockchain by the TVL deployed on it. /v1/stablecoins ranks stablecoins by circulating supply, with each coin's peg type and peg mechanism. All values are in US dollars and reflect the latest snapshot. Ideal for crypto and DeFi dashboards, portfolio and risk tools, market-research and analytics products, and Discord/Telegram bots. This is on-chain/DeFi analytics — distinct from token-price feeds. Use a protocol slug from /v1/protocols for the detail endpoint. Data from DeFiLlama (free and open).

## Authentication
All requests require your oanor API key in the `x-oanor-key` header. Get one at https://www.oanor.com/developer/keys.

```bash
curl -H "x-oanor-key: oanor_live_…" "https://api.oanor.com/defillama-api/..."
```

## Pricing
- **Free** (Free) — 2,600 calls/Mo, 2 req/s
- **Starter** ($9/Mo) — 54,000 calls/Mo, 5 req/s
- **Pro** ($29/Mo) — 250,000 calls/Mo, 12 req/s
- **Mega** ($78/Mo) — 900,000 calls/Mo, 35 req/s

## Endpoints

### DeFi

#### `GET /v1/chains` — TVL per blockchain

**Parameters:**
- `limit` (query, optional, string) — Max results (1-200)

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/defillama-api/v1/chains"
```

**Response:**
```json
{
    "data": {
        "count": 50,
        "total": 451,
        "chains": [
            {
                "name": "Ethereum",
                "token": "ETH",
                "tvl_usd": 41690089592
            },
            {
                "name": "BSC",
                "token": "BNB",
                "tvl_usd": 5626391828
            },
            {
                "name": "Solana",
                "token": "SOL",
                "tvl_usd": 5251162587
            },
            {
                "name": "Tron",
                "token": "TRON",
                "tvl_usd": 4800375830
            },
            {
                "name": "Bitcoin",
                "token": "BTC",
                "tvl_usd": 4670403572
            },
            {
                "name": "Base",
                "token": null,
                "tvl_usd": 4289568537
            },
            {
                "name": "Hyperliquid L1",
                "token": "HYPE",
                "tvl_usd": 1741121658
            },
            {
                "name": "Provenance",
                "token": "HASH",
                "tvl_usd": 1519380770
            },
            {
                "name": "Arbitrum",
                "token": "ARB",
                "tvl_usd": 1410487481
            },
            {
                "name": "Polygon",
                "token": "POL",
                "tvl_usd": 1096923436
            },
            {
                "name": "Plasma",
                "token": "XPL
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/protocol` — A protocol TVL by chain

**Parameters:**
- `slug` (query, required, string) — Protocol slug (from /v1/protocols), e.g. aave Example: `aave`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/defillama-api/v1/protocol?slug=aave"
```

**Response:**
```json
{
    "data": {
        "protocol": {
            "url": "https://aave.com",
            "logo": "https://icons.llama.fi/aave.png",
            "name": "Aave",
            "chains": [],
            "symbol": "AAVE",
            "tvl_usd": 13609500318,
            "twitter": "aave",
            "description": "Aave is an Open Source and Non-Custodial protocol to earn interest on deposits and borrow assets",
            "tvl_by_chain": {
                "BSC": 167803610,
                "Base": 401944050,
                "Celo": 5988780,
                "Aptos": 1727728,
                "Linea": 13173595,
                "Metis": 319466,
                "Sonic": 10786653,
                "Fantom": 4546,
                "Gnosis": 51018685,
                "Mantle": 145000910,
                "Plasma": 637868195,
                "Scroll": 2124090,
                "Harmony": 0,
                "MegaETH": 109412657,
                "Polygon": 136248237,
                "Soneium": 197324,
                "X Layer": 68088064,
                "Arbitrum": 433988342,
                "Ethereum": 11056484266,
                "Avalanche": 319633928,
                "OP Mainnet": 46525553,
                "ZKsync Era": 1161639
            }
        }
    },
    "meta": {
        "timestamp": "2026-06-01T16:23:42.008Z",
        "request_id": "c3ae980d-67cb-488a-ba34-5e4d14edf5d9"
    },
    "status": "ok",
    "message": "Protocol retrieved",
    "success": true
}
```

#### `GET /v1/protocols` — DeFi protocols ranked by TVL

**Parameters:**
- `chain` (query, optional, string) — Filter by chain, e.g. Ethereum Example: `Ethereum`
- `category` (query, optional, string) — Filter by category, e.g. Lending
- `limit` (query, optional, string) — Max results (1-200)

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/defillama-api/v1/protocols?chain=Ethereum"
```

**Response:**
```json
{
    "data": {
        "chain": "Ethereum",
        "count": 50,
        "total": 1773,
        "category": null,
        "protocols": [
            {
                "url": "https://www.binance.com",
                "logo": "https://icons.llama.fi/binance-cex.jpg",
                "name": "Binance CEX",
                "slug": "binance-cex",
                "chains": [
                    "Ethereum",
                    "Bitcoin",
                    "Binance",
                    "Solana",
                    "Ripple",
                    "Tron",
                    "Doge",
                    "Arbitrum"
                ],
                "symbol": "BNB",
                "tvl_usd": 149933063178,
                "category": "CEX",
                "change_1d_pct": -2.580677465592231,
                "change_7d_pct": -3.071662071468481
            },
            {
                "url": "https://www.okx.com",
                "logo": "https://icons.llama.fi/okx.jpg",
                "name": "OKX",
                "slug": "okx",
                "chains": [
                    "Ethereum",
                    "Bitcoin",
                    "Solana",
                    "Tron",
                    "Doge",
                    "Ripple",
                    "Litecoin",
                    "TON"
                ],
                "symbol": null,
                "tvl_usd": 23435694660,
                "category": "CEX",
                "change_1d_pct": -1.6051017264045981,
            
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/stablecoins` — Stablecoins by circulating supply

**Parameters:**
- `limit` (query, optional, string) — Max results (1-200)

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/defillama-api/v1/stablecoins"
```

**Response:**
```json
{
    "data": {
        "count": 50,
        "total": 380,
        "stablecoins": [
            {
                "name": "Tether",
                "chains": [
                    "Tron",
                    "Ethereum",
                    "BSC",
                    "Solana",
                    "Arbitrum",
                    "Aptos",
                    "Polygon",
                    "Plasma"
                ],
                "symbol": "USDT",
                "peg_type": "peggedUSD",
                "peg_mechanism": "fiat-backed",
                "circulating_usd": 187915477322
            },
            {
                "name": "USD Coin",
                "chains": [
                    "Ethereum",
                    "Solana",
                    "Hyperliquid L1",
                    "Base",
                    "Arbitrum",
                    "Polygon",
                    "BSC",
                    "Avalanche"
                ],
                "symbol": "USDC",
                "peg_type": "peggedUSD",
                "peg_mechanism": "fiat-backed",
                "circulating_usd": 76000419807
            },
            {
                "name": "Sky Dollar",
                "chains": [
                    "Ethereum",
                    "Base",
                    "OP Mainnet",
                    "Unichain",
                    "Arbitrum",
                    "Solana",
                    "Avalanche"
                ],
                "symbol": "USDS",
            
…(truncated, see openapi.json for full schema)
```

### Meta

#### `GET /v1/meta` — Usage notes

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/defillama-api/v1/meta"
```

**Response:**
```json
{
    "data": {
        "note": "DeFiLlama is the most-used analytics dashboard for decentralized finance, tracking Total Value Locked (TVL) — the dollar value deposited in DeFi protocols. /v1/protocols = DeFi protocols ranked by TVL, filterable by chain (chain=Ethereum) and category (category=Lending, Dexes, Liquid Staking, …), each with its slug, symbol, category, chains, TVL in USD and 1-day/7-day TVL change; /v1/protocol?slug=aave = a single protocol's profile and its current TVL broken down by chain; /v1/chains = every blockchain ranked by the TVL deployed on it; /v1/stablecoins = stablecoins ranked by circulating supply, with peg type and mechanism. All values are in USD and reflect the latest snapshot. This is DeFi/on-chain analytics — distinct from token price feeds. Data from DeFiLlama (free, open). Use a protocol slug from /v1/protocols for /v1/protocol.",
        "source": "DeFiLlama — open DeFi TVL analytics (llama.fi)",
        "endpoints": [
            "/v1/protocols",
            "/v1/protocol",
            "/v1/chains",
            "/v1/stablecoins",
            "/v1/meta"
        ]
    },
    "meta": {
        "timestamp": "2026-06-01T16:23:42.607Z",
        "request_id": "7ce271d0-1e36-4542-ae69-708c4d784e71"
    },
    "status": "ok",
    "message": "Meta retrieved",
    "success": true
}
```


---
Marketplace page: https://www.oanor.com/api/defillama-api
OpenAPI spec: https://www.oanor.com/api/defillama-api/openapi.json
