# The risk configuration of a lending protocol's markets

[Open the Aave v3 pool on its entity page →](https://tracefast.xyz/entity/0x87870bca3f3fd6335c3f4ce8392d69350b4fa4e2)

The configuration of every asset of a lending protocol's markets (or of one, with `asset`), as its last configuration events set it (or its initialization did): loan-to-value, liquidation threshold, reserve factor and liquidation protocol fee (basis points), the liquidation bonus (basis points over the debt repaid: 500 = 5 %), supply and borrow caps (whole tokens; absent = no cap), whether the asset is active, frozen or paused, its price oracle, and the contracts of its receipt and debt tokens and its rate strategy. `coveredMarkets` names the markets TraceFast reads (Aave V3's main Ethereum market today); `protocol` must be one of them. A value is absent when the asset's initialization is not in the history TraceFast reads.

```
GET https://tracefast.xyz/api/v1/chains/1/lending/{protocol}/config
```

| Parameter | In | Type | Notes |
|---|---|---|---|
| `protocol` | path | string | A covered protocol, for example `aave_v3`; another value is refused (`protocol_invalid`) with the covered list. |
| `asset` | query | string, optional | Only this asset (`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_lending_market_config` 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`, Aave v3, USDC. Lists in the example are cut to two entries.

```json
{
  "data": {
    "chainId": 1,
    "protocol": "aave_v3",
    "coveredMarkets": [
      {
        "protocol": "aave_v3",
        "pool": "0x87870bca3f3fd6335c3f4ce8392d69350b4fa4e2"
      }
    ],
    "assets": [
      {
        "asset": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
        "pool": "0x87870bca3f3fd6335c3f4ce8392d69350b4fa4e2",
        "ltvBps": 0,
        "liquidationThresholdBps": 7800,
        "liquidationBonusBps": 450,
        "reserveFactorBps": 1000,
        "liquidationProtocolFeeBps": 2000,
        "supplyCapTokens": "3500000000",
        "borrowCapTokens": "2950000000",
        "active": true,
        "frozen": false,
        "paused": false,
        "priceOracle": "0x3f73f03aa83b2a48ed27e964ed0fdb590332095b",
        "receiptToken": "0x98c23e9d8f34fefb1b7bd6a91b7ff122f4e16f5c",
        "variableDebtToken": "0x72e95b8931767c79ba4eee721354d6e99a61d004",
        "stableDebtToken": "0xb0fe3d292f4bd50de902ba5bdf120ad66e9d7a39",
        "rateStrategy": "0xd6293edbb2e5e0687a79f01becd51a778d59d1c5",
        "lastChangeBlock": 26394605
      }
    ]
  },
  "meta": {
    "chain": "ethereum",
    "timestamp": 1794918362394,
    "cached": true,
    "asOfBlock": 26434606,
    "docs": "https://docs.tracefast.xyz/api/lending-config"
  }
}
```

### `data`

| Field | Meaning |
|---|---|
| `assets` | The configuration of each asset of the covered markets. |
| `chainId` | Chain id. `1` is Ethereum mainnet. |
| `coveredMarkets` | The protocol's markets TraceFast reads. |
| `protocol` | The protocol and its version, as one id (for example `aave_v3`). |

### `data.assets[]`

| Field | Meaning |
|---|---|
| `active` | `true` when the asset is active in the market. Absent when not known. |
| `asset` | The asset, lowercase and `0x`-prefixed. |
| `borrowCapTokens` | Borrow cap in WHOLE tokens (a decimal string), as the protocol sets it. Absent when there is no cap. |
| `frozen` | `true` when the asset is frozen: no new supply or borrowing. Absent when not known. |
| `lastChangeBlock` | The block of the asset's last configuration event. |
| `liquidationBonusBps` | Liquidation bonus, basis points over the debt repaid (500 = 5 %). Absent when not set. |
| `liquidationProtocolFeeBps` | The protocol's share of the liquidation bonus, basis points. Absent when not set. |
| `liquidationThresholdBps` | Liquidation threshold, basis points. Absent when not set. |
| `ltvBps` | Loan-to-value, basis points (7500 = 75 %). Absent when not set. |
| `marketId` | The market's own id, for protocols that run several markets in one pool. Absent otherwise. |
| `paused` | `true` when the asset is paused: no actions at all. Absent when not known. |
| `pool` | The market's pool contract, lowercase and `0x`-prefixed. |
| `priceOracle` | The asset's price source in the protocol's oracle. |
| `rateStrategy` | The interest rate strategy contract, lowercase and `0x`-prefixed. Absent when not known. |
| `receiptToken` | The receipt token suppliers get, lowercase and `0x`-prefixed. Absent when not known. |
| `reserveFactorBps` | Reserve factor — the share of interest kept by the protocol — basis points. Absent when not set. |
| `stableDebtToken` | The stable-rate debt token, lowercase and `0x`-prefixed. Absent when not known. |
| `supplyCapTokens` | Supply cap in WHOLE tokens (a decimal string), as the protocol sets it. Absent when there is no cap. |
| `variableDebtToken` | The variable-rate debt token, lowercase and `0x`-prefixed. Absent when not known. |

### `data.coveredMarkets[]`

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

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

## Errors

| Status | When |
|---|---|
| 400 | `bad_request`: `protocol_invalid`, `address_invalid` (`asset`), 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 markets](/api/token-lending-markets)
* [All API methods](/api/methods) — every method on one page
* [Conventions](/api/conventions) — requests, responses, errors and pagination
