Navigating the world of trading requires a solid grasp of the tools at your disposal. Order types form the foundation of any trading strategy, allowing you to enter and exit positions with precision. On the Drift protocol, traders have access to a suite of order types designed for both simplicity and advanced tactical execution. This guide breaks down each available order type, explaining how they function within Drift's decentralized ecosystem to help you trade more effectively.
Market Orders
A market order is an instruction to buy or sell an asset immediately at the best available current market price. Its primary advantage is speed of execution.
To protect traders from excessive price movements, Drift allows you to set a maximum slippage tolerance when placing a market order. This sets an upper bound on the price you are willing to accept, effectively blending the characteristics of a market order with the price control of a limit order.
For instance, if the mark price of SOL-PERP is $100.00 and you wish to go long, you could set a maximum slippage tolerance of 0.1%. This guarantees that the worst price you would pay is $100.10. If the quoted price exceeds this limit, the order will not be filled.
Drift utilizes a 5-second Just-in-Time (JIT) auction mechanism for these orders. During this window, market makers can compete to fill your order. Once the auction concludes, the order is executed as long as the final price is within your specified slippage limit. If no market maker participates, the remaining portion of the order is filled by Drift's Decentralized Automated Market Maker (DAMM).
It is crucial to understand that a market order does not guarantee execution at the displayed mark price, as the price can change during the auction process. The final fee you pay depends on whether your order is classified as a taker or a maker. 👉 Explore more strategies for managing trading fees
Limit Orders
A limit order gives you precise control over your entry or exit price. You specify the exact price at which you want to buy or sell an asset, and the order will only execute at that price or a better one.
On Drift, a limit order is triggered when the asset's mark price reaches or crosses your predetermined limit price. Execution is handled by a decentralized network of keepers, who are incentivized to provide best-effort execution that mimics the experience of a centralized limit order book (CLOB).
For standard taker orders, the protocol guarantees that your final entry price will be equal to or better than your specified limit price. You also have the option to set a "Post-only" flag. This ensures your order provides liquidity to the pool, qualifies for a maker rebate, and will never be filled at a worse price, though it may not be filled immediately if the market moves away from your limit price.
Conditional Orders (Advanced)
Conditional orders, often called advanced orders, allow you to automate your trading strategy by executing actions based on specific market conditions.
Stop Market Order
A stop market order is designed to limit losses or protect profits. You set a trigger price, and if the asset's mark price reaches that level, the protocol automatically places a market order to close your position. This allows you to exit a trade automatically without constantly monitoring the markets.
Stop Limit Order
A stop limit order offers more control than a stop market order. You set two prices: a trigger price and a limit price. Once the mark price hits the trigger, a limit order is placed at your specified limit price. This order may be filled immediately or remain open until the limit price is met. It also acts as a maximum slippage tolerance for the stop order.
Take Profit Market Order
A take-profit market order is used to secure gains automatically. You define a trigger price where you wish to take profits. When the mark price reaches this level, a market order is automatically executed to close your position at the prevailing market price, locking in your profits.
Take-Profit Limit Order
For traders seeking more precision, the take-profit limit order is the ideal tool. It combines a profit-taking trigger with a limit price. When the mark price hits your trigger, a limit order is placed at your specified limit price. This ensures you only sell at your target price or better, though it does not guarantee execution if the market fails to reach your limit price.
Key Considerations for Conditional Orders
The relationship between your trigger price and limit price is critical for order placement and execution:
- If Trigger Price < Limit Price: The order begins to be filled once the price is below the trigger price.
- If Limit Price < Trigger Price: The order begins to be filled once the price is below the limit price.
The protocol can only detect that a trigger price has been reached if the order can be partially filled at that moment. This means some order configurations are not possible. For example, you cannot set a long order with a trigger price above the market and a limit price below it, as the system cannot logically detect the higher price being hit before trying to fill at the lower price. Understanding these mechanics is vital for setting up effective automated strategies. 👉 Get advanced methods for setting conditional orders
Order Flags
Order flags provide additional instructions to fine-tune how your orders are executed on the protocol.
- Reduce-only: This flag ensures the order will only reduce your existing position size. It prevents the order from increasing your position or reversing it from long to short (or vice versa).
- Post-only: This flag ensures your order is posted to the order book to provide liquidity. It guarantees you will receive a maker rebate and that the order will never be a taker, though it may not fill immediately.
- Immediate or Cancel (IOC): This flag instructs that the order must be filled immediately, even if only partially. Any portion of the order that cannot be filled right away is automatically canceled.
Frequently Asked Questions
What is the main difference between a market and a limit order?
A market order prioritizes speed of execution, buying or selling immediately at the best available market price. A limit order prioritizes price control, executing only at your specified price or better, but with no guarantee of immediate filling.
How does slippage tolerance work with a market order?
Slippage tolerance sets the maximum price change you are willing to accept for a market order. It acts as a protective cap, preventing your order from being filled at an unexpectedly unfavorable price if the market moves rapidly during the few seconds it takes to execute.
When should I use a stop-limit order instead of a stop-market order?
Use a stop-limit order when you want to control the exact exit price after your trigger is hit, accepting the risk that the order might not fill if the market gaps through your limit price. A stop-market order prioritizes guaranteed execution at the next available price after the trigger, offering less control but more certainty of exit.
What does 'Reduce-only' mean?
The reduce-only flag is a risk management tool. It ensures an order can only decrease the size of an existing open position. It will never open a new position or flip a long position to short (or a short to long).
Can I set a take-profit and a stop-loss order at the same time?
Yes, this is a common strategy known as a bracket order. You can set a take-profit order to lock in gains at a target price and a separate stop-loss (stop-market or stop-limit) order to limit potential losses, automating your risk management for a single position.
Who executes my orders on Drift?
Limit and conditional orders are executed by a decentralized network of participants called "keepers." These keepers are economically incentivized to provide competitive execution, similar to market makers on centralized exchanges, ensuring the ecosystem remains efficient and liquid.