Definition
TWAP (Time Weighted Average Price) is the average price at which an asset is traded over a specified time window, rather than the end-of-day price. It represents an aggregated form of price data. Global TWAP uses time-weighted average prices across all exchanges available for the asset. Amberdata provides TWAP data aggregated at minutely, hourly, or daily intervals for all decentralized exchanges covered, with historical data extending back to the genesis block for supported networks. TWAP offers traders insight into both the trend and value of an asset.Details
TWAP is calculated across all decentralized exchanges at a 1-minute frequency over a configurable lookback period. Prices for this endpoint are denominated in ETH. The calculation is derived from OHLCV data using the formula: (O + H + L + C) / 4.API Endpoints
/market/defi/twap/asset/information /market/defi/twap/asset/{asset}/latest /market/defi/twap/asset/{asset}/historical /market/defi/twap/pairs/information /market/defi/twap/pairs/bases/{base}/quotes/{quote}/latest /market/defi/twap/pairs/bases/{base}/quotes/{quote}/historicalAvailability
TWAP endpoints are accessible via REST API for historical (time series) data and are updated each time a new block is mined. TWAP data is available for every asset and trading pair on every supported decentralized exchange.Frequently Asked Questions
Who uses TWAP?- TWAP execution strategies are popular among traders engaged in High-Frequency Trading or quantitative trading such as algorithmic trading. The strategy divides large orders into smaller portions to facilitate smoother execution.
- TWAP signals do not influence market volatility. With TWAP execution, a trader can place a large volume of trade orders but transact at a single averaged price over time, enabling the implementation of sizable orders without causing price disruption.
- TWAP and VWAP differ primarily in:
- Timing: TWAP is weighted by time, whereas VWAP is weighted by both volume and time.
- Calculation complexity: TWAP is simpler to calculate, while VWAP requires a more complex process.
- Volume sensitivity: TWAP is easier to calculate for small volumes of transactions, unlike VWAP.