Lending Rates

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

ParameterRequiredDescriptionExample

blockchain

No

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

arbitrum

protocol

Yes

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

sush

asset

No

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

weth

live

No

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

true

block_number

No

Block height.

10795593

start_block

No

Starting block height (inclusive).

129870

end_block

No

Ending block height (inclusive).

130000

start_time

No

Starting time in ISO 8601 (inclusive).

2022-04-01T00:00:00.000Z

end_time

No

Ending time in ISO 8601 (inclusive).

2022-05-01T00:00:00.000Z

interval

No

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

No

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

ascending

page_size

No

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

1000

Fields

FieldDescriptionExample

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

FieldDescriptionExample

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

FieldDescriptionExample

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

FieldDescriptionExample

total_reserves

Total liquidity - All of the debt tokens supply.

3486037.365878

Cream

FieldDescriptionExample

total_reserves

Total liquidity - All of the debt tokens supply.

033661.402437

Maker

FieldDescriptionExample

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"

Response example

{
  "query": {
        "block_number": "*",
        "blockchain": "*",
        "asset": "usdt",
        "start_time": "*",
        "end_time": "*",
        "interval": "*",
        "protocol": "aav1",
        "sort": "descending",
        "page_size": "100",
        "start_block": "*",
        "end_block": "*"
    },
    "time": "2023-04-04T14:20:50.387Z",
    "timestamp": 1680618050,
    "data":
    [
        {
            "blockchain": "ethereum",
            "block_number": 16974429,
            "datetime": 1680597815,
            "protocol": "aav1",
            "asset_symbol": "usdt",
            "asset_address": "0xdac17f958d2ee523a2206206994597c13d831ec7",
            "asset_decimals": 6,
            "receipt_symbol": "ausdt",
            "receipt_address": "0x71fc860f7d3a592a4a98740e39db31d25db65ae8",
            "receipt_decimals": 6,
            "total_liquidity": 1486161.683036,
            "available_liquidity": 1279626.811227,
            "total_borrowed": 206534.871809,
            "supply_rate": 0.0028918593043333676,
            "stable_borrow_rate": 0.04426480046626246,
            "variable_borrow_rate": 0.0208089338773062,
            "metadata":
            {
                "total_borrowed_stable": "0",
                "total_borrowed_variable": "206534.871809"
            }
        }
        /* ... */
    ],
    "continuation_token": "xxx",
    "next_url": "https://eu.market-api.kaiko.io/v2/data/lending.v1/snapshots?continuation_token=xxx"
}

Last updated