> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ironflow.sh/llms.txt
> Use this file to discover all available pages before exploring further.

# TWAP and Iceberg

> Work a large order in the Ironflow terminal, over time or at your price, and review how it filled with the API.

EXEC is the terminal screen for moving size without showing the book your whole order. It offers two execution styles on one composer. Both run on your own Hyperliquid account under your trade-only agent key, the same way every other terminal strategy does.

<Note>
  EXEC runs in the terminal at [terminal.ironflow.sh/exec](https://terminal.ironflow.sh/exec). There is no public API endpoint that places orders; the data API and MCP tools are read-only. Use the API to review fills after the fact (see below).
</Note>

## Pick an execution style

| | TWAP (`OVER TIME`) | Iceberg (`AT MY PRICE`) |
| - | - | - |
| What it does | Hands the order to Hyperliquid's native TWAP, which fills it in roughly 30-second slices across your window | Rests one small slice at a time near the mid; the next slice goes up when one fills |
| Finishes | Inside the window you pick | When the total fills or the time cap (12 hours by default) is reached |
| Price | Takes the market on each slice, with Hyperliquid's own slippage caps | Rests at or behind the mid, or crosses it, depending on style |
| Minimum | \$100 total | \$10 per slice |
| Maximum | \$5,000,000 total | \$5,000,000 total, at most 500 slices |
| Ironflow fee | None: Hyperliquid's native TWAP carries no builder fee | The builder fee on each slice |

Either one can be cancelled at any time from MANAGE. You keep whatever already filled.

## TWAP

1. Pick the market, side and total size in USD.
2. Pick a duration: 15 minutes, 30 minutes, 1 hour or 4 hours.
3. Pick slice timing: `EVEN`, or `RANDOMIZED` so the timing is harder to spot.
4. Sign once. Hyperliquid runs the slices; the strategy completes when the window ends.

The size is converted from USD to the coin at the mid when the TWAP starts. Hyperliquid's TWAP pays the taker fee and the spread on each slice.

## Iceberg

1. Pick the market, side, total size and the visible slice size.
2. Pick a style:
   * `ADAPTIVE` (default in the terminal) starts behind the mid and steps toward the spread only when a slice sits unfilled.
   * `BALANCED` rests at the mid.
   * `PASSIVE` rests behind the mid. It earns the spread but may wait a long time.
   * `AGGRESSIVE` crosses the spread. It fills fast and pays the spread and the taker fee.
3. Sign once. One slice rests on the book at a time and reprices when the price drifts away.

Slice sizes and timing are randomized by default (slice size by up to 25%) so a fixed pattern is harder to front-run. Resting slices that fill pay Hyperliquid's maker fee.

<Warning>
  An iceberg can stop before the full size fills: when the time cap is reached, or when the market moves away from your price and slices do not fill. A TWAP always runs to the end of its window, but each slice fills at whatever the market offers at that moment. Neither guarantees an average price.
</Warning>

## Review how it filled

Every slice is an ordinary fill on your address, so the fills endpoint shows the result:

```bash theme={null}
curl "https://api.ironflow.sh/v1/fills?address=0xYourWallet&market=ETH-PERP&from=1789466400000&to=1789470000000" \
  -H "Authorization: Bearer $IRONFLOW_API_KEY"
```

```python theme={null}
fills = page.data
notional = sum(float(f.price) * float(f.size) for f in fills)
size = sum(float(f.size) for f in fills)
print(f"filled {size} at an average of {notional / size:.2f}")
```

Compare the average against the mid when you started to see what the execution cost you.

Automated trading is high-risk and you can lose all of your funds. Nothing here is investment advice. See the [Risk Disclosure](https://ironflow.sh/risk-disclosure).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.