AAVE V3 (DeFi Lending)
AAVE is a decentralized lending protocol where users can deposit assets to earn interest or borrow against their collateral.
Supported Networks: ETH, POLYGON, AVAX, ARB, OP, BASE, GNOSIS, SCROLL, BSC, ZK, LINEA
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
eth_market_type | string | No (ETH only) | Market type: Core, Prime, or EtherFi (default: Core) |
involving | string | No | Filter by address involved in the event (e.g., user, on_behalf_of) |
involving_label | string | No | Filter where any involved address matches a label substring (e.g., Binance). Mutually exclusive with involving. |
involving_category | string | No | Filter where any involved address matches a category (e.g., exchange). Mutually exclusive with involving. |
Event Types:
Deposit
Users supply assets to the protocol to earn interest.
Endpoint: GET /v1/aave_v3/events/deposit
curl -H "X-API-Key: $API_KEY"
"https://api.defistream.dev/v1/aave_v3/events/deposit?network=ETH&block_start=24000000&block_end=24010000" Example Data:
| block_number | user | token | amount | on_behalf_of | referral_code | time |
|---|---|---|---|---|---|---|
| 24000005 | 0x1691…9142 | USDE | 51.95 | 0x1691…9142 | 0 | 2025-12-13T00:07:11Z |
| 24000011 | 0x5695…0149 | PYUSD | 81493924.64 | 0x5695…0149 | 0 | 2025-12-13T00:08:23Z |
| 24000012 | 0x326f…51c4 | WBTC | 0.0074 | 0x326f…51c4 | 0 | 2025-12-13T00:08:35Z |
| 24000017 | 0xd4fa…23e | USDC | 19804.27 | 0xd4fa…23e | 0 | 2025-12-13T00:09:35Z |
| 24000017 | 0xd016…722 | WETH | 5.75 | 0xc7e8…3ac0 | 0 | 2025-12-13T00:09:35Z |
Withdraw
Users remove their supplied assets from the protocol.
Endpoint: GET /v1/aave_v3/events/withdraw
curl -H "X-API-Key: $API_KEY"
"https://api.defistream.dev/v1/aave_v3/events/withdraw?network=ETH&block_start=24000000&block_end=24010000" Example Data:
| block_number | user | token | amount | recipient | time |
|---|---|---|---|---|---|
| 24000012 | 0xd2da…77a0 | PYUSD | 15000.0 | 0xd2da…77a0 | 2025-12-13T00:08:35Z |
| 24000017 | 0x7bc3…3af8 | USDT | 19798.04 | 0xb817…a16 | 2025-12-13T00:09:35Z |
| 24000020 | 0x2b81…ca37e0 | USDT | 96.72 | 0xa946…f19 | 2025-12-13T00:10:11Z |
| 24000020 | 0x2b81…ca37e0 | USDT | 189554.86 | 0x356b…ba7d | 2025-12-13T00:10:11Z |
| 24000026 | 0x1f2f…f387 | WBTC | 0.0264 | 0x1f2f…f387 | 2025-12-13T00:11:23Z |
Borrow
Users take out loans using their deposited assets as collateral.
Endpoint: GET /v1/aave_v3/events/borrow
curl -H "X-API-Key: $API_KEY"
"https://api.defistream.dev/v1/aave_v3/events/borrow?network=ETH&block_start=24000000&block_end=24010000" Example Data:
| block_number | user | token | amount | on_behalf_of | interest_rate_mode | borrow_rate | time |
|---|---|---|---|---|---|---|---|
| 24000001 | 0xd016…722 | WETH | 400.0 | 0xf833…376 | 2 | 0.0197 | 2025-12-13T00:06:23Z |
| 24000001 | 0x531e…6e9f | USDE | 392362.0 | 0x531e…6e9f | 2 | 0.0359 | 2025-12-13T00:06:23Z |
| 24000006 | 0xc564…1aea | USDC | 150.0 | 0xc564…1aea | 2 | 0.0484 | 2025-12-13T00:07:23Z |
| 24000012 | 0x8921…409b | USDC | 10000.0 | 0x8921…409b | 2 | 0.0484 | 2025-12-13T00:08:35Z |
| 24000026 | 0x1f2f…f387 | CRVUSD | 1742.03 | 0x1f2f…f387 | 2 | 0.0545 | 2025-12-13T00:11:23Z |
Repay
Users pay back their borrowed amounts.
Endpoint: GET /v1/aave_v3/events/repay
curl -H "X-API-Key: $API_KEY"
"https://api.defistream.dev/v1/aave_v3/events/repay?network=ETH&block_start=24000000&block_end=24100000" Example Data:
| block_number | user | token | amount | repayer | use_a_tokens | time |
|---|---|---|---|---|---|---|
| 24000045 | 0x7a3d…8e21 | USDC | 5000.0 | 0x7a3d…8e21 | false | 2025-12-13T00:15:23Z |
| 24000112 | 0x9b4c…2f78 | WETH | 2.5 | 0x9b4c…2f78 | false | 2025-12-13T00:28:47Z |
| 24000298 | 0x6c8e…4a92 | DAI | 15000.0 | 0x6c8e…4a92 | false | 2025-12-13T01:05:35Z |
Flash Loan
Instant uncollateralized loans that must be repaid within the same transaction. Used for arbitrage, collateral swaps, and liquidations.
Endpoint: GET /v1/aave_v3/events/flashloan
curl -H "X-API-Key: $API_KEY"
"https://api.defistream.dev/v1/aave_v3/events/flashloan?network=ETH&block_start=24000000&block_end=24100000" Example Data:
| block_number | initiator | token | amount | premium | target | time |
|---|---|---|---|---|---|---|
| 24005123 | 0x3a7b…9c42 | WETH | 1000.0 | 0.9 | 0x8f2e…4d91 | 2025-12-13T18:42:11Z |
| 24008456 | 0x6d2f…8a73 | USDC | 500000.0 | 450.0 | 0x1b9c…7e28 | 2025-12-14T05:18:35Z |
Liquidation
When a borrower’s collateral value falls below the liquidation threshold, liquidators can repay part of the debt and receive discounted collateral.
Endpoint: GET /v1/aave_v3/events/liquidation
curl -H "X-API-Key: $API_KEY"
"https://api.defistream.dev/v1/aave_v3/events/liquidation?network=ETH&block_start=24000000&block_end=24100000" Example Data:
| block_number | owner | liquidator | debt_token | collateral_token | debt_to_cover | liquidated_collateral | time |
|---|---|---|---|---|---|---|---|
| 24010623 | 0x07a4…4bc | 0xa645…868 | USDT | WBTC | 26087.45 | 0.306 | 2025-12-14T11:43:59Z |
| 24010633 | 0x26f7…726 | 0x193e…846 | USDE | CBBTC | 2.24 | 0.0000268 | 2025-12-14T11:45:59Z |
| 24010633 | 0xeace…d4f | 0x193e…846 | USDC | WETH | 3.06 | 0.00104 | 2025-12-14T11:45:59Z |
| 24013849 | 0x589a…9ab | 0x193e…846 | USDC | WBTC | 54.12 | 0.000643 | 2025-12-14T22:32:35Z |
| 24014077 | 0x0c94…093 | 0x193e…846 | USDC | LINK | 15.10 | 1.21 | 2025-12-14T23:18:23Z |
Example: AAVE Prime Market on Ethereum
curl -H "X-API-Key: $API_KEY"
"https://api.defistream.dev/v1/aave_v3/events/deposit?network=ETH&block_start=24000000&block_end=24010000ð_market_type=Prime" Example: AAVE deposits involving exchange addresses
curl -H "X-API-Key: $API_KEY"
"https://api.defistream.dev/v1/aave_v3/events/deposit?network=ETH&block_start=24000000&block_end=24010000&involving_category=exchange" Aggregate Queries
Bucket AAVE events into time or block intervals with summary statistics.
Endpoint: GET /v1/aave_v3/events/{event_type}/aggregate
Requires group_by (time or block_number) and period (e.g., 2h, 1d, 10000).
Aggregatable event types: deposit (agg_amount, agg_value_usd*), withdraw (agg_amount, agg_value_usd*), borrow (agg_amount, mean_borrow_rate, agg_value_usd*), repay (agg_amount, agg_value_usd*), flashloan (agg_amount, agg_value_usd*), liquidation (agg_debt_to_cover, agg_liquidated_collateral_amount, agg_value_usd*)
* agg_value_usd is only present when with_value=true is passed in the request.
Example: Hourly deposit volume
curl -H "X-API-Key: $API_KEY"
"https://api.defistream.dev/v1/aave_v3/events/deposit/aggregate?network=ETH&block_start=21000000&block_end=21100000&group_by=time&period=1h" Sample Aggregate Results (deposit):
| time_start | time_end | agg_amount | count |
|---|---|---|---|
| 2024-11-08T00:00:00Z | 2024-11-08T01:00:00Z | 2841952.18 | 87 |
| 2024-11-08T01:00:00Z | 2024-11-08T02:00:00Z | 1523048.74 | 62 |
| 2024-11-08T02:00:00Z | 2024-11-08T03:00:00Z | 984215.33 | 41 |
| 2024-11-08T03:00:00Z | 2024-11-08T04:00:00Z | 1205683.91 | 53 |
| 2024-11-08T04:00:00Z | 2024-11-08T05:00:00Z | 1892047.56 | 71 |
Sample Aggregate Results (borrow):
| time_start | time_end | agg_amount | mean_borrow_rate | count |
|---|---|---|---|---|
| 2024-11-08T00:00:00Z | 2024-11-08T01:00:00Z | 1245820.45 | 0.0412 | 34 |
| 2024-11-08T01:00:00Z | 2024-11-08T02:00:00Z | 892104.18 | 0.0398 | 28 |
| 2024-11-08T02:00:00Z | 2024-11-08T03:00:00Z | 534291.67 | 0.0425 | 19 |
Quota & Limits
AAVE V3 endpoints use a block-based quota model. Cost formula: max(100, round(block_range × network_discount × aggregate_discount)).
| Format | Max time range | Max block range | Quota cost |
|---|---|---|---|
| JSON | 31 days | 10,000 | block_range (min 100) |
| CSV / Parquet | 31 days | 10,000,000 | block_range (min 100) |
| CSV / Parquet (ARB) | 31 days | 10,000,000 | block_range × 0.2 (min 100) |
| Aggregate | 31 days | same as above | block_range × 0.5 (min 100) |
Check response headers X-RateLimit-Remaining and X-Request-Cost to monitor usage.