Aavescan API
Fetch live and historical lending data for Aave and the wider DeFi ecosystem including Ethena, Morpho, Compound, Sky and Spark.
[
{
"timestamp": "2024-05-01T00:00:00Z",
"supplyAPR": 0.0342,
"borrowAPR": 0.0279,
"totalSupplied": 48234567.12,
"totalBorrowed": 33561187.42,
"symbol": "USDC"
}
]
10+ endpoints covering live yields, borrow rates, market sizes, oracle prices, interest rate models and historical data stretching back to 2020 DeFi Summer. Precise data sourced directly from onchain.
Endpoints
Live Aave Markets
GET
/v2/reserves/latest
Live lending data for Aave markets. Returns live supply APR, borrow APR, total supplied and total borrowed for every supported Aave market, refreshed every 5 minutes. Low latency available on request.
Example: curl "https://api.aavescan.com/v2/reserves/latest?apiKey=YOUR_KEY"
Live DeFi Ecosystem Markets
GET
/v2/ecosystem/latest
Live data for ecosystem markets. Returns live supply APR, borrow APR, total supplied and total borrowed for ecosystem markets includng Ethena sUSDe, Morpho, Compound, Sky sUSDS and Spark, refreshed every 5 minutes. Low latency available on request.
Example: curl "https://api.aavescan.com/v2/ecosystem/latest?apiKey=YOUR_KEY"
Aave History (hourly snapshots)
GET
/v2/hourly-snapshots/{marketSlug}
Hourly snapshots of Aave market data. Returns 30 days of hourly snapshots including historical rates and market sizes. See response fields for field definitions.
Example: curl "https://api.aavescan.com/v2/hourly-snapshots/aave-v3-ethereum?apiKey=YOUR_KEY"
Aave History (daily snapshots)
GET
/v2/daily-snapshots/{marketSlug}
Daily snapshots for an entire Aave market. Returns one year of daily snapshots for every asset in the market. See response fields for field definitions.
Example: curl "https://api.aavescan.com/v2/daily-snapshots/aave-v3-ethereum?apiKey=YOUR_KEY"
Aave History (entire history)
GET
/v2/csv/?market=&reserveAddress=
Entire history of Aave markets. Returns the entire history of an Aave market with daily snapshots including rates and market sizes from market launch to the present day. Includes liquidity index and borrow index for precise calculation of lending market interest. See response fields for field definitions.
Example: curl "https://api.aavescan.com/v2/csv?market=aave-v3-ethereum&reserveAddress=0xdac17f958d2ee523a2206206994597c13d831ec7&apiKey=YourApiKey"
Ecosystem History (daily snapshots)
GET
/v2/ecosystem/daily-snapshots/{ecosystemSlug}
Historical data for ecosystem markets. One year of daily snapshots including historical rates and market sizes for ecosystem markets including Ethena sUSDe, Morpho, Compound Sky sUSDS and Spark. See response fields for field definitions.
Example: curl "https://api.aavescan.com/v2/ecosystem/daily-snapshots/ethena-susde?apiKey=YOUR_KEY"
Assets
GET
/v2/assets
Provides metadata for every tracked asset. Returns token names, symbols, decimals and contract addresses.
Example: curl "https://api.aavescan.com/v2/assets?apiKey=YOUR_KEY"
Oracle Pricing
GET
/v2/pricing/latest
Latest oracle price for every tracked token. Returns token addresses and their current oracle price, oracle source and update timestamp.
Example: curl "https://api.aavescan.com/v2/pricing/latest?apiKey=YOUR_KEY"
Incentives
GET
/v2/incentives/latest
Incentives for Aave by ACI and Merkl. Returns active supply and borrow incentives including reward APRs, reward tokens and incentive metadata, refreshed hourly. Low latency available on request.
Example: curl "https://api.aavescan.com/v2/incentives/latest?apiKey=YOUR_KEY"
Interest Rate Model
GET
/v2/market-configurations
Interest rate models for Aave markets. Returns slopes and optimal utilization for Aave markets which can be used for liquidity simulations, refreshed hourly. Low latency available on request.
Example: curl "https://api.aavescan.com/v2/market-configurations?apiKey=YOUR_KEY"
Response fields
Hourly and daily snapshot endpoints return a list of snapshots representing the lending market at each timestamp. Snapshots include the following fields:
- reserve: The asset/reserve contract address.
- symbol: Symbol of the underlying asset.
- liquidityIndex: Cumulative depositor index used to calculate historical supply yield between two timestamps. Use the liquidityIndex to calculate a moving average of the supply APR. Learn more.
- currentLiquidityRate: The supply APR at the snapshot timestamp. This field describes the supply rate at a certain point in time. It is recommended to use the liquidityIndex to calculate a moving average for most use cases. Learn more.
- variableBorrowIndex: Cumulative borrow index used to calculate historical variable borrow interest. Use the variableBorrowIndex to calculate a moving average of the borrow APR. Learn more.
- currentVariableBorrowRate: The variable borrow APR at the snapshot timestamp. This field describes the borrow rate at a certain point in time. It is recommended to use the variableBorrowIndex to calculate a moving average for most use cases. Learn more.
- currentStableBorrowRate: The stable borrow APR at the snapshot timestamp.
- totalAToken: Total supplied liquidity denominated in the underlying asset. Multiply by the asset price to get the total USD value of supplied assets.
- totalStableDebt: Total outstanding stable rate debt denominated in the underlying asset.
- totalVariableDebt: Total outstanding variable rate debt denominated in the underlying asset. Multiply debt by the asset price to get the total USD value of borrows.
- price: The USD oracle price for the asset at the snapshot timestamp.
You can derive total USD values directly from these fields:
-
Total supplied USD:
totalAToken * price -
Total borrowed USD:
(totalStableDebt + totalVariableDebt) * price
Send an email to contact@aavescan.com for any assistance.
API key
API keys are included with the Advanced plan. Your API key will be sent to the email associated with your account.
Code examples
Here's a minimal Python example that fetches the latest Aave
market rates using the
requests
library. Pass your key as the
apiKey
query parameter when calling the API.
# Note: brotli must be installed to handle br decompression
# >>> pip install brotli requests
import requests
url = "https://api.aavescan.com/v2/reserves/latest"
params = {"apiKey": "YOUR_KEY"}
response = requests.get(url, params=params)
data = response.json()
print(data)