# DeFi Lending Rates API
> The supply and borrow rates of on-chain money markets, compared across every major DeFi lending protocol and chain at once — live from DeFiLlama, no key. The same asset earns and costs a different rate on every protocol and every chain: USDC might pay 3% to supply on Aave v3 Ethereum and cost a fraction to borrow somewhere else, and those rates move every block. A single protocol's reserves are only part of the picture; what a lender or borrower wants is the cross-protocol, cross-chain comparison. This API joins DeFiLlama's pool yields with its lend/borrow dataset into one money-market table: for every lending reserve it gives the supply APY (base + reward), the borrow APY (base + reward), the utilisation, the loan-to-value and the dollar size of the supplied and borrowed pools. The markets endpoint returns the full table (filter by asset, chain, protocol, stablecoin, minimum size); the best endpoint returns the top venues to supply an asset (highest APY) or to borrow it (lowest APY) right now; the asset endpoint summarises one asset across all its markets — the min, max, average and median supply and borrow APY, plus the single best place to lend and to borrow. Ranking surfaces exclude DeFiLlama-flagged outlier pools and impossible (>100%) utilisation, so the best rate is a real, harvestable one. The cross-protocol money-market-rates cut — distinct from TVL analytics (which size protocols, not their rates), single-protocol lending APIs (one venue each), and perpetual funding-rate APIs (a different rate entirely).

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

## Pricing
- **Free** (Free) — 820 calls/Mo, 2 req/s
- **Starter** ($12/Mo) — 18,800 calls/Mo, 6 req/s
- **Pro** ($36/Mo) — 96,000 calls/Mo, 16 req/s
- **Business** ($82/Mo) — 530,000 calls/Mo, 40 req/s

## Endpoints

### Markets

#### `GET /v1/markets` — Cross-protocol money-market lending table

