This API retrieves information about all of the actions that occurred on the protocol within a certain timespan.
Time Range Limit
The maximum time range (difference between endDate and startDate) is 60 days.
Not specifying startDate and endDate
If the startDate and endDate query parameters are not provided, the API will return the data from the previous 24 hours.
RESPONSE DATA
Field | Type | Description |
---|---|---|
action | string | The human readable name of the event |
timestamp | string | number | The timestamp of the event |
blockNumber | number | The block number where the event happened |
transactionHash | string | The transaction hash of the event |
logIndex | number | The index of the log of the event |
marketId | string | A unique identifier for the "venue" of the lending protocol in which the transaction occurs. Example: MakerDAO has different markets for WETH with different interest rates. Example: For Aave, market denotes the blockchain the protocol is deployed on. |
market | string | The human readable name of the market. |
assetId | string | The smart contract address of the asset involved in this action. |
assetSymbol | string | The human readable abbreviated name of the asset. |
amountNative | number | The amount of assetSymbol in native units adjusted for its decimals. |
amountUSD | number | The US Dollar equivalent of amountNative |
account | string | The EOA that triggered this action. |
caller | string | The calling address for the loan |
liquidator | string | The EOA that triggered the liquidation. |
liquidatee | string | The EOA that is being liquidated. |
collateralAssetSymbol | string | The human readable abbreviated name of the asset that was collateral for borrowing. |
collateralAssetId | string | The smart contract address of the collateral. |
collateralAmountNative | number | The amount of collateralAssetSymbol in native units adjusted for its decimals. |
collateralAmountUSD | number | The US Dollar equivalent of collateralAmountNative . |
principalAssetId | string | The smart contract address of the asset that was borrowed. |
principalAssetSymbol | string | The human readable abbreviated name of the asset that was borrowed. |
principalAmountNative | number | The amount of principalAssetSymbol in native units. |
principalAmountUSD | number | The US Dollar equivalent of principalAmountNative . |
profitUSD | number | The net earning for the liquidator . |
totalFee | number | The fee for the FlashLoan . |
target | string | The recipient of the loan |
initiator | string | The initiator of the loan |
lpFee | number | The liquidity pool fee |
protocolFee | number | The protocol fee for the FlashLoan |
reserve.liquidityRate | number | only for AAVEV2/V3 The current annualized interest rate (APY) depositors are earning on their provided liquidity |
reserve.stableBorrowRate | number | only for AAVEV2/V3 The current annualized interest rate (APY) for borrowers who have opted for a stable borrowing rate |
reserve.variableBorrowRate | number | only for AAVEV2/V3 The current annualized interest rate (APY) for borrowers who have chosen a variable borrowing rate |
reserve.liquidityIndex | number | only for AAVEV2/V3 Cumulative index for growth of funds in the reserve over time, accounting for accrued interest |
reserve.variableBorrowIndex | number | only for AAVEV2/V3 Cumulative index for growth of the debt for variable rate borrowers overtime, accounting for accrued interest |
reserve.totalDepositsNative | number | only for AAVEV2/V3 The total amount of assets deposited into the reserve, expressed in asset native units (e.g ETH, DAI..) |
reserve.totalDepositsUSD | number | only for AAVEV2/V3 The total value of assets deposited into the reserve, converted to US Dollars |
reserve.totalBorrowsNative | number | only for AAVEV2/V3 The total amount of assets borrowed from the reserve, express in the asset native units (e.g ETH, DAI..) |
reserve.totalBorrowsUSD | number | only for AAVEV2/V3 The total value of assets borrowed from the reserve, converted to US Dollars. |
Understanding Actions in Lending Protocols
There are many different types of actions in lending protocols, as you'll see in the action property for each item of the payload.data
array. The guide below will help you understand the possible actions
Supported Actions Per Protocol
Empty cell indicates no support.
Protocol \ Action Name | Deposit | Withdraw | LiquidationCall | Repay | Borrow | FlashLoan |
---|---|---|---|---|---|---|
aavev2 | X | X | X | X | X | X |
aavev3 | X | X | X | X | X | X |
compoundv2 | X | X | X | X | X | |
makerdao | X | X | X | X | X |
The guide below will help you understand the possible actions.
Deposit
account deposits USDC into the protocol.
amountNative is measured in USDC i.e. the value has been normalized with the decimal count for assetId.
{
"action": "Deposit",
"timestamp": 1689128507000,
"blockNumber": 17674492,
"transactionHash": "0xd44d0066c11ec5865a6b20f06105ce828cc15dc83ef37dc9c3c6de7eff390f5d",
"logIndex": 263,
"assetId": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
"assetSymbol": "USDC",
"marketId": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
"market": "main",
"amountNative": 100,
"amountUSD": 100,
"account": "0x93951dadd4d77d6a12cdfee14ac0343aca45d2ad",
"caller": "0x93951dadd4d77d6a12cdfee14ac0343aca45d2ad"
}
Withdraw
account withdraws WETH from the protocol.
amountNative is measured in WETH i.e. the value has been normalized with the decimal count for assetId.
{
"action": "Withdraw",
"timestamp": 1689128987000,
"blockNumber": 17674531,
"transactionHash": "0x100308c07521fc4812a46caec77f85ef3d24702be3ae5e9ad844a05832f24ae9",
"logIndex": 84,
"assetId": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"assetSymbol": "WETH",
"marketId": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"market": "main",
"amountNative": 0.0433,
"amountUSD": 80.95497900000012,
"account": "0x92f3f71cef740ed5784874b8c70ff87ecdf33588",
"caller": "0x92f3f71cef740ed5784874b8c70ff87ecdf33588"
}
LiquidationCall
liquidator has liquidated liquidatee who had borrowed principalAmount of principalAssetId. The collateral for the borrowed amount was collateralAmount of collateralAssetId.
principalAmountNative is measured in units of BUSD i.e. the value has been normalized with the decimal count for principalAssetId.
collateralAmountNative is measured in units of USDC i.e. the value has been normalized with the decimal count for collateralAssetId.
The liquidator has earned profitUSD for executing the liquidation.
{
"action": "LiquidationCall",
"timestamp": 1673020451000,
"blockNumber": 16348765,
"transactionHash": "0xbdfae81eb2896a0b1ea6a3b7cce2b66cbefa956f88eafc06fbc178568e4d03e1",
"logIndex": 212,
"collateralAssetId": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
"collateralAssetSymbol": "USDC",
"collateralAmountNative": 296.289055,
"collateralAmountUSD": 296.289055,
"profitUSD": 13.333007475,
"principalAssetId": "0x4fabb145d64652a948d72533023f6e7a623c7c53",
"principalAssetSymbol": "BUSD",
"principalAmountNative": 280.97104052604817,
"principalAmountUSD": 283.5301970786792,
"marketId": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
"market": "main",
"liquidatee": "0xfcef201852e477b10846aa3f5b06a2c974e54fc8",
"liquidator": "0x170567524b6906c44563b0fe0a027f5d1ddd115f"
}
Repay
account repays borrowed WETH back to the protocol.
amountNative is measured in WETH i.e. the value has been normalized with the decimal count for assetId.
{
"action": "Repay",
"timestamp": 1689129287000,
"blockNumber": 17674556,
"transactionHash": "0x649c40321f8ccc663232b225bc6d1cddd5f21bb4ada27912ca404e72df98f09f",
"logIndex": 721,
"assetId": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"assetSymbol": "WETH",
"marketId": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"market": "main",
"amountNative": 0.2144,
"amountUSD": 400.8486720000006,
"account": "0xc37704a457b1ee87eb657cae584a34961e86acac",
"repayer": "0xeffc18fc3b7eb8e676dac549e0c693ad50d1ce31"
}
Borrow
account has borrowed WBTC from the protocol.
amountNative is measured in WBTC i.e. the value has been normalized with the decimal count for assetId.
This borrowed amount has a Variable interest rate as seen in borrowRateMode.
{
"action": "Borrow",
"timestamp": 1689128615000,
"blockNumber": 17674501,
"transactionHash": "0x091a73aab6fb14761328e26f777e93306390f28ce233f478dff37f385a75ae4c",
"logIndex": 286,
"assetId": "0x2260fac5e5542a773aa44fbcfedf7c193bc2c599",
"assetSymbol": "WBTC",
"marketId": "0x2260fac5e5542a773aa44fbcfedf7c193bc2c599",
"market": "main",
"amountNative": 0.0013238,
"amountUSD": 40.32757844085378,
"borrowRate": 0.007949745857957867,
"borrowRateMode": "Variable",
"account": "0x93951dadd4d77d6a12cdfee14ac0343aca45d2ad",
"caller": "0x93951dadd4d77d6a12cdfee14ac0343aca45d2ad"
}
FlashLoan
{
"action": "FlashLoan",
"timestamp": 1689175643000,
"blockNumber": 17678365,
"transactionHash": "0xdd95c769921a68fe7e9a8a6d44bc66563d4e2e40fe04abb25a33346511186255",
"logIndex": 414,
"assetId": "0x2260fac5e5542a773aa44fbcfedf7c193bc2c599",
"assetSymbol": "WBTC",
"marketId": "0x2260fac5e5542a773aa44fbcfedf7c193bc2c599",
"market": "main",
"amountNative": 4.70028531,
"amountUSD": 144786.10150016678,
"totalFee": 0.00235014,
"lpFee": null,
"protocolFee": null,
"target": "0x872fbcb1b582e8cd0d0dd4327fbfa0b4c2730995",
"initiator": "0x443648884a3b07ab6feb9b0bdc491a2aa16dd5d4"
}
MakerDAO Stability Fee
You can see the Stability Fee for each asset supported by MakerDAO in Information - Assets in Lending Protocols. Use the query parameter protocol=makerdao
and get the value of the property, borrowingRateStable.
Within each Borrow you'll see the Stability Fee described with the properties borrowRate
and borrowRateMode
.