Trading in decentralized finance (DeFi) platforms requires a solid grasp of order types to execute strategies effectively. Drift, a decentralized perpetual futures exchange, supports several advanced order types that empower traders with precision, automation, and risk control. This guide breaks down the core order types available on Drift—market orders, limit orders, and conditional/advanced orders—along with essential execution flags and practical use cases.
Whether you're managing risk, locking in profits, or aiming for optimal entry points, understanding these tools is key to maximizing your trading performance in volatile markets.
👉 Discover powerful trading tools designed for precision and speed.
Market Orders: Instant Execution with Slippage Control
A market order allows traders to buy or sell an asset at the best available current price. On Drift, this type of order prioritizes speed over price precision, making it ideal for traders who want immediate execution.
One unique feature of Drift’s market orders is the ability to set a maximum slippage tolerance. This acts as a safety net, ensuring your order won’t execute beyond a specified price deviation from the mark price. In effect, it combines the immediacy of a market order with the price protection of a limit order.
For example:
- If the mark price of SOL-PERP is $100.00 and you set a slippage tolerance of 0.1%, your order will not fill above $100.10 (for longs) or below $99.90 (for shorts).
- If the executed price exceeds this threshold due to volatility or low liquidity, the order will be rejected.
Market orders on Drift are processed through a 5-second Just-In-Time (JIT) auction, during which market makers can step in to fulfill the trade. If no maker participates, the Decentralized Automated Market Maker (DAMM) steps in to complete the fill—provided it stays within your slippage bounds.
Note: A market order does not guarantee execution at the displayed mark price. Prices may shift during the JIT auction window due to market movement.
Trading fees depend on whether your order acts as a taker (removes liquidity) or interacts with the DAMM (typically taker behavior). For full details, refer to Drift’s fee structure documentation.
Limit Orders: Precision Entry and Exit
A limit order lets traders specify the exact price at which they want to buy or sell an asset. Unlike market orders, limit orders only execute when the market reaches your predefined price, giving you greater control over entry and exit points.
On Drift:
- Limit orders are triggered when the mark price reaches or crosses the specified limit price.
- They are fulfilled by a decentralized network of keepers, who monitor and execute orders based on economic incentives.
- Execution follows a "best-effort" approach, mimicking the behavior of centralized limit order books (CLOBs) while operating fully on-chain.
For taker limit orders, your fill price is guaranteed to be equal to or better than your stated limit price. This ensures favorable execution even in fast-moving markets.
Additionally, traders can use the “Post-only” flag to ensure their limit order doesn’t execute immediately as a taker. When successful, these orders add liquidity to the system and qualify for a 0% trading fee, plus potential rebates funded by taker surplus (after accounting for keeper rewards capped at 5 basis points).
👉 Access advanced order types with low-latency execution.
Conditional (Advanced) Orders: Automate Your Strategy
Drift supports several conditional order types that help automate risk management and profit-taking strategies without requiring constant monitoring.
Stop Market Order
A stop market order automatically triggers a market sell (or buy) when the mark price hits a predefined trigger price. It's commonly used to:
- Limit losses on an existing position
- Exit a trade if momentum reverses
Once the trigger price is reached and detected by a keeper, a market order executes immediately at prevailing prices.
Stop Limit Order
This order triggers a limit order when the mark price reaches the trigger price. The key difference from a stop market order is that execution occurs only at the specified limit price or better.
Use this to avoid slippage during sharp moves—but note: if the market gaps past your limit price, the order may not fill at all.
Pro Tip: A stop limit order also functions as a maximum slippage tolerance mechanism for stop orders.
Take Profit Market Order
A take profit market order closes a position automatically when the mark price reaches a desired level. When triggered, it places a market order to lock in gains—ideal for securing profits in trending markets.
Take Profit Limit Order
Similar to its stop counterpart, this triggers a limit order when the target price is hit. It allows traders to define exactly where they want to exit, ensuring they don’t undersell in bullish runs.
However, partial fills play a crucial role in trigger detection:
- The protocol can only confirm a trigger has been hit if the order has already been partially filled.
- This creates constraints on certain configurations.
Valid Trigger & Limit Price Combinations
| TriggerIsAbove | DirectionIsLong | LimitPrice Requirement |
|---|---|---|
| True | True | Must be above trigger |
| True | False | Allowed |
| False | True | Allowed |
| False | False | Must be below trigger |
Example:
You cannot place a long with a trigger > $140 and a limit price of $135—because once price drops to $135, there's no way to prove it previously crossed $140.
But if the trigger is < $140 and limit is $135, partial filling confirms both levels were hit.
Another scenario: A long with trigger < $140 and limit $141 will begin filling once price crosses $140, up to $141.
Order Flags: Enhance Control and Efficiency
Beyond basic execution logic, Drift allows traders to attach order flags for refined control:
- Reduce-only: Ensures the order reduces or closes an existing position but never increases or reverses it. Useful for avoiding accidental directional flips.
- Post-only: Forces the order to act as a maker. If it would immediately match as a taker, it’s canceled instead—ideal for earning fee rebates.
- Immediate or Cancel (IOC): Executes what it can instantly; any unfilled portion is canceled. Great for avoiding lingering exposure.
These flags allow sophisticated trade management directly within the order parameters.
Frequently Asked Questions (FAQ)
Q: Can I guarantee my market order fills at the current mark price?
A: No. Due to the 5-second JIT auction process, prices may change before execution. Setting slippage tolerance helps protect against unfavorable fills.
Q: What happens if no market maker participates in the JIT auction?
A: The DAMM steps in to fulfill the remaining volume, as long as prices stay within your slippage limits.
Q: Why didn't my stop limit order trigger even though price reached my level?
A: Drift relies on partial fills to confirm trigger events. If your order wasn’t fillable at any point near the trigger, detection fails—especially with restrictive limit prices.
Q: How do I earn rebates on limit orders?
A: Use the “Post-only” flag to provide liquidity. Successful post-only orders receive 0% fees and may earn rebates from taker surplus.
Q: Are conditional orders executed centrally?
A: No. All conditional orders are monitored and executed by a decentralized network of keepers incentivized to act honestly and promptly.
Q: Can I use multiple flags on one order?
A: Yes, though some combinations may conflict (e.g., IOC and Post-only). Always test logic before live deployment.
Ready to apply these strategies? Drift enables seamless integration of digital assets as collateral for trading, yield generation, and borrowing—all within a non-custodial environment.