get https://api.amberdata.com/defi/lending/wallets//returns
Analyze a wallet's historical yield, net worth and interest owed from lending and borrowing assets across different DeFi protocols.
Supported Protocols
We aggregate metrics across the following protocols
- aavev2
- aavev3
- makerdao (coming soon)
- compoundv2
- compoundv3
Not specifying startDate and endDate
If the startDate and endDate query parameters are not provided, the API will return the data from the previous 93 days (3 months).
Time Range Limit
The maximum time range (difference between endDate and startDate) is 93 days.
Potential Use-Cases
You can use the aggregate data to analyze yield and investment performance of the wallet.
Sample Visualization
The responses from this endpoint can be visualized like this
Response Data
The table below described properties that are found under payload
in the response.
Field | Type | Description |
---|---|---|
metadata.blockchainId | string | Human readable name of the blockchain the metrics are aggregated from. |
data.metrics[index].timestamp | number | string | The timestamp indicating the end of the day. |
data.metrics[index].totalLiquidityUSD | number | The US dollar value of the assets locked across multiple protocol smart contracts at the end of this day. |
data.metrics[index].totalCollateralUSD | number | The US dollar value of the assets that can be used as collateral across protocols at the end of this day. |
data.metrics[index].totalBorrowedUSD | number | The US dollar value of the currently borrowed assets across protocols at the end of this day. |
data.metrics[index].netWorthUSD | number | The net worth of the wallet at the end of this day i.e. liquidity minus borrows. |
data.metrics[index].changeInLendInterestUSD | number | The change in value of the cumulative lend interest across multiple protocols, day to day as measured in US dollars. |
data.metrics[index].changeInBorrowInterestUSD | number | The change in value of the cumulative borrow interest across multiple protocols, day to day as measured in US dollars. |
data.metrics[index].marketValueLendInterestUSD | number | The US dollar value of intra-day lend interest across multiple protocols. |
data.metrics[index].marketValueBorrowInterestUSD | number | The US dollar value of intra-day borrow interest across multiple protocols. |
data.metrics[index].cumulativeLendInterestUSD | number | The lend interest accumulated for the given wallet from the beginning of time, across multiple assets, multiple protocols and all opened and closed positions, as measured in US dollars. |
data.metrics[index].cumulativeBorrowInterestUSD | number | The borrow interest accumulated for the given wallet from the beginning of time, across multiple assets, multiple protocols and all open and closed positions, as measured in US dollars. |
data.metrics[index].netWorthInProtocols | object[] | Each object in this array has the properties described above, but specific to each protocol that the wallet is active in during the timestamp . |