Perpetual Order Types

Perpetual DEXs offer the same order types as centralized exchanges - market, limit, stop-loss, take-profit, and trailing stop - but the execution mechanics differ dramatically between AMM-based designs (GMX) and orderbook-based designs (dYdX, Hyperliquid). Choosing the right order type for your leverage level is one of the highest-impact risk management decisions a perp trader makes.

Order Types at a Glance

* Market Order
Execute immediately at the best available price. Zero slippage on deep GMX pools; thin book = worse fill on dYdX.
Speed: Instant Slippage: Variable Available: All venues
Limit Order
Rest in the book until price reaches your level. No slippage, but may never fill. Maker rebate on dYdX/Hyperliquid.
Speed: Conditional Slippage: None Available: All venues
Stop-Loss
Trigger a market close when price crosses your level. Essential at high leverage. Keeper-dependent on GMX.
Speed: Triggered Purpose: Risk mgmt Available: All venues
Take-Profit
Close position when price reaches target. Locks in gains automatically. Tethered to market or limit close.
Speed: Triggered Purpose: Lock profit Available: All venues
Trailing Stop
Dynamic stop that follows price upward. Locks in gains while letting winners run. GMX: not natively supported.
Speed: Dynamic Purpose: Ride trends Available: dYdX, Hyperliquid only

Order Execution Visualizer

Select an order type to see how it executes on a price chart. Watch where entry, trigger, and exit levels sit relative to the price path.

Market order: executes immediately at $2,050. Your order fills at whatever the current oracle/mid price is - no price control, but guaranteed execution. On GMX, slippage is effectively zero for most order sizes; on dYdX, you take the top-of-book ask or bid.

? $10,000 Account 5x Leverage Market vs Limit Entry

Compare market vs limit entry at different price levels. Same account ($10,000), same leverage (5x = $50,000 position). Watch how the entry price affects your liquidation buffer and cost basis.

MARKET ENTRY @ $2,050
Position Size$50,000 (5x)
Margin Required$10,000
Entry Price$2,050.00
ETH Equivalent24.39 ETH
Liquidation Price$1,640
Buffer to Liq20.0%
Cost Basis$2,050/ETH
Open Fee (0.1%)$50.00
Fill immediately. You pay the oracle price with near-zero slippage on GMX. Liquidation at $1,640 - a 20% drop from entry wipes you out.
LIMIT ENTRY @ $2,000
Position Size$50,000 (5x)
Margin Required$10,000
Limit Entry Price$2,000.00
ETH Equivalent25.00 ETH
Liquidation Price$1,600
Buffer to Liq20.0%
Better Entry By+$50.00 (2.5%)
Maker Rebate (dYdX)?$12.50
Order rests in book. No fill yet. If price drops to $2,000, you fill at a better price than market - 2.5% better entry, lower liquidation risk, and you collect a maker rebate on dYdX. May miss the move entirely if price doesn't reach you.
Side-by-Side: Same $10K 5x $50K Position

Order Type Support by Protocol

GMX V2
Oracle-based Pool execution
MarketOK Immediate
LimitOK Keeper resting
Stop-LossOK Keeper-triggered
Take-ProfitOK Keeper-triggered
Trailing StopX Not native
Max Leverage100x
Uses keeper bots to fill conditional orders against Chainlink + FastPriceFeed oracle. No order book - orders execute against the GM pool.
dYdX V4
Full CLOB Off-chain matching
MarketOK Top of book
LimitOK Full book rest
Stop-LossOK Native trigger
Take-ProfitOK Native trigger
Trailing StopOK Native support
Max Leverage20x
All orders rest on the order book with sub-second finality. Matching is deterministic - your fill price is exact.
Hyperliquid
On-chain L1 Full CLOB
MarketOK Instant fill
LimitOK Full book rest
Stop-LossOK Native trigger
Take-ProfitOK Native trigger
Trailing StopOK Native support
Max Leverage50x
On-chain order book with HyperBFT consensus. All order types native - no keeper dependency. Sub-second finality.

? On-Chain Execution Risks

Oracle Latency

GMX's oracle updates every few seconds - in a fast crash, your stop triggers at the first oracle snapshot after price crosses your level, not at your exact trigger price. In a 10% candle that takes 30 seconds, your stop may execute 5-8% below the trigger.

Keeper Execution Delay

