Skip to main content

Order Types Overview

Roxom supports four main order types, each designed for different trading strategies and market conditions.

Market Orders

Execute immediately at the current market price.

Characteristics

  • Execution: Immediate (fills against existing orders in the order book)
  • Price: Not specified (takes the best available price)
  • Guarantee: Execution is guaranteed (if sufficient liquidity exists)
  • Priority: Highest execution priority

When to Use

  • Immediate execution is more important than price
  • High liquidity markets where slippage is minimal
  • Emergency exits from positions
  • Small order sizes relative to market depth

Example

{
  "symbol": "OIL-BTC",
  "instType": "perpetual",
  "side": "buy",
  "orderType": "market",
  "qty": "100"
}
For BUY market orders:
  1. Matches against the lowest ask prices first
  2. Continues up the ask side until filled
  3. May execute at multiple price levels for large orders
For SELL market orders:
  1. Matches against the highest bid prices first
  2. Continues down the bid side until filled
  3. May execute at multiple price levels for large orders
Price Impact: Large market orders may move the market priceSlippage Protection: Consider using limit orders for large sizesMarket Depth: Check order book depth before placing large market orders

Limit Orders

Execute only at a specified price or better.

Characteristics

  • Execution: Only at the specified price or better
  • Price: User-specified limit price
  • Guarantee: Price is guaranteed, execution is not
  • Priority: Price-time priority in the order book

When to Use

  • Price control is important
  • Patient trading where timing is flexible
  • Market making strategies
  • Large orders to minimize market impact

Example

{
  "symbol": "OIL-BTC",
  "instType": "perpetual",
  "side": "buy",
  "orderType": "limit",
  "qty": "100",
  "px": "50000",
  "timeInForce": "gtc"
}
BUY Limit Orders:
  • Will only execute at the limit price or lower
  • Becomes a maker order if price is below current market
  • Becomes a taker order if price matches existing asks
SELL Limit Orders:
  • Will only execute at the limit price or higher
  • Becomes a maker order if price is above current market
  • Becomes a taker order if price matches existing bids
GTC (Good Till Canceled): Remains active until filled or manually canceledIOC (Immediate or Cancel): Executes immediately for the available quantity, cancels remainderFOK (Fill or Kill): Executes completely or cancels entirely

Stop Orders

Market orders triggered when a stop price is reached.

Characteristics

  • Execution: Becomes a market order when stop price is hit
  • Price: Stop price triggers the order
  • Use Case: Risk management and momentum trading
  • Direction: Stop price is typically worse than current market

When to Use

  • Stop losses to limit downside risk
  • Breakout trading when price moves beyond resistance/support
  • Risk management for existing positions
  • Automated exits based on price movement

Example

{
  "symbol": "OIL-BTC",
  "instType": "perpetual",
  "side": "sell",
  "orderType": "stop",
  "qty": "100",
  "triggerPx": "49000"
}
For SELL Stop Orders (Stop Loss):
  • Triggers when market price ≤ stop price
  • Common for closing long positions
  • Protects against downward price movement
For BUY Stop Orders (Stop Buy):
  • Triggers when market price ≥ stop price
  • Common for closing short positions or breakout trading
  • Protects against upward price movement
No Price Guarantee: Once triggered, executes as market orderGap Risk: May execute at prices far from stop price during gapsTrigger Method: Uses last trade price for trigger determination

Stop-Limit Orders

Limit orders triggered when a stop price is reached.

Characteristics

  • Execution: Becomes a limit order when stop price is hit
  • Price: Both stop price (trigger) and limit price (execution)
  • Control: Combines stop trigger with price protection
  • Risk: May not execute if market gaps past limit price

When to Use

  • Price protection with stop functionality
  • Controlled exits where execution price matters
  • Risk management with price limits
  • Volatile markets where gaps are common

Example

{
  "symbol": "OIL-BTC",
  "instType": "perpetual",
  "side": "sell",
  "orderType": "stoplimit",
  "qty": "100",
  "triggerPx": "49000",
  "px": "48900"
}
Two-Step Process:
  1. Trigger Phase: Monitors market price vs stop price
  2. Execution Phase: Places limit order when triggered
Price Relationship:
  • Stop price determines when order activates
  • Limit price determines execution constraints
  • Limit price should be more aggressive than stop price
Normal Execution: Stop triggers, limit order fills normallyPartial Fill: Stop triggers, limit order partially fillsNo Fill: Stop triggers, but market gaps past limit priceQueue Position: Limit order joins order book queue when triggered

Order Comparison

Order TypeExecution SpeedPrice ControlExecution Guarantee
MarketImmediateNoneHigh
LimitVariableFullNone
StopImmediate (when triggered)NoneMedium
Stop-LimitVariable (when triggered)FullLow

Trading Strategies

Primary Orders: Limit orders for entry and exitStop Losses: Stop or stop-limit orders for risk managementExecution: Fast in-and-out trades with tight spreads
// Entry
{"type": "LIMIT", "price": "45000.00", "side": "BUY"}

// Take Profit  
{"type": "LIMIT", "price": "45100.00", "side": "SELL"}

// Stop Loss
{"orderType": "stoplimit", "triggerPx": "44950.00", "price": "44940.00", "side": "sell"}
Entry: Limit orders at support/resistance levelsExits: Combination of limit orders (profit targets) and stop orders (losses)Time Frame: Positions held for days to weeks
// Entry at support
{"type": "LIMIT", "price": "44500.00", "side": "BUY"}

// Profit target
{"type": "LIMIT", "price": "47000.00", "side": "SELL"}

// Stop loss
{"orderType": "stop", "triggerPx": "43500.00", "side": "sell"}
Entry: Stop orders to catch momentumConfirmation: Wait for price to break key levelsRisk Management: Quick stops if breakout fails
// Breakout entry
{"orderType": "stop", "triggerPx": "45500.00", "side": "buy"}

// Profit target
{"type": "LIMIT", "price": "46500.00", "side": "SELL"}

// Stop loss
{"orderType": "stop", "triggerPx": "45200.00", "side": "sell"}

Best Practices

Market Orders: Use for small sizes in liquid marketsLimit Orders: Use when price is more important than timingStop Orders: Use for risk management and momentum playsStop-Limit: Use when you need both trigger and price control
Always use stops: Protect every position with appropriate stop ordersSize appropriately: Larger orders may require different order typesMonitor liquidity: Check order book depth before large ordersTest strategies: Use paper trading to test order type combinations
Network latency: Affects market order execution timingMarket hours: Some order types may behave differently during off-hoursVolatility: High volatility affects stop order executionOrder book dynamics: Understanding market microstructure helps order selection
I