Interest rates, borrowed and deposited amounts

What is this endpoint for?

This endpoint provides information about lending pools. It shows data such as how many tokens has been deposited and borrowed, as well as the interest rates for lending and borrowing at each block.

Endpoint

https://eu.market-api.kaiko.io/v2/data/lending.v1/snapshots

Parameters

Parameter
Mandatory?
Description
Example

blockchain

One or several of the currently supported blockchain. Default: ethereum.

ethereum

protocol

One or several of the currently supported L&B protocols.

aav1

asset

L&B events including the requested token. Default: all available tokens.

tusd

live

Shows the data as soon as the block is validated. (Default: false, in case of block reorganization).

true

block_number

Block height.

10795593

start_block

Starting block height (inclusive).

129870

end_block

Ending block height (inclusive).

130000

start_time

Starting time in ISO 8601 (inclusive).

2022-04-01T00:00:00.000Z

end_time

Ending time in ISO 8601 (inclusive).

2022-05-01T00:00:00.000Z

interval

Interval between each snapshot. The suffixes are s (second), m (minute), h (hour), d (day), b (block), change (whenever a change happens). Default: 1b.

152s

sort

Returns the data in ascending or descending order. Default: desc.

ascending

page_size

Number of snapshots to return data for. (default: 100, min: 1, max: 1000). See Pagination

1000

Fields

Field
Description
Example

blockchain

The blockchain on which the transaction happened.

ethereum

block_number

The height of the block in which the transaction happened.

16025918

datetime

The timestamp of the block in which the transaction happened.

1669124591

protocol

Code of the L&B protocol.

aave/v2

asset_symbol

Symbol of the underlying asset.

crv

asset_address

Address of the underlying asset.

0xd533a949740bb3306d119cc777fa900ba034cd52

asset_decimals

Decimals of the underlying asset.

18

receipt_symbol

Symbol of the receipt asset.

acrv

receipt_address

Address of the receipt asset.

0x8dae6cb04688c62d939ed9b68d32bc62e49970b1

receipt_decimals

Decimals of the receipt asset.

18

total_liquidity

The total amount of liquidity for this pool.

1486160

available_liquidity

The total amount of available liquidity for this pool.

1279630

total_borrowed

The total amount of tokens borrowed for this pool.

206535

supply_rate

The supply rate.

0.00289186

stable_borrow_rate

The stable borrow rate.

0.0442648

variable_borrow_rate

The variable borrow rate.

0.0208089

metadata

Metadata specific to each protocol.

More information below

Metadata information

AAVE v1

Field
Description
Example

total_borrowed_stable

The total amount of assets borrowed with a stable rate for this pool.

0

total_borrowed_variable

The total amount of assets borrowed with a variable rate for this pool.

41872.928778

AAVE v2

Field
Description
Example

total_borrowed_stable

The total amount of assets borrowed with a stable rate for this pool.

4162389.524515

total_borrowed_variable

The total amount of assets borrowed with a variable rate for this pool.

345075360.304631

total_reserves

Total liquidity - All of the debt tokens supply.

51387128.92415

Compound

Field
Description
Example

total_reserves

Total liquidity - All of the debt tokens supply.

3486037.365878

Cream

Field
Description
Example

total_reserves

Total liquidity - All of the debt tokens supply.

033661.402437

Maker

Field
Description
Example

collateral_ratio

Minimum ratio of collateral before liquidation.

1.5

debt_ceiling

Maximum amount of DAI that can be emitted on this type of vault.

2500000

debt_floor

Minimum amount of DAI that can be minted for this type of Vault.

2000

Request example

curl --compressed \
  -H 'Accept: application/json' \
  -H 'X-Api-Key: <client-api-key>' \
  'https://eu.market-api.kaiko.io/v2/data/lending.v1/snapshots?protocol=aav1&asset=tusd'

Response example

{
            "blockchain": "ethereum",
            "block_number": "21093894",
            "datetime": 1730477315,
            "market_id": "aave/v1/tusd",
            "protocol": "aav1",
            "asset_symbol": "tusd",
            "asset_address": "0x0000000000085d4780b73119b644ae5ecd22b376",
            "asset_decimals": "18",
            "receipt_symbol": "atusd",
            "receipt_address": "0x4da9b813057d04baef4e5800e36083717b4a0341",
            "receipt_decimals": "18",
            "available_liquidity": 293515.77258708066,
            "total_borrowed": 10897.083558481298,
            "total_liquidity": 304412.85614556196,
            "supply_rate": 0,
            "stable_borrow_rate": 0,
            "variable_borrow_rate": 0,
            "metadata": {
                "total_borrowed_stable": "0",
                "total_borrowed_variable": "10897.083558481297049061"
            }
        },

Last updated