Use the app
Place a range order
Sell one token through a price range you choose, like a limit order, in a pool on Socket's range order hook. Claim the proceeds any time after the fill, or cancel an unfilled order.
A range order is a one-sided position that sells one token for the other as the price crosses a range you choose. When the price has passed the whole range, the order has filled: everything you put in is now the other token, at prices inside your range.
Orders are placed through the range order hook, RangeOrderHook, which holds each order as a one-sided position in a pool on that hook. Many owners' orders and ordinary LP positions share one pool. The swap that takes the price all the way through an order also takes the order out of the pool, in the hook's afterSwap call, so a filled order can't convert back. You claim the proceeds whenever you like.
Sell at a price from Swap#
The quickest way to place one. On Swap, choose Sell at a price, enter how much you're selling, and set the price. The order goes into the pair's Range order pool. Its range starts at or just above your price, on the pool's tick grid, so the order never sells below it. The panel beside it shows the range the order sells through and what you receive when it fills. Press Place order and confirm.
Place an order from a pool#
To choose the side and the range yourself:
Open a Range order pool
Go to Pools and open a pool marked Range order. If the pair has none, create one on Create (Create a pool).
Choose the side
Choose Sell base above the price or Buy base below it. The order sits entirely on one side of the current price, so it takes only the token it sells.
Set the range
Type where the order starts and ends, or drag its edges on the chart. The edges snap to the pool's tick spacing, so the range is a multiple of it.
Place the order
Enter the amount and press Place order. The first time you sell an ERC-20 token, approve it. Then confirm the transaction. The order appears under Range orders on Positions and on the pool page.
Claim the proceeds
When the status reads Filled, press Claim. You receive the converted tokens.
Order status#
| Status | Meaning |
|---|---|
| Open | The order is in the pool. While the price is inside its range, part of it has converted. |
| Filled | The price has passed the whole range. The order is out of the pool, all in the other token, ready to claim. |
| Claimed | The owner took the proceeds. |
| Cancelled | The owner took the order back before it filled. |
Cancel an order#
An open order can be cancelled. Press Cancel on it: the hook takes the order out of the pool and returns what it holds to your wallet.
Rules the hook enforces#
- An order sits entirely on one side of the current price when it is placed.
- Its range is in multiples of the pool's tick spacing.
- The swap that takes the price through the whole range takes the order out of the pool, in the same swap.
- A filled order stays filled until its owner claims it.
- Only the owner claims or cancels an order.