Uniswap V3 (Decentralized Exchange)
Uniswap V3 is a decentralized exchange (DEX) where users can swap tokens and provide liquidity to earn fees.
Supported Networks: ETH, ARB, OP, POLYGON, BASE, BSC, AVAX, CELO, BLAST, ZK, ZORA, WORLD, BERA
Parameters (all required):
| Parameter | Type | Required | Description |
|---|---|---|---|
symbol0 | string | Yes | First token symbol (e.g., WETH). Case-insensitive (weth, Weth, WETH are equivalent). |
symbol1 | string | Yes | Second token symbol (e.g., USDC). Case-insensitive (usdc, Usdc, USDC are equivalent). |
fee | integer | Yes | Pool fee tier: 100, 500, 3000, or 10000 (basis points) |
involving | string | No | Filter by address involved in the event (e.g., swapper, sender, owner) |
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. |
Fee Tiers:
100= 0.01% (stablecoin pairs)500= 0.05% (stable pairs)3000= 0.30% (most pairs)10000= 1.00% (exotic pairs)
Event Types:
Swap
Token exchanges between users and the liquidity pool.
Endpoint: GET /v1/uniswap_v3/events/swap
curl -H "X-API-Key: $API_KEY"
"https://api.defistream.dev/v1/uniswap_v3/events/swap?network=ETH&block_start=24000000&block_end=24010000&symbol0=WETH&symbol1=USDC&fee=3000" Example Data:
| block_number | pool_address | swapper | tokenSold | tokenBought | amountSold | amountBought | time |
|---|---|---|---|---|---|---|---|
| 24000002 | 0x8ad5…6D8 | 0x06cf…2ef | USDC | WETH | 0.244 | 0.000079 | 2025-12-13T00:06:35Z |
| 24000037 | 0x8ad5…6D8 | 0x5a1b…3a | USDC | WETH | 1.37 | 0.000443 | 2025-12-13T00:13:35Z |
| 24000105 | 0x8ad5…6D8 | 0x06cf…2ef | USDC | WETH | 0.99 | 0.000321 | 2025-12-13T00:27:11Z |
| 24000129 | 0x8ad5…6D8 | 0xd226…f89 | USDC | WETH | 0.28 | 0.000092 | 2025-12-13T00:31:59Z |
| 24000298 | 0x8ad5…6D8 | 0x06cf…2ef | USDC | WETH | 0.60 | 0.000194 | 2025-12-13T01:05:47Z |
Deposit (Mint)
Liquidity providers add tokens to a pool to earn trading fees.
Endpoint: GET /v1/uniswap_v3/events/deposit
curl -H "X-API-Key: $API_KEY"
"https://api.defistream.dev/v1/uniswap_v3/events/deposit?network=ETH&block_start=24000000&block_end=24050000&symbol0=WETH&symbol1=USDC&fee=3000" Example Data:
| block_number | pool_address | sender | owner | amount0 | amount1 | token0 | token1 | time |
|---|---|---|---|---|---|---|---|---|
| 24000000 | 0x8ad5…6D8 | 0xc364…b88 | 0xc364…b88 | 12.32 | 0.00195 | USDC | WETH | 2025-12-13T00:06:11Z |
| 24000521 | 0x8ad5…6D8 | 0xf5a9…658 | 0xa69b…78c | 15173406.74 | 689.07 | USDC | WETH | 2025-12-13T01:50:23Z |
| 24000801 | 0x8ad5…6D8 | 0xc364…b88 | 0xc364…b88 | 810.53 | 0.38 | USDC | WETH | 2025-12-13T02:46:47Z |
| 24001351 | 0x8ad5…6D8 | 0xc364…b88 | 0xc364…b88 | 121.67 | 0.046 | USDC | WETH | 2025-12-13T04:38:23Z |
| 24001441 | 0x8ad5…6D8 | 0x1f2f…387 | 0x1f2f…387 | 1366617.76 | 56.23 | USDC | WETH | 2025-12-13T04:56:23Z |
Withdraw (Burn)
Liquidity providers remove their tokens from a pool.
Endpoint: GET /v1/uniswap_v3/events/withdraw
curl -H "X-API-Key: $API_KEY"
"https://api.defistream.dev/v1/uniswap_v3/events/withdraw?network=ETH&block_start=24000000&block_end=24050000&symbol0=WETH&symbol1=USDC&fee=3000" Example Data:
| block_number | pool_address | owner | amount0 | amount1 | token0 | token1 | time |
|---|---|---|---|---|---|---|---|
| 24000521 | 0x8ad5…6D8 | 0xa69b…78c | 15174138.19 | 688.83 | USDC | WETH | 2025-12-13T01:50:23Z |
| 24001892 | 0x8ad5…6D8 | 0xb241…f92 | 42850.67 | 14.21 | USDC | WETH | 2025-12-13T06:45:11Z |
| 24002415 | 0x8ad5…6D8 | 0x7e3a…d14 | 8921.43 | 2.89 | USDC | WETH | 2025-12-13T08:50:35Z |
| 24003104 | 0x8ad5…6D8 | 0x1f2f…387 | 521043.82 | 168.45 | USDC | WETH | 2025-12-13T11:12:47Z |
| 24004287 | 0x8ad5…6D8 | 0xd8f2…a31 | 195420.51 | 63.17 | USDC | WETH | 2025-12-13T15:07:59Z |
Collect
Liquidity providers claim their earned trading fees.
Endpoint: GET /v1/uniswap_v3/events/collect
curl -H "X-API-Key: $API_KEY"
"https://api.defistream.dev/v1/uniswap_v3/events/collect?network=ETH&block_start=24000000&block_end=24050000&symbol0=WETH&symbol1=USDC&fee=3000" Example Data:
| block_number | pool_address | owner | recipient | amount0 | amount1 | token0 | token1 | time |
|---|---|---|---|---|---|---|---|---|
| 24000000 | 0x8ad5…6D8 | 0xc364…b88 | 0xc45b…ef8 | 9.43 | 0.003 | USDC | WETH | 2025-12-13T00:06:11Z |
| 24000051 | 0x8ad5…6D8 | 0xc364…b88 | 0xc364…b88 | 341.30 | 0.19 | USDC | WETH | 2025-12-13T00:16:23Z |
| 24000373 | 0x8ad5…6D8 | 0xc364…b88 | 0x2e58…e2 | 8.20 | 0.0036 | USDC | WETH | 2025-12-13T01:20:47Z |
| 24000466 | 0x8ad5…6D8 | 0xc364…b88 | 0x4ddb…57 | 15.57 | 0.0069 | USDC | WETH | 2025-12-13T01:39:23Z |
| 24000521 | 0x8ad5…6D8 | 0xa69b…78c | 0xa69b…78c | 15174140.39 | 688.83 | USDC | WETH | 2025-12-13T01:50:23Z |
Aggregate Queries
Bucket Uniswap events into time or block intervals with summary statistics.
Endpoint: GET /v1/uniswap_v3/events/{event_type}/aggregate
Requires group_by (time or block_number) and period (e.g., 2h, 1d, 10000).
Aggregatable event types: swap (agg_<TOKEN>_sold, agg_<TOKEN>_bought, mean_sqrt_based_price, mean_liquidity, agg_value_usd*), deposit (agg_<TOKEN>_amount, agg_value_usd*), withdraw (same as deposit), collect (same as deposit). Token columns are pivoted dynamically based on the pool tokens — e.g., for a WETH/USDC pool, swap produces agg_WETH_sold, agg_WETH_bought, agg_USDC_sold, agg_USDC_bought.
* agg_value_usd is only present when with_value=true is passed in the request.
Example: Daily swap volume for WETH/USDC
curl -H "X-API-Key: $API_KEY"
"https://api.defistream.dev/v1/uniswap_v3/events/swap/aggregate?network=ETH&block_start=21000000&block_end=21100000&symbol0=WETH&symbol1=USDC&fee=3000&group_by=time&period=1d" Sample Aggregate Results (swap):
| time_start | time_end | agg_USDC_sold | agg_USDC_bought | agg_WETH_sold | agg_WETH_bought | mean_sqrt_based_price | mean_liquidity | count |
|---|---|---|---|---|---|---|---|---|
| 2024-11-08T00:00:00Z | 2024-11-09T00:00:00Z | 18429501.24 | 21053842.67 | 6842.31 | 5981.47 | 1.824e+15 | 2.94e+16 | 4521 |
| 2024-11-09T00:00:00Z | 2024-11-10T00:00:00Z | 15204183.91 | 17892045.33 | 5621.84 | 4928.15 | 1.819e+15 | 2.87e+16 | 3847 |
Sample Aggregate Results (deposit):
| time_start | time_end | agg_USDC_amount | agg_WETH_amount | count |
|---|---|---|---|---|
| 2024-11-08T00:00:00Z | 2024-11-09T00:00:00Z | 8524190.42 | 2841.56 | 156 |
| 2024-11-09T00:00:00Z | 2024-11-10T00:00:00Z | 6291043.18 | 2104.82 | 132 |
Quota & Limits
Uniswap 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.