Docs

Use the app

Place a range order

Sell one token through a price range you choose, like a limit order, using a pool whose hook holds your order and nothing else.

A range order is a one-sided position in a pool of its own. As the price crosses the range, your token converts into the other one. When the price has passed the whole range, the order has filled: everything you deposited is now the other token, at prices inside your range, plus the pool's fee.

The range order hook makes this safe to leave alone. Once your order fills, the pool refuses any swap that would push the price back into your range, so the fill can't be undone by the market. The guard holds until you withdraw.

Place an order#

  1. Create the order's pool

    On Create, choose the pair and plug in Range order. Choose the side, Sell base above the price or Buy base below it, how far from the price the order starts, and how wide it is. Create the pool. You are its order's owner.

  2. Deposit the order

    Open the new pool. Its liquidity panel reads Range order and takes only the token you're selling. Enter the amount and press Place order.

  3. Wait for the fill

    The pool page shows the order's status and where the price is relative to the range. Anyone can swap against it; partial fills show as the price moving through the range.

  4. Withdraw the proceeds

    When the status reads Filled, go to Positions and remove 100%. You receive the converted tokens and the fees, and the pool's guard is released.

Order status#

StatusMeaning
PendingThe pool exists; the owner hasn't deposited yet.
ActiveThe order is in the pool and fills as the price crosses it.
FilledThe price has passed the whole range. Swaps that would move it back into the range are refused.
ClosedThe owner withdrew or cancelled. The guard is gone and the pool trades like any other, without an order.

Cancel an order#

Withdrawing before the order fills cancels it: you get back whatever hasn't converted yet, plus what has, plus fees. A cancelled or completed order can't be placed again in the same pool; create a new pool for the next one.

Rules the hook enforces#

  • Only the owner can add or remove liquidity in the pool, and only in the order's exact range.
  • The order must be one-sided when placed: entirely above the price when selling the base, entirely below when buying it.
  • A pool holds one order, once.