What are stop orders and how to use them?
A stop order is a type of market or limit order that executes when the price of an asset reaches a specified trigger price, also known as a stop. These types of orders are commonly used to limit losses by automatically closing a position.
On dYdX, the triggering of stop orders can occur either by the index price or the last trade price, whichever comes first. The last trade price refers to the price at which the asset was last traded on dYdX, while the index price is an aggregate price based on data sourced from multiple exchanges.
There are three main types of stop orders:
- Stop market order - will execute only when the index price crosses a specified stop price. Once the index price touches your stop price, a market order will automatically be placed to market buy/sell your order amount. Stop market orders can be used to limit losses on your positions by automatically closing them when the price falls below (for longs) or rises above (for shorts) the stop price. Once triggered, the resulting market order will be immediately filled at the best price on the books.
- Stop limit order - will execute only when the index price crosses a specified stop price. Once the index price touches your stop price, a limit order will automatically be placed to limit buy/sell your order amount. Stop limit orders can be used to limit losses on your positions by automatically closing them when the price falls below (for longs) or rises above (for shorts) the stop price. Once triggered, the resulting limit order may either be immediately filled or may rest on the orderbook at the limit price. The limit price operates exactly the same as for normal limit orders.
- Trailing stop order - Orders allow traders to protect gains by enabling a position to remain open and continue to profit as long as the price is moving in their favor. Note: Trailing stop orders execute as market orders when they are triggered and so can execute at any price, even a worse price than what they are triggered at. If there is not enough liquidity to fill your order, it will be canceled.
A type of market or limit order that is designed to trigger and execute a trade when an asset reaches a specific price known as the trigger price.
A price set by the trader at which a stop order is to be automatically triggered.
Last Trade Price
The price at which an asset was last traded on dYdX.
The index price used for triggering stop orders is an aggregate price based on multiple exchanges, but is off-chain and therefore updates much quicker to ensure accurate stop order triggers which is very important in times of rapid market fluctuation.
Slippage refers to the discrepancy between the expected price of an asset at the time an order is triggered and the actual price at which the trade is executed.