How a TWAP order works
You set the total size, a duration, and either a number of lots or let the terminal choose one. The order engine divides the size into equal slices and submits one slice at each interval until the duration ends or the size is filled. A 60-minute TWAP with 12 lots sends one slice every five minutes.
Each slice can be a market order, which fills immediately at the best available price, or a maker-only limit order placed at the best bid or ask. Maker-only slices earn the maker fee and avoid crossing the spread, but a slice can miss if price runs away before it fills. Randomness shifts the timing and size of each slice by a few percent so the pattern is harder to spot in the tape.
When to use one
TWAP is for size, not speed. If your order is a meaningful share of the visible book, a single market order pays for the whole spread and then some. Spreading the same size over an hour lets liquidity refill between slices and usually lands closer to the volume-weighted price of the period.
It also suits positions you want to build without signalling: accumulating a perp position ahead of a catalyst, unwinding a large position without triggering a cascade, or moving exposure between venues for a funding trade. The cost is drift. If price trends against you during the window, the average fill is worse than an immediate market order would have been. A pause buffer stops new slices when price moves against the order by more than a set percentage.
Example: buying 20 BTC over one hour
WORKED EXAMPLEA trader wants 20 BTC of perpetual exposure on Hyperliquid. The book shows about 4 BTC within 0.1% of the mid, so a single market order would walk several levels deep.
- Total size
- 20 BTC
- Duration
- 60 minutes
- Lots
- 20 (one slice every 3 minutes)
- Slice size
- 1 BTC ± 10% randomness
- Pause buffer
- 0.5% adverse move
- Result
- Fills between $77,120 and $77,610, average $77,384
The same 20 BTC as one market order would have cleared the book to roughly $77,900. The TWAP paid the spread twenty times but never more than one level deep.