Skip to main content

Matrix

MARKET + GTC is semantically nonsensical — the order is not placed: the response is HTTP 201 with status: "REJECTED" and code: "invalid_tif". timeInForce defaults to gtc for every order type, so a market order must send ioc or fok.

GTC — Good Till Cancelled

Default for LIMIT orders. Rests until:
  • cancelled by the user,
  • cancelled by self-trade prevention, when a market order from the same wallet comes to it,
  • filled by a counterparty,
  • expiration reached (server cleans up with EXPIRED),
  • the market closes or resolves (cancelled by the platform with CANCELLED).

IOC — Immediate Or Cancel

Executes whatever is immediately available at the requested price; the unfilled remainder is cancelled, not rested. A LIMIT + IOC order whose price reaches one of your own resting orders is REJECTED with code: self_cross_blocked and takes nothing, even from better-priced orders of other participants (see Self-trade prevention).

FOK — Fill Or Kill

All-or-nothing. If the full quantity isn’t immediately available at the price, nothing fills and status is CANCELLED. A LIMIT + FOK order whose price reaches one of your own resting orders is not cancelled but REJECTED with code: self_cross_blocked (see Self-trade prevention).

MARKET orders

MARKET + IOC — sweep the book starting from the best price until quantity is exhausted or the price slippage cap is hit. MARKET + FOK is accepted and executes like MARKET + IOC: whatever is available within the slippage cap fills, and the remainder is cancelled — it is not all-or-nothing. For an all-or-nothing take, send LIMIT + FOK with price set to your worst acceptable price. When a market order’s sweep comes to one of your own resting orders, it cancels that order (reason: "self_trade_prevention") and keeps filling against other participants’ orders. See Self-trade prevention.

Which to pick

All five combinations are accepted by POST /api/orders/place: pass type + timeInForce in the body. Both fields are optional; defaults are limit + gtc. MARKET + FOK behaves like MARKET + IOC and can fill partially (see MARKET orders).