# The lending markets of a token

[Open the token on its entity page →](https://tracefast.xyz/entity/0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48)

The lending markets where the token is listed, one per market: its roles there (it can be supplied, borrowed, or used as collateral), the amounts supplied and borrowed (raw units, and in USD at the protocol's oracle price), the supply and borrow rates, the risk parameters (loan-to-value and liquidation threshold in basis points, and the liquidation bonus in basis points over the debt repaid: 500 = 5 %), the supply and borrow caps and how much of them is used, and whether the market is active, frozen or paused. `coveredMarkets` names the markets TraceFast reads (Aave V3's main Ethereum market today): an empty `markets` means the token is not listed on those, never that it is not lendable anywhere. The amounts are as of `meta.asOfBlock` and use the market's interest index of its last rate update: on a quiet market the interest accrued since then is not in them. `lastEventBlock` is the market's latest configuration, rate or supply event. A cap that is absent means no cap. A cap lowered below the amount already supplied (how a market stops new deposits) reads above 100 % used. A value TraceFast cannot derive is absent (the borrowed amount of GHO).

```
GET https://tracefast.xyz/api/v1/chains/1/tokens/{token}/lending-markets
```

| Parameter | In | Type | Notes |
|---|---|---|---|
| `token` | path | string | The token contract, `0x` + 40 hex. |

**Access** — an [API key](/api/authentication) on the **Intelligence** plan or higher ([plans](/api/authentication#plans)), or no key at all: pay per call with [x402](/api/x402) at the same path on `https://mpp.tracefast.xyz/api/v1`, at the price its `402` states. As a tool for AI agents: `get_token_lending_markets` on the [MCP server](/api/mcp-server). **Stable** — see [stability](/api/conventions#stability).

`chains/1` is a literal: other chain ids answer `404 chain_not_supported`. An unknown query parameter is refused rather than ignored.

## Response

`200 application/json`, USDC. Lists in the example are cut to two entries.

```json
{
  "data": {
    "chainId": 1,
    "token": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
    "coveredMarkets": [
      {
        "protocol": "aave_v3",
        "pool": "0x87870bca3f3fd6335c3f4ce8392d69350b4fa4e2"
      }
    ],
    "markets": [
      {
        "protocol": "aave_v3",
        "pool": "0x87870bca3f3fd6335c3f4ce8392d69350b4fa4e2",
        "symbol": "USDC",
        "decimals": 6,
        "roles": [
          "borrow",
          "supply"
        ],
        "suppliedRaw": "2776262625881841",
        "borrowedRaw": "2617075001361901",
        "suppliedUsd": 2776262625.881841,
        "borrowedUsd": 2617075001.361901,
        "supplyApy": 0.041936705985792994,
        "borrowApy": 0.049430776571888074,
        "ltvBps": 0,
        "liquidationThresholdBps": 7800,
        "liquidationBonusBps": 450,
        "supplyCapRaw": "3500000000000000",
        "borrowCapRaw": "2950000000000000",
        "supplyCapUsedPct": 79.32178931090974,
        "borrowCapUsedPct": 88.71440682582715,
        "active": true,
        "frozen": false,
        "paused": false,
        "priceUsd": 0.99975154,
        "priceOracle": "0x3f73f03aa83b2a48ed27e964ed0fdb590332095b",
        "lastEventBlock": 26434605
      }
    ]
  },
  "meta": {
    "chain": "ethereum",
    "timestamp": 1794918383924,
    "cached": false,
    "asOfBlock": 26434606,
    "docs": "https://docs.tracefast.xyz/api/token-lending-markets"
  }
}
```

### `data`

| Field | Meaning |
|---|---|
| `chainId` | Chain id. `1` is Ethereum mainnet. |
| `coveredMarkets` | The markets TraceFast reads; `markets` is empty when the token is listed on none of them. |
| `markets` | The token's markets in the covered markets; empty when it is listed on none of them. |
| `token` | The token, lowercase and `0x`-prefixed. |

### `data.coveredMarkets[]`

| Field | Meaning |
|---|---|
| `pool` | The market's pool contract. |
| `protocol` | The protocol and its version, as one id (for example `aave_v3`). |

### `data.markets[]`

| Field | Meaning |
|---|---|
| `active` | `true` when the market is active. Absent when not known. |
| `borrowApy` | Variable borrow rate, as a yearly fraction (0.0145 = 1.45 %). Absent when not known. |
| `borrowCapRaw` | Borrow cap, raw units as a decimal string. Absent when there is no cap. |
| `borrowCapUsedPct` | How much of the borrow cap is used, percent. Above 100 when the cap was lowered below what is already borrowed. Absent when not stated. |
| `borrowedRaw` | Amount borrowed from the market, raw units as a decimal string. Absent when TraceFast cannot derive it. |
| `borrowedUsd` | `borrowedRaw` in USD at `priceUsd`. Absent when TraceFast cannot derive it. |
| `decimals` | The decimals the token contract declares. Divide a `…Raw` amount by `10^decimals` for whole tokens. |
| `frozen` | `true` when the market is frozen: no new supply or borrowing. Absent when not known. |
| `lastEventBlock` | The block of the market's latest configuration, rate or supply event. |
| `liquidationBonusBps` | Liquidation bonus, basis points over the debt repaid (500 = 5 %). Absent when not known. |
| `liquidationThresholdBps` | Liquidation threshold, basis points. Absent when not known. |
| `ltvBps` | Loan-to-value, basis points (7500 = 75 %). Absent when not known. |
| `marketId` | The market's own id, for protocols that run several markets in one pool. |
| `paused` | `true` when the market is paused: no actions at all. Absent when not known. |
| `pool` | The market's pool contract. |
| `priceOracle` | The oracle contract that price comes from, lowercase and `0x`-prefixed. Absent when not known. |
| `priceUsd` | The token's USD price from the protocol's own oracle. Absent when not known. |
| `protocol` | The protocol and its version, as one id (for example `aave_v3`). |
| `roles` | What the token can be in this market: `supply`, `borrow`, `collateral`. |
| `suppliedRaw` | Amount supplied to the market, raw units as a decimal string. Absent when TraceFast cannot derive it. |
| `suppliedUsd` | `suppliedRaw` in USD at `priceUsd`. Absent when TraceFast cannot derive it. |
| `supplyApy` | Supply rate, as a yearly fraction (0.0145 = 1.45 %). Absent when not known. |
| `supplyCapRaw` | Supply cap, raw units as a decimal string. Absent when there is no cap. |
| `supplyCapUsedPct` | How much of the supply cap is used, percent. Above 100 when the cap was lowered below what is already supplied. Absent when not stated. |
| `symbol` | The symbol the token contract declares (verbatim, not verified). Absent when it is longer than 64 characters. |

`meta` is the same envelope on every method — see [conventions](/api/conventions#meta).

## Errors

| Status | When |
|---|---|
| 400 | `bad_request`: `address_invalid`, an unknown query parameter |
| 404 | `chain_not_supported`, or an unknown path |
| 503 | `service_unavailable`: the markets are temporarily unavailable; or `service_degraded`: who is calling could not be established right now; retry after `Retry-After`. |

Malformed input, unknown parameters and the key check's `401`/`403`/`429`/`503` are the same for every method — see [conventions](/api/conventions#errors) and [API keys](/api/authentication#when-a-key-is-refused).

## Related pages

* [Lending risk configuration](/api/lending-config)
* [All API methods](/api/methods) — every method on one page
* [Conventions](/api/conventions) — requests, responses, errors and pagination
