TWAP order

Time-weighted average price order: a large order automatically split into smaller suborders executed at intervals over a set duration, aiming for the average market price across that window rather than a single execution price.

Definition

A TWAP order takes one large order and executes it as a series of small ones, spaced out over a duration you choose. The intended result is a fill close to the time-weighted average price during that window, instead of the single price you would have hit by sending the whole size at once.

The problem it solves

A large order eats through the order book level by level, and every level it consumes is worse than the last. That is price impact, and on a thin book it can cost more than all the fees in the trade combined.

Splitting the order across time lets the book refill between slices. The same size is executed against repeatedly replenished liquidity rather than a single snapshot of it.

What you give up

Time in the market. A TWAP does not protect you from the price trending away during the window: it averages, and an average includes the prices you did not want. Send a buy TWAP into a rising market and every later slice fills higher than the first.

The order is also visible in its regularity. A predictable stream of same-sized child orders at fixed intervals is something other participants can recognise and trade ahead of.

How to size the window

Short windows reduce trend risk and increase impact per slice. Long windows do the reverse. The judgement is about the market you are in: how deep the book is at the size you are trading, and how likely the price is to move meaningfully within the window.

Where you will run into it

As an order type alongside market and limit on perpetual DEXs, both for opening and for closing a position, and as a standard execution primitive in trading APIs.