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

# Work a Large Order With TWAP or a Limit Ladder

> Big orders can fill at worse prices than the one on your screen. Learn how to break one up with your agent, on Hyperliquid or Polymarket, before you send it.

By the end of this guide you will have worked a large order without hitting the book all at once: either as a TWAP that trades in slices over time, or as a ladder of limit orders spread across prices.

Here is why it matters. A single large market order eats through the order book and fills at worse and worse prices. The two methods avoid that in different ways:

| | TWAP | Limit ladder |
| - | - | - |
| Spreads the order over | Time | Price |
| How it fills | Market slices, automatically, until the duration ends | Only when the price reaches each level |
| Where | Hyperliquid | Hyperliquid and Polymarket |
| Good for | Getting filled with less impact | Buying dips or selling into strength at chosen prices |

## What you need

* Funds on the venue: USDC on Hyperliquid, or pUSD in your Polymarket deposit wallet. See [Fund each venue](https://docs.openfinance.tech/guides/fund-each-venue.md).
* A total size, and either a duration (TWAP) or a price range and number of levels (ladder).

## Run a TWAP on Hyperliquid

**1. Check the book first**

```text theme={"system"}
Show the Hyperliquid order book and 24 hour volume for SOL perps.
```

Compare your total size with what sits near the top of the book. That tells you whether a TWAP is worth it.

**2. Preview the TWAP**

```text theme={"system"}
Buy 20 SOL perps with a TWAP over 60 minutes, with randomized timing. Show me the total size, duration, slice count and total value before placing it.
```

**3. Start it (moves money)**

Reply yes. The TWAP now trades on its own until the duration ends.

**4. Watch the slices**

```text theme={"system"}
Show my TWAP fills so far: filled size, average price and what is left.
```

**5. Stop it early if you need to (moves money)**

```text theme={"system"}
Stop my running SOL TWAP.
```

Slices that already filled stay filled. Your position is whatever has executed so far.

## Place a limit ladder

**1. Describe the ladder**

```text theme={"system"}
On Hyperliquid, place 5 limit buy orders for ETH perps, 0.02 ETH each, spaced evenly from 2% to 6% below the current mid price, good till cancelled. Show me every order with its price before placing.
```

Several orders can go in one request, and you confirm them together.

**2. Place it (moves money)**

Check every price and size, then reply yes.

**3. Manage the ladder**

```text theme={"system"}
Show my open ETH orders. Cancel any that have not filled in 24 hours.
```

On Polymarket the same idea works with a batch of limit orders:

```text theme={"system"}
On that Polymarket market, place 4 limit buys for Yes at 0.38, 0.36, 0.34 and 0.32, 10 dollars each. Show the batch first.
```

Every order needs your confirmation, and nothing here is financial advice.

## Check it worked

* For a TWAP: the fills add up to the total size by the end, or to what filled before you stopped it.
* For a ladder: every level shows in your open orders at the price you approved.

## Common mistakes

* **Sizes that do not match the market's precision.** Hyperliquid rejects sizes with too many decimals. Let the agent round to the market's size step.
* **Prices off the tick.** On Polymarket each price must sit on the market's tick size.
* **Levels too far from the market.** Hyperliquid rejects prices too far from the current price. Keep the ladder within a sensible range.
* **Forgetting a ladder is live.** Resting orders can fill days later. Cancel what you no longer want.
* **Treating TWAP as a price guarantee.** Each slice fills at the market at that moment.

## Next guides

> [card] [Perp with take-profit and stop-loss](https://docs.openfinance.tech/guides/hyperliquid-perp-with-tp-sl.md)
>
> Attach exits once you are in.

> [card] [Hyperliquid tool](https://docs.openfinance.tech/mcp/tools-hyperliquid.md)
>
> TWAP and order parameters for your own code.


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