Aperiodic
MarketsLive
Pricing
Get Started

Metrics library · Derivatives

VWAP / TWAP

Get the data
BTC-USDT perpetual on Binance, 5m bars, 1 to 31 May 2025, from the free preview. The free delayed feed doesn't carry this dataset; paid plans stream it in real time.
How it's builtBTC, May 2025FieldsDownloadFAQ

Two averages of the same trades. VWAP weights each trade by its size; our TWAP counts each trade once.

Volume-weighted and time-weighted average prices for precise execution benchmarks.

Built from
Market Data
Fields
2
Intervals
1m to 1d; 15s and 30s on Prime
Plan
Pro
Venues
Binance, OKX, Hyperliquid
Live
Real time on paid plans

How it's built

One real minute of trades, field by field. Each value matches our pipeline's output.

All 11,692 trades from 14:38 to 14:39 UTC on 11 June 2025, Binance BTC-USDT perpetual, from the free raw-trades preview.

  1. Step 1

    Average the trades two ways

    At the end of the minute they are 0.108 bps apart.

    Loading 11,692 trades…
  2. Step 2

    Weight by size, or equally

    vwap=Σ (amount × price) / Σ amount=$109,969.75
    twap=Σ price / 11,692 trades=$109,968.56

    VWAP weights each trade by its size in BTC. TWAP here is the plain mean of trade prices, not time-weighted, so a $110 trade counts as much as a $264K one. It equals price_mean in the range dataset.

  3. Step 3

    The bar

    vwap
    $109,969.75
    twap
    $109,968.56

How far VWAP drifts from TWAP on busy bars

On BTC's busiest bars, VWAP sat 4.9× further from TWAP than on its quietest.

BTC-USDT perpetual on Binance, 5m bars, 1 to 31 May 2025, from the free preview.

Median gap between VWAP and TWAP
0.144
0.204
0.241
0.273
0.308
0.342
0.387
0.443
0.550
0.703
12345678910

Bars by volume, quietest tenth to busiest tenth. Basis points.

The median gap over the month was 0.32 bps, and 1 bar in 100 had more than 2.74 bps. Sorted by volume, the quietest tenth of bars had a median gap of 0.14 bps and the busiest tenth 0.70 bps.

The two benchmarks differ most on the bars with the most volume. On those bars TWAP is furthest from the price most of the volume traded at.

How to read it

vwap is the sum of price times quantity divided by the quantity traded in the interval. twap is the plain mean of the trade prices: each trade counts once, regardless of size or how long the price stood.

vwap above twap means the larger trades printed above the typical trade. Below means they printed lower.

Neither is a price you could trade at in one order. Use them as benchmarks, for execution and for fills in a backtest that doesn't model the book.

vwap
Trade-size-weighted average price in the interval
twap
Arithmetic average trade price in the interval
The research behind itHide the research

VWAP and TWAP are both price averages over an interval. But they weight observations differently — by volume and by time, respectively — and the divergence between them is itself a powerful signal about the quality of price moves.

The execution benchmark perspective

Berkowitz, Logue & Noser (1988) established VWAP as the standard institutional execution benchmark, arguing that it represents the "average price available to the market" weighted by actual trading intensity. An institution that consistently buys above VWAP is demonstrably executing worse than the average participant — either because of adverse selection, poor timing, or market impact.

TWAP, by contrast, treats all time equally. It's the benchmark for time-sliced execution algorithms that distribute orders uniformly across a window, ignoring volume patterns. Madhavan (2002) noted that the choice of benchmark reveals the execution strategy's implicit assumption: VWAP assumes you should trade when everyone else does; TWAP assumes you should trade at a constant rate regardless.

The signal in the divergence

The gap between VWAP and TWAP encodes information about the structure of trading within the bar:

VWAP > TWAP → Volume was disproportionately concentrated at higher prices. Heavy-volume trades happened at the top of the range. This is a bullish volume-quality signal: the market didn't just drift up on thin liquidity — participants endorsed the higher prices with real size. This aligns with the Blume, Easley & O'Hara (1994) finding that volume conveys information about the precision of traders' signals.

