# What is a Limit Order?

• Updated

Limit orders can now be submitted through our UI, API, or smart contract.

Limit orders use a limit price trigger for market buys or sells at a particular price, allowing you to enter or exit a position at your limit price or better.

For example, if you're bullish on ETH and want to buy at a lower price than it's currently worth, you can submit a limit order to buy 10% lower than the current price. Once the mark price falls and crosses the limit price, you'll automatically buy ETH without having to manually execute the trade.

This is different to a market order, which only lets you buy or sell immediately at the best available price. It’s important to remember that while market orders prioritize time, limit orders prioritize price

So if you want to quickly get into a position and you’re not sensitive to the price, then a market order is best. On the other hand, if you want to open a position at a certain price and you’re not sensitive to the timing, then you should use a limit order.

Limit order tl;dr

Key points to know when using limits & stops:

• Limit orders on Perp are executed as market orders when triggered.
• Fill price must equal your trigger price (or better), taking into account price impact—therefore your trigger price appearing on the chart does not guarantee your order will be filled⁠.
• There are no partial fills⁠—an order must be able to fill 100% at the set price.
• Stop-loss limit orders trigger on index price, and then execute as normal limit orders (trigger on mark price).
• Limit orders with the same trigger price execute in random order (whichever order DynamoDB finds first will trigger first)⁠.
• During strong price movements, some orders may cause the per-timestamp price change limit to be exceeded. An order may not fill if this is the case.

• Improved risk management
• Enable more sophisticated trading strategies

Unlike on centralized exchanges, limit orders are automated market orders that use the liquidity provided by makers.

An off-chain database (LimitOrderBook) stores limit orders, where a keeper bot monitors new limit orders and sends a transaction for you once the trigger condition has been met. The off-chain order book will be opened up in the future so that anyone can run their own keeper bot and execute limit orders for traders.

## Enabling Limit Orders

To start using limit orders, there is a one-time approval that must be completed, where you must approve the LimitOrderBook contract to open positions.

Change order type to "Limit" and click on “Approve Limit Order” as shown below:

This only needs to be done once. If you see Approve Limit Order again, please refresh the page.

Limit orders have a minimum position requirement of $100. Once changing the order type and choosing long or short, you can then enter your limit price in the price field and decide on the position size in the amount field (or via the buying power slider): The expiration of the limit order can be modified. Select from the options from the dropdown menu by clicking on the clock icon (options vary between 5 minutes and one week). Click on “Confirm Limit Order”. The submission of the limit order is done off-chain, so you’ll just have to submit a signature from your wallet and there are no gas or trading fees when submitting limit orders. Once you’ve provided your signature, the order will appear under the Limit Orders tab until it is executed: When the mark price (plus price impact) reaches the limit price, the order will be executed and your position will be opened. You do not pay any trading fee until the filing of your limit order. Gas fees are paid for by the keeper bot. The execution price of a limit order may differ depending on slippage and execution may depend on liquidity. There are no partial fills with advanced order types and limit orders will either be fully executed or not at all. Once a limit order has been executed it will be shown in the fills column and in your transaction history. ## Canceling a Limit Order If you want to cancel a limit order before it has been executed, then click on "Cancel" and confirm in your wallet. As mentioned above, cancellations are done on-chain so you will need to pay a gas fee. You can also prevent a limit order from executing by removing liquidity, or reducing your position size if you used Reduce Only, causing the limit order to fail if the trigger price is reached. ## Reduce-only Option There’s also a reduce-only option for limit orders, which can be used whenever you want to strictly reduce the size of an open position. For example, if you are long ETH-USD, you can use a reduce-only order to sell to make sure it only partially or fully closes the existing long position. This would prevent a short from opening in the event the position was liquidated or otherwise reduced in size prior to the limit order executing. To submit a reduce-only limit order, you must already have an existing position for a given asset. Tick the checkbox next to "Reduce Only" on the UI before submitting the order: A new slider will appear. 'Buying power' is now replaced with 'position size' when using the reduce-only option, prompting you to specify the percentage of your existing position you want to close: Click on "Confirm Limit Order" and it will be submitted. This order will only ever decrease the size of your existing position, unlike a standard limit order which will be executed once the market price reaches the limit price. ## Price Impact & Slippage • Slippage: unexpected difference in price between creation and execution of an order. • Price impact: expected movement of price caused by a trade, given current liquidity. As with market orders, limit orders may be affected by slippage and price impact. Depending on market conditions, the fill price may differ slightly to the limit price (slippage), and depending on liquidity, your order may not get filled when expected (price impact). Slippage may have an impact on the execution and timing of your limit orders. If there’s a rapid price movement, the order may fail due to slippage being higher than the slippage tolerance you have set. Price impact may have a similar effect. If there is a change in liquidity, or liquidity is low, your order may not be able to fill at the set price and will not execute (the system does not support partial fills). The likelihood of a fill depends on the position size of the order and our liquidity. If the order is too large, the price impact may put the execution price outside of the trigger threshold. Let’s look at an example to illustrate. Suppose you want to place a limit order at$3 for APE-USD with position size of 3,500 APE. The price impact at the current price is 1.095%, which can be seen by entering the details for your limit order as a market order.

Assuming the level of liquidity is the same around the current price and your limit price, with a limit price of $3 and a price impact of 1.095%, this limit order will push the mark price to$3 * 1.01095 = $3.03285. Because of the price impact, the mark price must cross below$2.96715 (\$3 * 0.98905) to fill the limit order.

However, the level of liquidity may be different at the limit price you desire. If there’s less liquidity around your limit price than the current price, there will be a greater price impact, and the mark price required for a fill will diverge more from the limit price set.

You can check the charts listed here for a market’s pool to see the liquidity distribution.

In the case where the mark price meets your limit price, but because of price impact it is not executed, you will see the following note under the limit order tab:

Limit price not met by market price. Reduce order size or adjust limit price to increase fill chance.

At this stage, users can just wait, or cancel the order.