Order Types
A comprehensive guide to Ostium's seven order types, their triggering mechanisms, and execution behaviors.
Overview
Ostium supports seven distinct order types designed to provide traders with execution experiences similar to traditional markets. These order types are categorized into two fundamental execution mechanisms:
Market Orders — Triggered by the mid-price and executed at the bid or ask price
Limit Orders — Triggered and executed at the bid or ask price selected by the user
Open Trade Orders
Ostium supports three types of orders for opening positions:
Open Market
Trigger: Most recent mid-price (immediate execution)
Execution: At bid/ask price
Classification: Market order
Behavior: Order is triggered immediately after the request is received onchain
Rationale: This is a textbook market order, providing immediate execution at the current market conditions
Open Limit
Trigger: Execution price (bid/ask) crossing user's limit price
Execution: At the execution price that crossed the limit
Classification: Limit order
Behavior: Ensures execution only occurs when the trade can be filled at the limit price chosen by user or better
Rationale: The mid-price crossing the limit is insufficient; execution only occurs when the actual trade price (bid/ask) reaches the limit, ensuring the user gets their desired price or better
Open Stop
Trigger: Mid-price crossing user's stop price
Execution: At bid/ask price
Classification: Market order
Behavior: Functions as a market order once triggered
Rationale: Follows market conventions where traders expect stop orders to be triggered as market orders. Traders can use limit orders instead if they want to ensure execution at specific prices
Close Trade Orders
Ostium supports four types of orders for closing positions:
Close Market
Trigger: Most recent mid-price (immediate execution)
Execution: At bid/ask price
Classification: Market order
Behavior: Equivalent to Open Market order
Rationale: Provides immediate position closure at current market conditions
Take-Profit (TP)
Trigger: Execution price (bid/ask) crossing user's TP price
Execution: At the execution price that crossed the TP
Classification: Limit order
Behavior: Ensures that execution only occurs when the expected gains can be realized
Rationale: Limit order architecture is ideal for TP orders as it ensures execution only occurs when the trader's expected profit can be guaranteed, aligning with market conventions
Stop-Loss (SL)
Trigger: Mid-price crossing user's SL price
Execution: At bid/ask price
Classification: Market order
Behavior: Optimized for filling during rapid price movements, may result in greater losses than anticipated
Rationale: Market orders are used because stop losses need to fill reliably during volatile price movements when spreads widen. Using limit orders could cause premature triggering during price wicks since bid-ask volatility typically exceeds mid-price volatility
Liquidation
Trigger: Mid-price crossing the calculated liquidation price
Execution: At bid/ask price
Classification: Market order
Behavior: Calculated internally based on margin requirements
Rationale: Similar to SL orders, using market orders for liquidations prevents premature liquidations during price volatility. Margin requirements in Ostium's liquidation backstop mechanisms already account for the risk of this approach
Summary
Open Market
Market Order
Mid-price (immediate)
Bid/Ask
Open Limit
Limit Order
Execution price crossing limit
Execution price
Open Stop
Market Order
Mid-price crossing stop
Bid/Ask
Close Market
Market Order
Mid-price (immediate)
Bid/Ask
Take-Profit
Limit Order
Execution price crossing TP
Execution price
Stop-Loss
Market Order
Mid-price crossing SL
Bid/Ask
Liquidation
Market Order
Mid-price crossing liquidation price
Bid/Ask
Last updated