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.
3
Chains
12+
DEX protocols
~1s
Update cadence
Fee-aware
Pricing model
One endpoint. Full DEX coverage.
Access aggregate DEX midrates via REST or stream real-time updates over WebSocket with sub-second frequency.
GET /v1/dex/midrate/{base}-{term}wss://ws.windy.network/v1/dex/midrate/{base}-{term}dex:aggre:rate:{BASE}:{TERM}Response fields
| Field | Type | Description |
|---|---|---|
mid | number | Aggregate weighted median midrate, adaptive EMA smoothed |
avgBuy | number | Mid + half of weighted average fee spread (market quality indicator) |
avgSell | number | Mid - half of weighted average fee spread (aggregate sell price) |
bestBuy | number | Mid + half of tightest pool fee (best execution via smart routing) |
bestSell | number | Mid - half of tightest pool fee (best achievable sell) |
symbol | string | Token pair symbol (e.g. ETH/USD) |
ts | integer | Unix timestamp in milliseconds |
vol | number | 24h aggregate volume in USD across all contributing pools |
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.
Uniswap V2 & V3
Fee tiers: 0.01% / 0.05% / 0.3% / 1%
PancakeSwap V2 & V3
Fee tiers: 0.01% / 0.05% / 0.25% / 1%
Raydium
Fee tiers: 0.25% standard
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.
// 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 }
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.