Show docs pages

TWAP

TWAP releases your quantity in even slices over a duration you set, works each slice passively like Chase, and handles any remainder at the end.

This page covers how a TWAP schedule releases your quantity, each field in the ticket, what happens at the end of the schedule, how a TWAP ends, what you can change while it runs, and what it does when something goes wrong.

What TWAP does

TWAP spreads your quantity evenly over a Duration, releasing a share of it every Interval. Each released share is worked passively, the same way Chase works an order. When the duration ends, At end decides what happens to anything that has not filled.

How it works

The schedule

The number of slices is the duration divided by the interval. A 5-minute duration with a 1-minute interval is 5 slices.

The first slice is released when the order starts, and one more at each interval after that. Release is cumulative: a slice that has not filled carries forward, so the order can always work everything released so far.

When the duration is not a whole number of intervals, the last slice is shorter and is sized to its share of the time. The caption under the schedule fields reads it back, for example "5 slices × ≈ 0.2 BTC each".

Working each slice

Each slice is priced like Chase: one tick inside the spread or at the best price on your side, or Chase distance basis points behind it, and never past your Limit price. TWAP keeps one order resting at a time.

When the next slice is released while an order is resting, Aura enlarges that order to cover the new amount. On every OKX and Bybit market and on Kraken and Coinbase spot, it amends the order in place. On Coinbase futures it cancels the order and places a new one for the larger amount.

On spot markets, each slice, and each enlargement, is kept within what your available balance can pay for, and on an OKX or Bybit perpetual within your margin, as in Chase. A slice kept smaller rests at that size until the next slice is released or the order requotes.

Small slices

If a slice is smaller than the exchange's minimum order size, it waits. It goes out once the amount released reaches the minimum. The ticket warns you before you submit:

  • "Each slice … is under the … minimum: slices post once the amount released reaches it."
  • "The last slice … is under the … minimum: it joins the remainder at the end."

At the end of the duration

At endWhat happens to the unfilled remainder
Cancel remainderAura cancels it and the order ends. This is the default.
Continue as SniperAura cancels the resting order and takes the remainder with IOC orders, as Sniper does: priced 20 bps through the best price on the other side, capped by your Limit price, each up to a quarter of the size on the top 10 price levels there. It keeps going until the order fills or you cancel it.
Continue as ChaseAura keeps working the remainder passively, as Chase does, until it fills or you cancel it. The status reads past end.

With Continue as Sniper or Continue as Chase, an Expires time cancels whatever is left when it arrives and closes the order as Expired.

Quantity in the quote currency

On spot, perpetual and futures markets, but not inverse perpetuals, click the unit beside Quantity to switch between the base and quote currency. In the quote currency, the quantity is a budget spread over the schedule.

Parameters

ParameterWhat it doesDefault and limits
QuantityHow much to buy or sell over the whole schedule.Required. Must meet the exchange's minimum size and be a whole number of lots. Some markets also have a minimum order value.
Chase distanceHow far behind the best price on your side each slice rests, in basis points. At 0, slices go one tick inside the spread when it is wider than one tick, else join the best price.Default 0. Whole numbers from 0 to 9999.
Limit priceAn optional cap on every price, including a Continue as Sniper sweep.Default none.
Post onlyEvery order is maker-only. The exchange rejects or cancels an order that would take liquidity, and TWAP reprices it.Default off.
Reduce onlyThe exchange uses the order only to reduce your current net position and cancels any remainder it cannot use.Default off. Shown on perpetual markets only.
DurationTotal time the schedule runs, in hours, minutes and seconds.Default 5 minutes. Up to 999 hours.
IntervalTime between slices, to the millisecond.Default 1 minute. At least 1 s, and no longer than the duration.
At endWhat happens to the remainder when the duration ends.Default Cancel remainder.
StartsNow starts the schedule on submit. At holds the order as scheduled and starts the schedule at the time you pick.Default Now. At offers 15 minutes ahead. At most 365 days out.
ExpiresNever is good till cancelled. At cancels whatever is left at that time and closes the order as Expired.Default Never. Must be at or after the end of the schedule. With Cancel remainder, it reads With the schedule and does not apply.

Below the submit button, Participation compares your size with the volume this market traded in the same UTC time-of-day window, as the median over the last 14 days. It turns amber at 25% or more. See Placing an order for the other readouts.

While it runs

StatusMeaning
scheduledWaiting for its Starts time.
newAccepted, not working yet.
workingAn order is working at the exchange.
pacingWaiting for the next slice.
waitingWaiting for market data.
past endWorking past its end time, under Continue as Sniper or Continue as Chase.
amendingApplying your changes.
expiringCancelling what is left at its Expires time.
cancellingCancelling, at your request or because the schedule ended with Cancel remainder.

The order sheet's Progress row replaces the fill meter. Its bar shows what has filled against the whole quantity, with a teal mark at the share the schedule has released by now. Hover the bar to see the figures. Its lines tell you:

  • the pace: On schedule, Behind schedule by … or Ahead of schedule by …
  • the slice and time left, for example Slice 3 of 5 · ends in 2 min 10 s

What happens to what's left when the schedule ends is the At end row in the Order column, with the order's other settings.

