# DeFi Analytics API
> Decentralized-finance analytics as an API, powered by DefiLlama. Track the Total Value Locked (TVL) across more than 7,000 DeFi protocols ranked and filterable by blockchain and category (Lending, DEXes, Liquid Staking, Bridges, CDP and more), drill into any single protocol for its current TVL, per-chain breakdown, category, market cap and links, see how much value is locked on each of 450+ blockchains, read the circulating supply and peg of every major stablecoin (USDT, USDC, DAI and the rest), and find the best yield-farming pools with their base and reward APY, filterable by chain and project. Every figure is live and denominated in USD. Perfect for DeFi dashboards and portfolio trackers, yield aggregators, research and analytics tools, trading bots and crypto data sites. No accounts, no upstream key. For token spot prices use the Crypto API.

## 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/defi-api/..."
```

## Pricing
- **Free** (Free) — 3,200 calls/Mo, 2 req/s
- **Starter** ($7/Mo) — 40,000 calls/Mo, 6 req/s
- **Pro** ($20/Mo) — 200,000 calls/Mo, 16 req/s
- **Mega** ($53/Mo) — 1,000,000 calls/Mo, 40 req/s

## Endpoints

### Protocols

#### `GET /v1/protocol` — One protocol detail

**Parameters:**
- `name` (query, required, string) — Protocol name/slug Example: `Aave`

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

**Response:**
```json
{
    "data": {
        "protocol": {
            "tvl": 13327114309,
            "url": "https://aave.com",
            "logo": "https://icons.llama.fi/aave-v3.png",
            "mcap": null,
            "name": "Aave V3",
            "slug": "aave-v3",
            "chain": "Multi-Chain",
            "audits": "audited",
            "chains": [
                "Ethereum",
                "Plasma",
                "Arbitrum",
                "Base",
                "Avalanche",
                "Binance",
                "Mantle",
                "Polygon",
                "MegaETH",
                "X Layer",
                "xDai",
                "Optimism",
                "Linea",
                "Sonic",
                "Celo",
                "Scroll",
                "zkSync Era",
                "Metis",
                "Soneium",
                "Fantom",
                "Harmony"
            ],
            "symbol": "AAVE",
            "twitter": "aave",
            "category": "Lending",
            "change_1d": -0.15,
            "change_7d": -2.68,
            "chain_tvls": {
                "Base": 409455916,
                "Celo": 5180522,
                "xDai": 52465684,
                "Linea": 13838252,
                "Metis": 323817,
                "Sonic": 10787759,
                "Fantom": 3662,
                "Mantle": 153649887,
                "Plasma": 636582712,
                "Scroll": 2156880,
                "Binance": 174174108,
          
…(truncated, see openapi.json for full schema)
```

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

**Parameters:**
- `chain` (query, optional, string) — Filter by chain Example: `Ethereum`
- `category` (query, optional, string) — Filter by category Example: `Lending`
- `limit` (query, optional, string) — Max 1-250 Example: `50`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/defi-api/v1/protocols?chain=Ethereum&category=Lending&limit=50"
```

**Response:**
```json
{
    "data": {
        "count": 50,
        "total": 158,
        "protocols": [
            {
                "tvl": 13327114309,
                "url": "https://aave.com",
                "logo": "https://icons.llama.fi/aave-v3.png",
                "mcap": null,
                "name": "Aave V3",
                "slug": "aave-v3",
                "chain": "Multi-Chain",
                "symbol": "AAVE",
                "category": "Lending",
                "change_1d": -0.15,
                "change_7d": -2.68
            },
            {
                "tvl": 7327683891,
                "url": "https://app.morpho.org",
                "logo": "https://icons.llama.fi/morpho-blue.png",
                "mcap": null,
                "name": "Morpho Blue",
                "slug": "morpho-blue",
                "chain": "Multi-Chain",
                "symbol": "MORPHO",
                "category": "Lending",
                "change_1d": 0.03,
                "change_7d": -0.49
            },
            {
                "tvl": 3626205142,
                "url": "https://app.spark.fi/points/KNQ5HD",
                "logo": "https://icons.llama.fi/sparklend.jpg",
                "mcap": null,
                "name": "SparkLend",
                "slug": "sparklend",
                "chain": "Multi-Chain",
                "symbol": "SPK",
                "category": "Lending",
                "change_1d": 1.76,
                "change_7d": 9.82
            },
            {
    
…(truncated, see openapi.json for full schema)
```

### Chains

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

**Parameters:**
- `limit` (query, optional, string) — Max results Example: `50`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/defi-api/v1/chains?limit=50"
```

**Response:**
```json
{
    "data": {
        "count": 50,
        "total": 451,
        "chains": [
            {
                "tvl": 42055875376,
                "name": "Ethereum",
                "token": "ETH",
                "chain_id": 1
            },
            {
                "tvl": 5751163498,
                "name": "BSC",
                "token": "BNB",
                "chain_id": 56
            },
            {
                "tvl": 5364786820,
                "name": "Solana",
                "token": "SOL",
                "chain_id": null
            },
            {
                "tvl": 4852378311,
                "name": "Tron",
                "token": "TRON",
                "chain_id": null
            },
            {
                "tvl": 4826919648,
                "name": "Bitcoin",
                "token": "BTC",
                "chain_id": null
            },
            {
                "tvl": 4401773310,
                "name": "Base",
                "token": null,
                "chain_id": 8453
            },
            {
                "tvl": 1740237929,
                "name": "Hyperliquid L1",
                "token": "HYPE",
                "chain_id": null
            },
            {
                "tvl": 1500467630,
                "name": "Provenance",
                "token": "HASH",
                "chain_id": null
            },
            {
                "tvl": 1491085765,
                "name": "Arbitrum",
                "token": "
…(truncated, see openapi.json for full schema)
```

### Stablecoins

#### `GET /v1/stablecoins` — Stablecoin supplies

**Parameters:**
- `limit` (query, optional, string) — Max results Example: `50`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/defi-api/v1/stablecoins?limit=50"
```

**Response:**
```json
{
    "data": {
        "count": 50,
        "total": 380,
        "stablecoins": [
            {
                "name": "Tether",
                "price": 1,
                "symbol": "USDT",
                "peg_type": "USD",
                "mechanism": "fiat-backed",
                "circulating": 188095264632
            },
            {
                "name": "USD Coin",
                "price": 1,
                "symbol": "USDC",
                "peg_type": "USD",
                "mechanism": "fiat-backed",
                "circulating": 75922898942
            },
            {
                "name": "Sky Dollar",
                "price": 1,
                "symbol": "USDS",
                "peg_type": "USD",
                "mechanism": "crypto-backed",
                "circulating": 8823263363
            },
            {
                "name": "World Liberty Financial USD",
                "price": 1,
                "symbol": "USD1",
                "peg_type": "USD",
                "mechanism": "fiat-backed",
                "circulating": 4737126484
            },
            {
                "name": "Dai",
                "price": 1,
                "symbol": "DAI",
                "peg_type": "USD",
                "mechanism": "crypto-backed",
                "circulating": 4580789509
            },
            {
                "name": "Ethena USDe",
                "price": 1,
                "symbol": "USDe",
                "peg_type": "USD",
      
…(truncated, see openapi.json for full schema)
```

### Yields

#### `GET /v1/yields` — Top yield pools

**Parameters:**
- `chain` (query, optional, string) — Filter by chain Example: `Ethereum`
- `project` (query, optional, string) — Filter by project Example: `lido`
- `sort` (query, optional, string) — tvl|apy Example: `tvl`
- `min_tvl` (query, optional, string) — Min TVL USD Example: `1000000`
- `limit` (query, optional, string) — Max 1-250 Example: `50`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/defi-api/v1/yields?chain=Ethereum&project=lido&sort=tvl&min_tvl=1000000&limit=50"
```

**Response:**
```json
{
    "data": {
        "sort": "tvl",
        "count": 1,
        "pools": [
            {
                "apy": 2.37,
                "tvl": 17832800205,
                "chain": "Ethereum",
                "symbol": "STETH",
                "project": "lido",
                "apy_base": 2.37,
                "apy_reward": null,
                "stablecoin": false
            }
        ],
        "total": 1
    },
    "meta": {
        "timestamp": "2026-06-01T00:04:02.397Z",
        "request_id": "17e2dd07-39bc-4ded-82cc-293fc41efb62"
    },
    "status": "ok",
    "message": "Yields retrieved",
    "success": true
}
```

### Meta

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

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

**Response:**
```json
{
    "data": {
        "note": "Decentralized finance (DeFi) analytics. /v1/protocols = DeFi protocols ranked by Total Value Locked (?chain=Ethereum, ?category=Lending, ?limit=); /v1/protocol?name=Aave = one protocol's TVL, per-chain breakdown & details; /v1/chains = TVL by blockchain; /v1/stablecoins = stablecoin circulating supplies & pegs; /v1/yields = top yield-farming pools with APY (?chain=, ?project=, ?sort=tvl|apy, ?min_tvl=). All values in USD, live. Data from DefiLlama. For token spot prices use the Crypto API instead.",
        "source": "DefiLlama (llama.fi)",
        "endpoints": [
            "/v1/protocols",
            "/v1/protocol",
            "/v1/chains",
            "/v1/stablecoins",
            "/v1/yields",
            "/v1/meta"
        ]
    },
    "meta": {
        "timestamp": "2026-06-01T00:04:02.450Z",
        "request_id": "3ccb01c0-1715-49d5-8375-2aaba18b0f00"
    },
    "status": "ok",
    "message": "Meta retrieved",
    "success": true
}
```


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