**Parameters:**
- `asset` (query, optional, string) — Filter by asset symbol Example: `USDC`
- `chain` (query, optional, string) — Filter by chain Example: `Ethereum`
- `project` (query, optional, string) — Filter by protocol Example: `aave-v3`
- `stablecoin` (query, optional, string) — Stablecoins only (true) Example: `true`
- `sort` (query, optional, string) — supply | borrow | utilization | tvl Example: `supply`
- `limit` (query, optional, string) — Page size (1-300) Example: `50`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/lendingrates-api/v1/markets?asset=USDC&chain=Ethereum&project=aave-v3&stablecoin=true&sort=supply&limit=50"
```

**Response:**
```json
{
    "data": {
        "note": "On-chain money-market lending reserves across protocols and chains, each with supply APY (base+reward), borrow APY (base−reward subsidy), utilisation %, LTV and pool size. Filter by asset, chain, project, stablecoin, min_tvl; sort by supply (default), borrow, utilization or tvl. DeFiLlama-flagged outlier pools and impossible (>100%) utilisation are excluded by default — pass include_outliers=true to keep them. Live from DeFiLlama, lightly cached.",
        "sort": "supply",
        "count": 3,
        "limit": 50,
        "offset": 0,
        "source": "DeFiLlama yields (pools + lendBorrow)",
        "markets": [
            {
                "ltv": 0.75,
                "chain": "Ethereum",
                "symbol": "USDC",
                "outlier": false,
                "pool_id": "aa70268e-4b52-42bf-a116-608b370f9501",
                "project": "aave-v3",
                "tvl_usd": 182130129,
                "pool_meta": null,
                "borrow_apy": 3.9443,
                "borrowable": true,
                "stablecoin": true,
                "supply_apy": 3.2204,
                "utilization": 90.72,
                "borrow_apy_base": 3.9443,
                "supply_apy_base": 3.2204,
                "total_borrow_usd": 1780060254,
                "total_supply_usd": 1962083898,
                "borrow_apy_reward": null,
                "supply_apy_reward": null
            },
            {
                "ltv": 0,
        
…(truncated, see openapi.json for full schema)
```

### Best

#### `GET /v1/best` — Top venues to supply (highest APY) or borrow (lowest APY) an asset

**Parameters:**
- `asset` (query, required, string) — Asset symbol Example: `USDC`
- `side` (query, optional, string) — supply | borrow Example: `supply`
- `chain` (query, optional, string) — Filter by chain Example: `Ethereum`
- `limit` (query, optional, string) — Max results (1-100) Example: `10`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/lendingrates-api/v1/best?asset=USDC&side=supply&chain=Ethereum&limit=10"
```

**Response:**
```json
{
    "data": {
        "best": [
            {
                "ltv": 0,
                "chain": "Ethereum",
                "symbol": "USDC",
                "outlier": false,
                "pool_id": "c5b52a38-59e4-481e-9bba-0386b1e8620c",
                "project": "euler-v2",
                "tvl_usd": 0,
                "pool_meta": "EVK Vault eUSDC-47",
                "borrow_apy": 82.2119,
                "borrowable": false,
                "stablecoin": true,
                "supply_apy": 73.9907,
                "utilization": 100,
                "borrow_apy_base": 82.2119,
                "supply_apy_base": 73.9907,
                "total_borrow_usd": 3741101,
                "total_supply_usd": 3741101,
                "borrow_apy_reward": null,
                "supply_apy_reward": null
            },
            {
                "ltv": 0,
                "chain": "Ethereum",
                "symbol": "USDC",
                "outlier": false,
                "pool_id": "a0f1def1-eacd-4b3a-91a1-be9a9c0cbc2c",
                "project": "euler-v2",
                "tvl_usd": 0,
                "pool_meta": "EVK Vault eUSDC-95",
                "borrow_apy": 19.9999,
                "borrowable": false,
                "stablecoin": true,
                "supply_apy": 17.9999,
                "utilization": 100,
                "borrow_apy_base": 19.9999,
                "supply_apy_base": 17.9999,
                "total_borrow_usd": 1395998,
                "
…(truncated, see openapi.json for full schema)
```

### Asset

#### `GET /v1/asset` — One asset summarised across all its lending markets

**Parameters:**
- `asset` (query, required, string) — Asset symbol Example: `USDC`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/lendingrates-api/v1/asset?asset=USDC"
```

**Response:**
```json
{
    "data": {
        "note": "Cross-protocol summary for USDC: where it earns the most (best_supply) and costs the least to borrow (best_borrow), and the spread of rates across all its money markets above min_tvl. Live from DeFiLlama, lightly cached.",
        "asset": "USDC",
        "chains": [
            "Algorand",
            "Aptos",
            "Arbitrum",
            "Avalanche",
            "BSC",
            "Base",
            "Canto",
            "Cronos",
            "Echelon Initia",
            "Ethereum",
            "Etherlink",
            "Hyperliquid L1",
            "Ink",
            "Linea",
            "Mantle",
            "Monad",
            "OP Mainnet",
            "Polygon",
            "Solana",
            "Sonic",
            "Stellar",
            "Sui",
            "ZIGChain"
        ],
        "source": "DeFiLlama yields (pools + lendBorrow)",
        "min_tvl": 1000000,
        "projects": [
            "aave-v3",
            "arcadia-v2",
            "benqi-lending",
            "blend-pools-v2",
            "canto-lending",
            "compound-v3",
            "current",
            "dolomite",
            "echelon-market",
            "euler-v2",
            "exactly",
            "fluid-lending",
            "flux-finance",
            "folks-finance-lending",
            "folks-finance-xchain",
            "gearbox",
            "hyperlend-pooled",
            "kamino-lend",
            "moonwell-lending",
            "navi-lend
…(truncated, see openapi.json for full schema)
```

### Meta

#### `GET /v1/meta` — Service metadata

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

**Response:**
```json
{
    "data": {
        "note": "markets takes asset, chain, project, stablecoin, min_tvl, sort (supply|borrow|utilization|tvl), include_outliers, limit (1-300), offset. best takes asset (required), side (supply|borrow), chain, min_tvl (default 1,000,000), limit. asset takes asset (required), min_tvl (default 1,000,000). meta takes no parameters. APYs are in percent. Ranking surfaces exclude DeFiLlama-flagged outliers and >100% utilisation so the best rate is real and harvestable. A 10-minute protective cache fronts the shared DeFiLlama upstream.",
        "source": "DeFiLlama yields API (yields.llama.fi/pools + /lendBorrow), live, keyless",
        "service": "lendingrates-api",
        "endpoints": {
            "GET /v1/best": "Top venues to supply (highest APY) or borrow (lowest APY) an asset (asset=USDC, side=supply).",
            "GET /v1/meta": "This document.",
            "GET /v1/asset": "One asset summarised across all its markets (asset=USDC).",
            "GET /v1/markets": "Cross-protocol money-market lending table (filter: asset, chain, project, stablecoin, min_tvl; sort)."
        },
        "description": "DeFi lending rates — the supply and borrow APYs of on-chain money markets compared across every major protocol and chain, live from DeFiLlama (no key). markets returns the full money-market table (supply APY, borrow APY, utilisation, LTV, pool size) filterable by asset/chain/project/stablecoin/min_tvl; best returns the top venues to supply (highest APY)
…(truncated, see openapi.json for full schema)
```


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