Algo orders
split a large order over time or over price.
TWAP spreads market orders evenly over a period; a scaled order places a ladder of limit orders between two prices. Both run on the server and survive restarts.
01TWAP
Algo orders, choose TWAP. Account, market, side, total amount (base asset, contracts on futures), duration and slices.
| Setting | Rule |
|---|---|
| Duration | 1 minute to 7 days (10080 minutes) |
| Slices | 1 to 500, at least 5 seconds apart. Each even slice must meet the exchange's minimum order size. |
| Randomise (optional) | Varies each slice by up to ± that % (at most 50). The variation is deterministic, so a restart repeats it exactly. |
| Price guard (optional) | A slice whose price is above the guard (buy) or below it (sell) is skipped and its share moves to later slices. |
| Reduce-only | Futures only |
- Each slice is what is left divided by the slices left, so partial fills and skipped slices are made up later; the last slice takes exactly what is left.
- After a pause, a restart or the kill switch, one slice is sent at once and the rest is re-spread over the time left, never dumped at once.
- Once the end time plus 10 % of the duration has passed, the order ends as expired and reports what was not filled.
- While the kill switch is on, slices that add risk wait; reduce-only futures slices and spot sells continue.
02Scaled (ladder)
Choose Scaled: total amount, from price, to price (they must differ), orders (2 to 50) and the distribution:
- Flat: the same size for every order;
- Increasing: sizes grow toward the "to" price;
- Decreasing: sizes shrink toward it.
The orders are evenly spaced, both prices included. Amounts are rounded down to the step and the last order gets the remainder. A single rung below the exchange minimum is skipped with a log line; the order is refused only if every rung is too small. It completes when no rung is open any more. Turning the kill switch on cancels the open rungs that add risk.
03Progress and cancel
Each algo order shows its status (running, completed, cancelled, failed, expired), the filled amount, the average price, what remains, and every child order with its status. Cancel cancels the open child orders first; a child that filled before its cancel landed still counts. While the exchange has not confirmed a cancel, the order stays running, places nothing new, and the cancel is sent again on every pass.
A spot sell needs the full total amount free on the account. An algo order that adds risk is refused while the kill switch is on. Every child order is linked to the journal and the panic cancels running algo orders.