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

# Limit Orders

> Place, update, and cancel resting orders.

## Place

```python theme={null}
await client.trade.limit_open(
    "ETH/USD", "long",
    collateral=100,
    leverage=10,
    price=3200,              # trigger price
    take_profit=4000,        # optional
    stop_loss=3000,          # optional
)
```

| Parameter                   | Default  | Notes                                         |
| --------------------------- | -------- | --------------------------------------------- |
| `price`                     | required | Execution price for the resting order         |
| `stop`                      | `False`  | `True` places a stop-limit instead of a limit |
| `slippage_percent`          | `1`      | Max slippage at execution                     |
| `take_profit` / `stop_loss` | `None`   | Attached to the eventual position             |

<Note>
  Limit opens **escrow the USDC collateral on placement**. Cancelling refunds it. On the relayer route this uses the passthrough (same path as the Avantis UI), so it is still gasless.
</Note>

<Warning>
  [Upside pairs](/data/markets#upside-markets) are market-only — `limit_open` on one raises a `ValidationError` (`UPSIDE_MARKET_ONLY`) before any network call.
</Warning>

## Update

Standing orders are addressed by `pair` + `order_index` (from `limit_orders` in [positions](/account/positions)):

```python theme={null}
orders = (await client.account.positions()).limit_orders
o = orders[0]

await client.trade.update_limit_order(
    o.pair_index, o.index,
    price=3150,
    take_profit=4100,
)
```

## Cancel

```python theme={null}
await client.trade.cancel_limit_order(o.pair_index, o.index)   # refunds escrow
```