A TWAP is only ahead of schedule after an amend moved the schedule under its fills. It then pauses until the schedule catches up.

How it ends

The status chip shows the outcome: filled, cancelled or part. cancelled. It reads rejected only for an order above your Max USD notional or one that never reached the exchange because the account had no connection. A finished TWAP's Progress row reads Filled, or Ended at … with the amount not filled. When the order ended for a reason other than a fill or a cancel, the order sheet shows the reason in a red box at the top, whatever the status.

ReasonWhat happened
FilledThe whole quantity filled. With a quote-currency quantity, also when what is left of the budget is too small for one order the exchange accepts. Hover the status to see the unspent amount.
CancelledYou cancelled the order, or the schedule ended with Cancel remainder.
ExpiredThe order reached its Expires time.
Remainder below the exchange's minimum sizeWhat is left of the whole order is smaller than the exchange's minimum order size.
Remainder below the exchange's minimum order valueWhat is left of the whole order is worth less than the exchange's minimum order value.
Stopped after repeated rejectionsThe exchange rejected 5 orders in a row, with none accepted or filled in between. Rejections for the exchange's rate limit don't count.
Rejected by the exchangeThe exchange rejected an order for a reason that sending again cannot fix. The red box names the reason, such as Size not accepted, with the exchange's own words.
Position already closedA reduce-only order found no position left to reduce.
Cancelled by the exchange for marginThe exchange's risk or margin controls cancelled an order.
Order could not be sentThe account's current settings cannot carry this order.
Above your Max USD notionalThe order is larger than your max USD notional. See Settings.
Amended order was refusedAura accepted an amend, but the order with its new values failed Aura's checks.
Exchange account disconnectedThe account had lost its connection, or the exchange had refused its API key, before the order reached the exchange. See Connection status.
Exchange account could not connectAura could not connect the account to send the order.
Closed when the paper account was restoredYou reset a paper account whose saved state Aura couldn't restore.

Amending

Open the order and click Amend, or click the pencil on its row in Open Orders. In the Order column you can change:

FieldNotes
QuantityMust stay above what has already filled. The schedule then releases the new total from its original start.
Chase distanceWhole basis points, under 10000.
Post onlyOn or off.
Reduce onlyPerpetual markets only. Applies to orders placed after the amendment.
At endCancel remainder, Continue as Sniper or Continue as Chase.
DurationEnter it as Total from start or Time remaining, picked from the row's label. Once you change it, the row shows when the schedule will end.
IntervalAt least 1 s, and no longer than the duration.
Limit priceLeave it empty to remove the limit.
ExpiresUnchanged, At a time, or No expiry (GTC). On an order with no expiry, the choices are No expiry (GTC) and At a time. It must sit at or past the end of the schedule.
StartsOnly while the order is scheduled: Unchanged, At a time, or Start now.

Click Apply to send only what you changed, or Discard to leave without sending anything. Aura cancels the resting order, waits for it to finish, checks the new values the way it checks a new order, and starts the TWAP again. The status reads amending meanwhile. If you cancel during an amend, the cancel wins.

The schedule always stays anchored to its original start, and Duration is always the total time from that start:

  • A longer duration while the TWAP is ahead of the new schedule makes it pause (pacing) until the schedule catches up.
  • A shorter duration while it is behind releases the backlog straight away.
  • A duration at or below the time already elapsed ends the schedule now and runs At end. The end time under Interval shows this before you apply.
  • An amend applied after the end has passed runs At end again, unless it extends the duration past now.
  • Changing only the interval never moves the end time.

What can go wrong

SituationWhat TWAP does
No book, or no trading rules for the marketPlaces nothing and shows waiting. It works the released amount when both arrive.
The book stops updatingKeeps working from the last book Aura received. A quiet book is not treated as stale.
A slice is below the exchange's minimumWaits for a later release to reach the minimum.
The exchange refuses a price, for example a Post only order that would takeReprices from the current book and sends again. This does not count as a rejection.
Insufficient balanceRetries at half the refused size, never below the exchange's minimum, and keeps later orders at that size until one fills. After 5 rejections in a row it stops with Stopped after repeated rejections.
The exchange rate-limits youWaits out the exchange's window, 2 seconds on OKX and 1 second on Coinbase, Kraken and Bybit, then sends again, as many times as it takes. A rate limit never counts as a rejection and never ends the order. If the exchange won't move a resting order for its rate limit, the order stays where it is until the wait is over.
The exchange is unavailable, has too many open orders, or gives no clear reasonWaits for the next book update or exchange event, then tries again. These count toward the 5-in-a-row limit.
A rejection that sending again cannot fix, such as Size not accepted, Market unavailable, API key refused or Position limit reachedStops with Rejected by the exchange.
What is left of the whole order falls below the exchange's minimumEnds with one of the two Remainder below… reasons.
A quote-currency budget is too small for one more orderEnds Filled if anything filled, with the unspent amount in the status hover. If nothing filled, it ends Cancelled with the remainder reason.
The exchange does not confirm an orderThe status reads unconfirmed, and TWAP places nothing beside that order until it is settled. See Managing orders.

If your exchange account disconnects, see Connection status. To compare TWAP with the other algos, see Choosing an algo.