This API provides aggregated insights into the asset markets across various lending protocols.
Protocols Supported
This endpoint supports Aave v2, Aave v3, MakerDAO and Compound v2 on Ethereum and L2s except for Polygon.
Not specifying startDate and endDate
If the startDate and endDate query parameters are not provided, the API will return the data from the previous 180 days (6 months).
Time Range Limit
The maximum duration between endDate and startDate is 366 days (1 year).
USDC on MakerDAO
MakerDAO mints DAI with deposited USDC. In MakerDAO all borrowing activity, regardless of collateral is in DAI. Hence all deposited USDC is effectively borrowed and why
totalDepositedUSD
equalstotalBorrowedUSD
.
Asset Market on MakerDAO
In MakerDAO, a single asset,
WETH
can have multiple markets e.g. ETH-A, ETH-B, ETH-C etc. with different interest rates.When calling the endpoint with just the asset like this
/defi/lending/makerdao/assets/WETH/metrics/summary
the endpoint will return the combined aggregates across all the markets for the specified asset.However, you can get the aggregates for an individual market of an asset in MakerDAO with the
market
query parameter like this/defi/lending/makerdao/assets/WETH/metrics/summary?market=ETH-A
.The
market
query parameter is ONLY supported for MakerDAO.
Potential Use-Cases
You can use the aggregate data to analyze the health and activity of an asset on a protocol.
Sample Visualization
The responses from this endpoint can be visualized like this
Response Data
The table below described properties that are found under payload.data
in the response.
Field | Type | Description |
---|---|---|
metrics[index].timestamp | number | string | The timestamp indicating the end of the day. |
metrics[index].totalDepositedUSD | number | The US dollar value of the deposited assets in the protocol at the end of this day. |
metrics[index].totalBorrowedUSD | number | The US dollar value of the borrowed assets in the protocol at the end of this day. |
metrics[index].cumulativeLiquidatedUSD | number | Sum of the liquidated value each day since the protocol's inception. |
metrics[index].intervalDepositedUSD | number | The intra-day US dollar value of deposits. |
metrics[index].intervalWithdrawnUSD | number | The intra-day US dollar value of withdraws. |
metrics[index].intervalRepaidUSD | number | The intra-day US dollar value of repayments. |
metrics[index].intervalBorrowedUSD | number | The intra-day US dollar value of borrows. |
metrics[index].intervalLiquidatedUSD | number | The intra-day US dollar value of liquidation calls. |
metrics[index].intervalFlashLoanedUSD | number | The intra-day US dollar value of flash loans. |