Conditional orders on GMX rely on keeper bots to watch prices and submit the execution transaction. During network congestion, keepers queue up and execution can be delayed by several seconds - enough for price to move significantly in volatile markets.

vAMM Price Impact

Large market orders on GMX push the virtual reserve price against you. A $1M market order can move price 0.1-0.5% depending on pool depth and open interest. Use limit orders for large positions to avoid AMM slippage.

CLOB Deterministic Execution

dYdX and Hyperliquid match orders deterministically - your limit order fills at exactly your price or not at all, with no oracle delay and no keeper dependency. This makes order execution predictable in ways AMM-based designs cannot match.

Key rule: At 5x leverage, a 20% adverse move liquidates you. At 20x, a 5% move is fatal. On GMX, always use isolated margin. On dYdX/Hyperliquid, use trailing stops instead of fixed stop-losses when the trend is strong - a trailing stop locks in more profit than a fixed stop as the price moves in your favor.

Frequently asked questions

What's the difference between market and limit orders on a perp DEX?
A market order executes immediately at the best available price - on GMX that means the oracle price with zero slippage up to pool depth. A limit order only fills if the market reaches your price or better; on dYdX and Hyperliquid it rests on the order book and fills as a maker. Market orders guarantee execution but not price; limit orders guarantee price but not execution. For large positions on AMM-based DEXs like GMX, a limit order is structurally better because you avoid the vAMM price impact.
How does a stop-loss actually trigger on-chain?
Most perp DEXs use keeper bots to monitor positions. The keeper watches the mark price; when it crosses your stop price, the keeper submits a liquidatePosition (or closePosition) transaction on your behalf. On orderbook DEXs (dYdX v4, Hyperliquid), the matching engine handles this natively - the order sits in the book as a resting order that triggers when price is hit. On oracle-based DEXs like GMX, there's a keeper delay of potentially several seconds, which means your stop may execute at a worse price than the trigger level during fast market moves.
Why can't GMX support trailing stops natively?
GMX's oracle-based model has no order book to rest a conditional order in - every position is priced against Chainlink and the FastPriceFeed, which are snapshot prices rather than continuous resting orders. A trailing stop requires tracking a dynamic high-water mark and triggering when price falls a fixed offset below it. This requires either a keeper that monitors your position and submits when triggered, or protocol-level support. GMX has not added this natively because it would require a new execution path that differs from its keeper-based liquidation model. dYdX and Hyperliquid support trailing stops as native order types precisely because their order books are purpose-built for conditional orders.
What happens to a limit order during a cascade liquidation?
On orderbook DEXs, a resting limit sell below current price gets filled as the market drops through it - potentially at a much worse price than expected if depth is thin. On GMX, a stop-loss limit order sits in the keeper system; during a cascade, keeper networks can get overwhelmed and the order may fire late or at the first available oracle price after the trigger. The safest approach is to set stops below key liquidation levels with enough buffer that you don't get caught in the cascade's first wave.
What's the difference in slippage between AMM and orderbook execution?
GMX-style AMM execution shows zero slippage up to the pool's available depth at the oracle price - the trade hits the pool's virtual reserves and price moves along the constant-product curve, but the impact is bounded by pool size and OI caps. For a $10,000 order on a deep GM pool, slippage might be 0.01-0.05%. A dYdX or Hyperliquid market order fills at the top of the book - tight spreads but if the book is thin, even small orders can walk the price. For very large orders (>$1M), AMM slippage grows quadratically while orderbook slippage depends on maker depth at each level.
Should I use cross-margin or isolated margin when placing orders?
Isolated margin is almost always better for leveraged orders. With isolated margin, your margin in one position is locked - if it gets liquidated, your other positions are unaffected. Cross-margin ties your entire account equity to every position, meaning a loss on one position can trigger liquidation on unrelated positions. The only time cross-margin helps is if you have a very high conviction trade and want to maximize capital efficiency, but the liquidation cascade risk is severe - one bad trade wipes everything.
How does leverage affect order type suitability?
At low leverage (2-5x), market orders are generally fine - your liquidation buffer is wide enough that execution slippage is unlikely to trigger it. At high leverage (20x+), use limit orders to control your entry price precisely, and always use stop-losses set below your liquidation price. Trailing stops are powerful at any leverage but only available on dYdX and Hyperliquid - on GMX you must manually manage stops via a keeper bot. The higher the leverage, the more critical it is to know your exact liquidation price before placing any order.