Skip to main content

Rate-at-depth (rate vs borrow/supply amount)

GET 

/v1/data/lending/irm/depth

Return rate-at-depth data — the amount-axis complement of /v1/data/lending/irm (rate vs utilization).

Two shapes, both optional:

  • grid (default): a borrow/supply sweep from 0 to the fillable ceiling — for charts. Disable with grid=false.
  • rateAtAmount: pass amount(s) (token units) and/or amount(s)Usd (USD) to get the rate + resulting utilization + fillable ceiling at each specific size — the answer to "what rate to borrow X".

For a utilization pool the whole balance re-prices to one rate, so rateAtAmount is the marginal spot rate at the post-action utilization (marginal == average). Order-book venues (Midnight) fill best-first, so their rateAtAmount is a volume-weighted average over the consumed ladder. Lista's brokered borrow leg is a flat fixed rate up to capacity. Rates are APR %.

Caching: computed grids/points cached server-side for 1 hour (keyed by UIDs + side + points + amounts).

Plain-text reference — GET /v1/data/lending/irm/depth

Parameters

ParameterInTypeRequiredDescription
marketUidsquerystringyesComma-separated market UIDs, e.g. GEARBOX_V3_0x…:9745:0x…
sidequerystringnoborrow | supply | both (default borrow)
dataPointsqueryintegernoSamples per grid (1–60, default 24)
amountsquerystringnoComma-separated sizes in TOKEN units → adds rateAtAmount[]. amount is accepted as a singular alias.
amountsUsdquerystringnoComma-separated sizes in USD (converted per market via its price). amountUsd alias accepted.
gridquerystringnoSet false to drop the 0→max grid sweep (points-only).

Response 200

FieldTypeDescription
successTrue
dataobjectInformational payload. null when the endpoint only builds calldata.
data.countintegerNumber of entries in items.
data.itemsobject[]The result set for this response.
data.items[].marketUidstringMarket identifier, formatted lender:chainId:address.
data.items[].protocolstring
data.items[].lenderKeystring
data.items[].chainIdstringEVM chain id, as a decimal string. See the ChainId schema.
data.items[].underlyingAddressstring
data.items[].utilizationnumberCurrent utilization (0–1)
data.items[].variableBorrowRatenumberCurrent 0-notional borrow APR %
data.items[].borrowobjectRate-vs-amount sweep from size 0 to fillable.
data.items[].borrow.sideborrow, supply
data.items[].borrow.currentUtilizationnumber
data.items[].borrow.currentBorrowAprPctnumber
data.items[].borrow.currentDepositAprPctnumber
data.items[].borrow.fillablenumberLargest size sampled — the depth ceiling (token units).
data.items[].borrow.fillableUsdnumber
data.items[].borrow.pointsobject[]
data.items[].supplyobjectRate-vs-amount sweep from size 0 to fillable.
data.items[].supply.sideborrow, supply
data.items[].supply.currentUtilizationnumber
data.items[].supply.currentBorrowAprPctnumber
data.items[].supply.currentDepositAprPctnumber
data.items[].supply.fillablenumberLargest size sampled — the depth ceiling (token units).
data.items[].supply.fillableUsdnumber
data.items[].supply.pointsobject[]
data.items[].rateAtAmountobject[]Rate + fillable at each requested size (present only when amount(s)/amount(s)Usd is passed).
data.items[].rateAtAmount[].sideborrow, supply
data.items[].rateAtAmount[].sizenumberRequested size (token units)
data.items[].rateAtAmount[].amountUsdnumber
data.items[].rateAtAmount[].utilizationnumberPost-action utilization (0 for order books)
data.items[].rateAtAmount[].borrowAprPctnumber
data.items[].rateAtAmount[].depositAprPctnumber
data.items[].rateAtAmount[].fillablenumberMax borrowable/suppliable before a cap binds (token units)
data.items[].rateAtAmount[].cappedbooleanTrue when size exceeds fillable — rate is reported at the ceiling.
actionsnull

Example response

{
"success": true,
"data": {
"count": 1,
"items": [
{
"marketUid": "AAVE_V3:1:0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
"protocol": "string",
"lenderKey": "AAVE_V3",
"chainId": "1",
"underlyingAddress": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
"utilization": 1.0,
"variableBorrowRate": 1.0,
"borrow": {
"side": "borrow",
"currentUtilization": 1.0,
"currentBorrowAprPct": 1.0,
"currentDepositAprPct": 1.0,
"fillable": 1.0,
"fillableUsd": 1.0,
"points": [
{
"size": 1.0,
"sizeUsd": 1.0,
"utilization": 1.0,
"borrowAprPct": 1.0,
"depositAprPct": 1.0
}
]
},
"supply": {
"side": "borrow",
"currentUtilization": 1.0,
"currentBorrowAprPct": 1.0,
"currentDepositAprPct": 1.0,
"fillable": 1.0,
"fillableUsd": 1.0,
"points": [
{
"size": 1.0,
"sizeUsd": 1.0,
"utilization": 1.0,
"borrowAprPct": 1.0,
"depositAprPct": 1.0
}
]
},
"rateAtAmount": [
{
"side": "borrow",
"size": 1.0,
"amountUsd": 1.0,
"utilization": 1.0,
"borrowAprPct": 1.0,
"depositAprPct": 1.0,
"fillable": 1.0,
"capped": true
}
]
}
]
}
}

Request

Responses

Depth grids and/or rate-at-amount points per market