Products/Crypto/DEX Midrates
DEX Midrates

On-chain pricing. Multi-chain. Real-time.

Real-time aggregate midrates from Uniswap, PancakeSwap, Raydium, and more — with adaptive EMA smoothing, fee-aware buy/sell execution prices, and best-route pricing across Ethereum, BSC, and Solana.

UniswapPancakeSwapSushiSwapRaydiumBalancerCurveOrcaWindyAerodromeTrader JoeJupiterThenaMaverickCamelot

3

Chains

12+

DEX protocols

~1s

Update cadence

Fee-aware

Pricing model

API endpoint

One endpoint. Full DEX coverage.

Access aggregate DEX midrates via REST or stream real-time updates over WebSocket with sub-second frequency.

RESTGET /v1/dex/midrate/{base}-{term}
WebSocketwss://ws.windy.network/v1/dex/midrate/{base}-{term}
Channeldex:aggre:rate:{BASE}:{TERM}

Response fields

FieldTypeDescription
midnumberAggregate weighted median midrate, adaptive EMA smoothed
avgBuynumberMid + half of weighted average fee spread (market quality indicator)
avgSellnumberMid - half of weighted average fee spread (aggregate sell price)
bestBuynumberMid + half of tightest pool fee (best execution via smart routing)
bestSellnumberMid - half of tightest pool fee (best achievable sell)
symbolstringToken pair symbol (e.g. ETH/USD)
tsintegerUnix timestamp in milliseconds
volnumber24h aggregate volume in USD across all contributing pools
Capabilities

Fee-aware, multi-chain, sub-second.

Pricing derived from actual on-chain pool fee tiers — not estimated. Aggregated across Ethereum, BSC, and Solana with adaptive smoothing to reduce noise.

Multi-chain coverage

Aggregates pricing from Uniswap (Ethereum), PancakeSwap (BSC), Raydium (Solana), and other major DEX protocols across multiple chains.

Adaptive EMA smoothing

Weighted median pricing with adaptive exponential moving average reduces noise from individual pool volatility.

Fee-aware pricing

Buy/sell prices are derived from actual on-chain pool fee tiers (V3: 0.01%-1%, V2: 0.3%) read via eth_call — not estimated.

Best-execution routing

bestBuy/bestSell fields show the price achievable via the tightest-fee pool — useful for smart order routing decisions.

~1 second updates

Midrates are recalculated and streamed every second via WebSocket for near-real-time on-chain visibility.

24h volume data

Trading volume aggregated across all contributing DEX pools, updated every 15 minutes from GeckoTerminal.

1
Ethereum

Uniswap V2 & V3

Fee tiers: 0.01% / 0.05% / 0.3% / 1%

2
BSC

PancakeSwap V2 & V3

Fee tiers: 0.01% / 0.05% / 0.25% / 1%

3
Solana

Raydium

Fee tiers: 0.25% standard

Developer-first

Stream DEX prices in real time.

Connect via WebSocket for ~1s updates or use the REST endpoint for on-demand snapshots. Full response includes mid, buy/sell prices, and 24h volume.

REST endpoint

GET /v1/dex/midrate/ETH-USD — returns mid, avgBuy, avgSell, bestBuy, bestSell, symbol, ts, and vol.

WebSocket stream

wss://ws.windy.network/v1/dex/midrate/ETH-USD — sub-second updates with the same response schema.

Channel subscription

dex:aggre:rate:ETH:USD — subscribe to specific pairs for targeted real-time feeds.

dex-stream.js
// Stream DEX midrate for ETH-USD
const ws = new WebSocket(
  'wss://ws.windy.network/v1/dex/midrate/ETH-USD'
)

ws.onmessage = (e) => {
  const data = JSON.parse(e.data)
  console.log(data)
}

// Response:
{
  "mid": 1990.158,
  "avgBuy": 1990.655,
  "avgSell": 1989.661,
  "bestBuy": 1990.408,
  "bestSell": 1989.908,
  "symbol": "ETH/USD",
  "ts": 1774862182356,
  "vol": 245000000
}
Live~1s updates
Get started

Ready to integrate on-chain DEX pricing?

Get your API key and start streaming real-time midrates from Uniswap, PancakeSwap, Raydium, and more — with the same unified interface across REST, WebSocket, and FIX.

Multi-chain~1s updatesFree trial available