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):

ParameterTypeRequiredDescription
symbol0stringYesFirst token symbol (e.g., WETH). Case-insensitive (weth, Weth, WETH are equivalent).
symbol1stringYesSecond token symbol (e.g., USDC). Case-insensitive (usdc, Usdc, USDC are equivalent).
feeintegerYesPool fee tier: 100, 500, 3000, or 10000 (basis points)
involvingstringNoFilter by address involved in the event (e.g., swapper, sender, owner)
involving_labelstringNoFilter where any involved address matches a label substring (e.g., Binance). Mutually exclusive with involving.
involving_categorystringNoFilter 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_numberpool_addressswappertokenSoldtokenBoughtamountSoldamountBoughttime
240000020x8ad5…6D80x06cf…2efUSDCWETH0.2440.0000792025-12-13T00:06:35Z
240000370x8ad5…6D80x5a1b…3aUSDCWETH1.370.0004432025-12-13T00:13:35Z
240001050x8ad5…6D80x06cf…2efUSDCWETH0.990.0003212025-12-13T00:27:11Z
240001290x8ad5…6D80xd226…f89USDCWETH0.280.0000922025-12-13T00:31:59Z
240002980x8ad5…6D80x06cf…2efUSDCWETH0.600.0001942025-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_numberpool_addresssenderowneramount0amount1token0token1time
240000000x8ad5…6D80xc364…b880xc364…b8812.320.00195USDCWETH2025-12-13T00:06:11Z
240005210x8ad5…6D80xf5a9…6580xa69b…78c15173406.74689.07USDCWETH2025-12-13T01:50:23Z
240008010x8ad5…6D80xc364…b880xc364…b88810.530.38USDCWETH2025-12-13T02:46:47Z
240013510x8ad5…6D80xc364…b880xc364…b88121.670.046USDCWETH2025-12-13T04:38:23Z
240014410x8ad5…6D80x1f2f…3870x1f2f…3871366617.7656.23USDCWETH2025-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_numberpool_addressowneramount0amount1token0token1time
240005210x8ad5…6D80xa69b…78c15174138.19688.83USDCWETH2025-12-13T01:50:23Z
240018920x8ad5…6D80xb241…f9242850.6714.21USDCWETH2025-12-13T06:45:11Z
240024150x8ad5…6D80x7e3a…d148921.432.89USDCWETH2025-12-13T08:50:35Z
240031040x8ad5…6D80x1f2f…387521043.82168.45USDCWETH2025-12-13T11:12:47Z
240042870x8ad5…6D80xd8f2…a31195420.5163.17USDCWETH2025-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_numberpool_addressownerrecipientamount0amount1token0token1time
240000000x8ad5…6D80xc364…b880xc45b…ef89.430.003USDCWETH2025-12-13T00:06:11Z
240000510x8ad5…6D80xc364…b880xc364…b88341.300.19USDCWETH2025-12-13T00:16:23Z
240003730x8ad5…6D80xc364…b880x2e58…e28.200.0036USDCWETH2025-12-13T01:20:47Z
240004660x8ad5…6D80xc364…b880x4ddb…5715.570.0069USDCWETH2025-12-13T01:39:23Z
240005210x8ad5…6D80xa69b…78c0xa69b…78c15174140.39688.83USDCWETH2025-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_starttime_endagg_USDC_soldagg_USDC_boughtagg_WETH_soldagg_WETH_boughtmean_sqrt_based_pricemean_liquiditycount
2024-11-08T00:00:00Z2024-11-09T00:00:00Z18429501.2421053842.676842.315981.471.824e+152.94e+164521
2024-11-09T00:00:00Z2024-11-10T00:00:00Z15204183.9117892045.335621.844928.151.819e+152.87e+163847

Sample Aggregate Results (deposit):

time_starttime_endagg_USDC_amountagg_WETH_amountcount
2024-11-08T00:00:00Z2024-11-09T00:00:00Z8524190.422841.56156
2024-11-09T00:00:00Z2024-11-10T00:00:00Z6291043.182104.82132

Quota & Limits

Uniswap V3 endpoints use a block-based quota model. Cost formula: max(100, round(block_range × network_discount × aggregate_discount)).

FormatMax time rangeMax block rangeQuota cost
JSON31 days10,000block_range (min 100)
CSV / Parquet31 days10,000,000block_range (min 100)
CSV / Parquet (ARB)31 days10,000,000block_range × 0.2 (min 100)
Aggregate31 dayssame as aboveblock_range × 0.5 (min 100)

Check response headers X-RateLimit-Remaining and X-Request-Cost to monitor usage.