Market snapshots
This data is included in the following Kaiko packages:
Level 1 & Level 2 Data [Level 1 Tick-Level]
Level 1 & Level 2 Data [Level 2 Aggregations]
Level 1 & Level 2 Data [Level 2 Tick-Level]
Subscriptions with "DeFi Lending & Borrowing" as the market type.
Market snapshots give the state of each market of a lending protocol: available liquidity, total deposited and borrowed, supply and borrow rates, and risk parameters such as loan-to-value and liquidation threshold. Amounts are in token units and in US dollars at the protocol's own oracle price. Read the latest state, the state at any past point, or a series at a regular interval.
Your Kaiko API key. Sent on every request. Never in a query parameter.
Kaiko blockchain code. An unknown chain is a 404 unsupported_blockchain.
{"value":"ethereum"}Pattern: ^[a-z0-9_]+$Kaiko protocol code: aav3 (Aave v3), aav2 (Aave v2), cmpd (Compound v2), cmp3 (Compound v3) or mkr (Maker). An unknown protocol, or one that does not run on blockchain, returns 404 unknown_protocol. aav3 runs on ethereum, polygon, avalanche, arbitrum and optimism; aav2 on ethereum, polygon and avalanche; cmpd, cmp3 and mkr on ethereum. /defi/lending/protocol-summaries lists the protocols of a blockchain.
{"value":"aav3"}Pattern: ^[a-z0-9]{1,16}$Keep the rows whose underlying asset is one of these, comma-separated. Each entry is a token symbol as the rows carry it (weth), or a 0x contract address, which is exact where a symbol can be ambiguous. Matched case-insensitively.
{"value":["weth","0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"]}Keep the reserves of this market, as the rows carry it (aave/v3/weth), exact match. One market in this version: a list parameter, so that a higher maximum later is an additive change. A market with no reserve returns data: []. On MakerDAO, a market is a vault type (maker/v2/eth-a).
{"value":["aave/v3/weth"]}Read the state as of this instant: the last state at or before the last block at or before it. ISO 8601 UTC, millisecond precision. Not with at_block, a window or interval (400). Before the key's entitled history it returns 403, as it does for a key whose history does not cover the last 90 days (a known limit). An at_time at or after the newest block is resolved again on each page: a read paged past its first page may answer a newer block, so send at_block for a read that must stay on one block.
{"value":"2026-09-01T00:00:00.000Z"}Read the state as of this block: the last state at or before it. Not with at_time, a window or interval (400). A block above the newest one served reads the newest.
{"value":23600000}Inclusive start of the window, ISO 8601 UTC. The endpoint documents its precision and its default when omitted; a nanosecond endpoint accepts any precision from seconds to nanoseconds.
2026-09-24T00:00:00.000ZExclusive end of the window, ISO 8601 UTC, at the precision the endpoint documents. Defaults to now. Must be after start_time.
2026-09-25T00:00:00.000ZInclusive first block of a read without interval. Not with start_time (400), nor with interval (400): a grid is a time grid. The exception is a page resumed with after_market_id and after_asset_address, as meta.next_url builds it: it keeps start_time and adds this block, which then alone bounds the start.
{"value":23600000}Exclusive end block of a read without interval: the window stops before it, so it is at least 2 (block 0 is not served). Not with end_time (400), nor with interval (400). The exception is a page resumed with after_market_id and after_asset_address, as meta.next_url builds it: it keeps end_time and adds this block, which then alone bounds the end.
{"value":23600100}Grid step of a market-snapshots read.
1hPossible values: Include the most recent blocks, which are not yet safe from re-organisation. Rows read that way can change or disappear on a later call.
falseExample: {"value":false}Order on the time axis.
descExample: descPossible values: Rows per page. A value above the maximum returns 400, never a silent cap. Endpoints needing other bounds define their own PageSize<Resource>Query.
100Example: {"value":100}Resume point, with after_asset_address: the market_id of the last row served at the first block (or grid time) of the window. Copy it from meta.next_url, which also keeps the window's time bounds, so that the entitlement is checked on the same window as the first page. A time bound and a block bound on one side are accepted with it only. One without the other returns 400. Any market_id a row carries is accepted: it holds the token's own symbol, which can be outside ASCII.
{"value":"aave/v3/weth"}Resume point, with after_market_id: the asset_address of the last row served. Copy it from meta.next_url. One without the other returns 400.
{"value":"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"}Pattern: ^0x[0-9a-fA-F]{40}$Contract version to serve, as a date. Each endpoint serves its newest version released on or before it, so one date pins the whole API. When omitted, the endpoint's oldest version still served is used, so breaking changes only reach clients that raise their date. Append -preview (2027-02-01-preview) to also be served preview versions, which carry no stability promise. A date in the future, or one resolving to a retired version, returns 400 unsupported_api_version. The version served is echoed in meta.api_version, and meta.url and meta.next_url always carry this parameter. No default here on purpose: it differs per endpoint, and the request validator would otherwise fill in one date for all of them.
2026-10-01Pattern: ^\d{4}-\d{2}-\d{2}(-preview)?$One page of LendingMarketSnapshot rows.
One page of LendingMarketSnapshot rows.
Invalid parameter, window or API version.
Missing or unknown X-Api-Key.
The key is valid but not entitled to this product, instrument or history depth.
The blockchain is not a Kaiko EVM chain, or no served lending protocol runs on it (unsupported_blockchain), or the protocol is unknown or does not run on blockchain (unknown_protocol).
The Accept header excludes application/json.
Rate limited. Retry after the delay in Retry-After.
Unexpected server failure.
A dependency is down or the data is not available yet.
GET /defi/lending/market-snapshots?blockchain=text&protocol=text HTTP/1.1
Host: api.kaiko.io
X-Api-Key: YOUR_API_KEY
Accept: */*
{
"data": [
{
"blockchain": "ethereum",
"protocol": "aav3",
"protocol_name": "aave",
"protocol_version": "v3",
"market_id": "aave/v3/weth",
"block_number": 23600000,
"timestamp": "2025-10-17T21:15:23.000Z",
"asset_symbol": "weth",
"asset_address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"asset_decimals": 18,
"receipt_symbol": "aethweth",
"receipt_address": "0x4d5f47fa6a74757f35c14fd3a6ef8e3c9bc514e8",
"receipt_decimals": 18,
"available_liquidity": "322870.3486626485",
"total_liquidity": "2414324.7352540493",
"total_borrowed": "2091454.3865914007",
"supply_rate": "0.01802638600213026",
"stable_borrow_rate": "0",
"variable_borrow_rate": "0.02448151191758982",
"loan_to_value_ratio": "0.805",
"liquidation_threshold_ratio": "0.83",
"liquidation_bonus_ratio": "1.05",
"reserve_factor_ratio": "0.15",
"is_active": true,
"is_frozen": false,
"available_liquidity_usd": "1246864482.312522",
"total_liquidity_usd": "9323667452.35627",
"total_borrowed_usd": "8076802970.043747",
"total_collateral_usd": "9283991434.281538",
"cumulative_liquidations_usd": "605034919.1236215",
"liquidity_index": "1.0542729601582734",
"variable_borrow_index": "1.0817425396615202",
"borrowing_enabled": true,
"usage_as_collateral_enabled": true,
"emode_category_id": 1,
"metadata": {
"observed_block_number": 23599995,
"stable_borrow_rate_enabled": false
}
}
],
"meta": {
"api_version": "2026-10-01",
"url": "https://api.kaiko.io/defi/lending/market-snapshots?blockchain=ethereum&protocol=aav3&assets=weth&at_block=23600000&page_size=1&api_version=2026-10-01",
"count": 1,
"next_url": null
}
}Last updated
Was this helpful?
