Order Types
Market Orders
- Execute immediately against eligible liquidity at the best available price, subject to risk controls and price bands.
- Do not guarantee a particular execution price or a complete fill.
- Cannot include Good-Till-Cancelled (GTC) instructions.
Limit Orders
- Specify both quantity and a price limit: the maximum price for a buy or minimum price for a sell.
- If not filled immediately, a GTC limit order rests at its specified price. IOC and FOK instructions have the handling described below.
Add Liquidity Only (ALO) Orders
- May rest and subsequently provide liquidity, but do not execute aggressively on entry.
- If an ALO order would immediately match with eligible existing liquidity, it is cancelled instead. Self-trade prevention and passive cleanup are applied before this marketability decision.
take_profit and stop_loss price. This stages stop orders at the exchange:
Stop Orders
- Must be either
take_profitorstop_loss. - Trigger when the mark price reaches or crosses the specified trigger price.
- Can only reduce an existing position. An order can be rejected or other stop orders can be cancelled if the requested quantity exceeds the position.
Stop-market IOC retries
When a stop triggers, QFEX submits a reduce-onlySTOP_MARKET order with immediate-or-cancel (IOC) time in force. Each attempt takes available eligible liquidity and cancels any unfilled quantity. After a zero or partial fill or a retryable rejection, QFEX retries the unfilled quantity, capped at the size of the position it can still reduce. QFEX waits for each attempt to finish before submitting another. Attempts are at least 500 ms apart and can continue for up to 10 minutes from the initial attempt. A retry can execute even if the mark price has since moved back across the trigger price.
Retries end when the requested quantity fills, the position closes or reverses, an attempt receives a non-retryable rejection, or the window expires. A clearing house restart can interrupt retries. Any position that remains open is still exposed to price moves and liquidation.
Execution price and liquidity risk
The mark price determines when the stop triggers. Each attempt matches against eligible orders at their available prices, which may differ substantially from the trigger price and the mark price. At submission, the current price band sets the lowest price a sell can accept or the highest price a buy can pay. Liquidity within that bound can still produce significant slippage. If too little liquidity is available within the bound, the stop can end with a partial fill or no fill. For example, a sell stop for 10 contracts triggers at a mark price of USD 100. If the lower band at submission is USD 90 and the only bids are for 3 contracts at USD 92 and 7 at USD 88, the first attempt can sell 3 at USD 92. QFEX retries the remaining 7 against the liquidity and band available on each attempt. If no eligible bid appears before retries end, those 7 contracts remain open.Order visibility and eligible liquidity
One optional JSON boolean,dark, controls private-order behavior. Omission or false preserves normal behavior. For LIMIT GTC and ALO GTC, true makes resting quantity private. For LIMIT IOC, LIMIT FOK and MARKET IOC/FOK, true restricts matching to private passive orders.
Private limit and ALO orders
A private GTC limit has a fixed submitted price and normal tick/lot increments. It can execute against displayed or private liquidity on entry, with any unfilled remainder resting privately. A private ALO is post-only against both displayed and private liquidity. Private resting orders have lower priority than displayed orders only at the same price, not at a better price.dark; changing it requires cancellation and a new order. A same-price quantity reduction retains queue position, while a price change or quantity increase loses time priority under the normal rules. Private resting status and queue order survive exchange recovery.
Private-only taking orders
LIMIT IOC, LIMIT FOK, and MARKET IOC/FOK with dark: true execute only against eligible private resting orders. Displayed orders are ineligible even at a better price. Immediate orders never rest and never fall back to displayed liquidity.
Matching selects the best eligible private prices with time priority at the same price. Executions may be better than, equal to, or worse than the displayed touch; no displayed quote or displayed-BBO reference is required. Limit orders retain their explicit buy cap or sell floor. Market orders must specify price: 0 and are protected by the normal price bands, not an explicit execution limit. Risk controls, self-trade prevention and the applicable speed bump still apply.
IOC fills any eligible portion and cancels the remainder. FOK executes the entire quantity against eligible private liquidity or cancels without any fills. For example, with a displayed ask at USD 100.10 and only three eligible private contracts at USD 100.15, a private IOC buy for ten at a limit of USD 100.20 fills three and cancels seven. The same FOK cancels without trading. Neither order consumes the displayed ask.
Reduce-only orders
A reduce-only order can close or decrease an existing position, but cannot increase it or open a position in the opposite direction. Execution is limited by your position at the time of the match. An order can therefore be partially filled and have its remainder cancelled, or be cancelled without a fill if it no longer reduces your position. QFEX can also automatically convert resting orders to reduce-only during soft liquidation, even if you submitted them as ordinary orders. See order margin release and soft liquidation for the sequence of events, what appears on the website and what API clients receive.Time In Force
Fill-or-Kill (FOK)
- Must execute entirely and immediately, or be cancelled without partially committing fills.
- May access displayed and private liquidity with
dark: falseor omitted. - With
dark: true, only private passive liquidity counts towards the full quantity.
Immediate-or-Cancel (IOC)
- Executes any immediately available eligible portion, cancelling the rest.
- Never leaves a resting order. “Immediately” refers to processing at the matching engine after the applicable entry delay.
Good-Till-Cancelled (GTC)
- Remains active until executed or cancelled under the exchange rules.
- Applies only to limit and ALO orders, including private orders; it does not apply to market orders or private-only takers.
- Persists across sessions.
Instruction availability table
For immediate limit/market orders,
dark: true selects private counterparties. For GTC limit/ALO orders, it controls resting visibility only. Private instructions are not supported on standalone stops or TWAP requests. Unsupported add_order type/time-in-force combinations are rejected.