All Order types
Drift supports several advanced order types:
Trigger Market
A market order that activates when the trigger price condition is met. Used for Stop Loss (Stop Market) and Take Profit orders.
- Triggers on the configured reference price (see trigger mechanics below).
- Once triggered, it behaves like a market order.
Trigger Limit
A limit order that activates when the trigger price condition is met. Used for Stop Limit and Take Profit Limit orders.
- Lets you specify trigger price and limit price separately.
- Fill is not guaranteed if the market trades through and never touches the limit.
Trigger Order mechanics
Trigger orders (Stop Market / Stop Limit / Take profit market / Take profit limit) activate off a trigger price.
The trigger price is computed as the median of the following three values:
-
Oracle Price Adjustment
Oracle Price + (Mark Price 5min TWAP − Oracle Price 5min TWAP)
-
Last Trade Price
-
Oracle Price with Funding Adjustment
Oracle Price × (1 + Last Funding Rate × (Time Until Next Funding / Funding Period))
The median of these three values is used as the trigger price.
Example: If the three calculated prices are 100.2, 100.5, and 100.1, the trigger will use 100.2 as the median.
Oracle Limit
An Oracle Limit Order allows you to specify an offset rather than limit price to execute your order. The offset represents the price above/below the current Oracle Price you want to be filled at. It's important to note that these orders can fill at any time the offset is met, so long as the account collateral is sufficient.
Scale
Submit multiple limit orders across a user‑defined price range to build or unwind a position gradually.
- You define range, number of orders, and size distribution.
Order flags
These flags can be combined with the order types above.
- Reduce‑Only: Enforces that the order will never increase or reverse the current position (go from long to short, or short to long).
- Post‑Only: : Enforces that the order is a maker order that can provide liquidity to the pool for a reduced exchange fee (0%). Without this flag, orders that don't execute immediately are not post-only.
- Immediate‑or‑Cancel (IOC): An order that is placed and potentially partially filled. The remainder that is not filled immediately is then cancelled.