TWAP > VWAP → Price was elevated for extended periods but on thin volume. The asset spent time at high prices, but trading activity didn't endorse those levels. This is the signature of a thin-market drift — potentially unsustainable and vulnerable to reversal once volume returns.

For performance attribution

Measuring fills against both benchmarks simultaneously reveals different aspects of execution quality:

  • Fills consistently above VWAP → adverse selection. You're systematically buying at the worst prices within each bar.
  • Fills between VWAP and TWAP → depends on which is higher. If VWAP > TWAP and you're between them, you're beating the volume-weighted average but still paying above the time-average — acceptable in a strong market.
  • VWAP-TWAP spread as a feature → the magnitude of this divergence predicts subsequent reversal probability. Extreme divergence means the current bar's volume-weighted price is far from its time-weighted price — an unstable configuration.

References:

  • Berkowitz, S.A., Logue, D.E. & Noser, E.A. (1988). "The Total Cost of Transactions on the NYSE." Journal of Finance, 43(1), 97–112.
  • Madhavan, A. (2002). "VWAP Strategies." Trading, 1, 32–39.
  • Blume, L., Easley, D. & O'Hara, M. (1994). "Market Statistics and Technical Analysis: The Role of Volume." Journal of Finance, 49(1), 153–181.

Download the same month

No account needed. Pro adds every venue and perp, at 1-minute to daily bars.
# Install the Aperiodic CLI into ~/.local/bin
mkdir -p "$HOME/.local/bin"
curl -fsSL https://raw.githubusercontent.com/aperiodic-io/cli/main/install.sh | INSTALL_DIR="$HOME/.local/bin" bash
export PATH="$HOME/.local/bin:$PATH"

# Free preview — no API key required
aperiodic vtwap --preview \
  --exchange binance-futures \
  --symbol perpetual-BTC-USDT:USDT \
  --interval 5m \
  --timestamp exchange \
  --start-date 2025-05-01 \
  --end-date 2025-05-31 \
  --output-dir ./data && echo "Saved to $PWD/data"

Questions

Related

CandlesticksCandles and volume, built from every tradeSlippageWhat taker trades paid against the quoteTrade sizeSmall, medium and large trades, and the tails
Aperiodic

Built from hundreds of terabytes of raw data and distilled into point-in-time metrics you can pull as parquet files. Plus the raw trades, quotes and derivatives data behind them.

Use Cases
  • Improve your backtest
  • Find new alpha
  • Execute smarter
Indices
  • All indices
  • Aperiodic Cost Index
  • Aperiodic Depth Index
  • Aperiodic Impact Index
Metrics
  • Metrics library
  • Data Catalog
  • Live markets dashboard
  • Global Liquidity
  • Unusual activity
  • Order Flow
  • L1 & L2
  • Derivatives
  • RWA
  • Raw Data
Developers
  • API Docs
  • Live WebSocket Feed
  • MCP Server
  • Notebooks
  • For AI Agents
  • Atlas Security Master
  • Pre-flight
  • Changelog
  • Roadmap
  • llms.txt
Learn
  • Replays
  • Microstructure Guide
  • Architecture
  • Research Blog
  • FAQ
Compare
  • All vendors
  • vs. Tardis
  • vs. CoinGlass
  • vs. Kaiko
  • vs. Amberdata
Company
  • Pricing
  • Contact
  • Book a call
  • Terms of Service
  • Privacy Policy
  • Licensing
  • SLA

© Copyright 2026 Aperiodic. All Rights Reserved.

Aperiodic Limited · Registered in Ireland · Company No. 815273 ·
136 Capel Street, Dublin D01 T2C9, Ireland

Shown: minute closes of 847 perpetuals, 20:30–22:30 UTC on 10 Oct 2025, IOTX in orange · built with ohlcv 1m