Orders

Order Types

Limit

A limit order executes at your chosen price or better. Any quantity that does not fill immediately rests on the order book until it fills or you cancel it. Limit orders support every time-in-force policy and can be marked post-only.

Market

A market order executes immediately against available liquidity. The price field is required and acts as a slippage cap: a buy will not match makers priced above it, and a sell will not match makers priced below it. Only FOK or IOC time-in-force is accepted. Post-only is not permitted.

Stop

A conditional order that stays dormant until the market reaches a trigger price, then enters the matching engine as an active order. You choose whether it acts as a take-profit or a stop-loss, and whether the trigger watches the last traded price or the mark price, the mark price offers stronger manipulation resistance.

Margin is not reserved while the order is waiting to trigger. It is reserved only after the trigger fires and the order becomes active.

Stop orders accept every time-in-force policy except good-til-time.

Trigger conditions by position side and stop type:

PositionStop typeSideTriggers when price…
LongTake-profitSellRises to or above trigger
LongStop-lossSellFalls to or below trigger
ShortTake-profitBuyFalls to or below trigger
ShortStop-lossBuyRises to or above trigger

Trigger fields, sources, and submission format are in the Orders API reference.

TWAP

A TWAP order splits a large order into a series of smaller sub-orders scheduled at fixed intervals, reducing the market impact of trading the full size at once. Unlike stop orders, a TWAP order reserves margin while it waits to execute. TWAP sub-orders always execute with TIME_IN_FORCE_IOC.

Submission format and validation rules are in the Orders API reference.

Time-in-Force

Time-in-force controls how long an order stays active.

PolicyBehaviorOrder types
Good-til-canceled (GTC)Rests on the book until filled or canceled. This is the default.Limit, Stop
Immediate-or-cancel (IOC)Fills as much as possible right away, then cancels any remainder.Limit, Stop, Market, TWAP
Fill-or-kill (FOK)Fills in full immediately or cancels entirely, no partial fills.Limit, Stop, Market
Good-til-time (GTT)Rests on the book until a chosen expiration time.Limit only

A good-til-time order is canceled automatically when its expiration time passes. The expiration must be in the future and at most 30 days out; the exact validation rules are in the Orders API reference.

When you omit optional fields, the engine fills in defaults: a limit order, good-til-canceled, with self-trade prevention on. The full default list is in the Orders API reference.

Matching Behavior

The engine matches on price-time priority: better prices fill first, and orders at the same price fill in the order they arrived. For each incoming order it:

  1. Checks the price bound: walks the opposite side of the book and stops once the best available price is worse than the order's price.
  2. Enforces post-only: a post-only order that would immediately cross the book is canceled instead of taking liquidity.
  3. Checks liquidity: if the book is missing a side, the order is canceled.
  4. Applies self-trade prevention: before any match, the configured policy resolves orders that would trade against your own.
  5. Caps matches: a single order may produce at most 1,000 matches. If it would exceed that, the whole order is canceled with no fills booked.

After matching, the engine revalidates margin. If the resulting portfolio would be under-margined, the order is canceled. Every cancellation records a reason; the full list is in the Orders API reference.

Partial fills are not a separate state: the filled quantity updates in place while the order stays open, and the order becomes done only when it is fully filled or canceled.

Execution Controls

Reduce-only

A reduce-only order can only decrease an existing position, never open or grow one. It is canceled (returned as ORDER_STATUS_DONE with the corresponding done_rsn) if no position exists or if its side would add to the position. An immediate-or-cancel reduce-only order whose size exceeds the position is clipped to the remaining position before matching; other reduce-only orders are rejected outright in that case. After a position shrinks, any resting reduce-only orders that now exceed it are canceled automatically. Reduce-only orders do not reserve margin.

Post-only

A post-only order is canceled (returned as ORDER_STATUS_DONE with done_rsn canceled: post-only) immediately if it would cross the book at placement time instead of resting as a maker. When it does rest, it is guaranteed maker-fee treatment.

Self-trade prevention

If an incoming order would match one of your own resting orders, self-trade prevention steps in. It is always active and cannot be disabled. Three policies are available: cancel the incoming order (the default), cancel the resting order, or cancel both. The exact policy values are in the Orders API reference.

Bracket Orders

A bracket order links a parent entry order to one or two conditional exit orders (take-profit and/or stop-loss). The children stay dormant until the parent fills, at which point they become active. When one child triggers and fills, the other is canceled automatically.

Submission format and validation rules are in the Orders API reference.

Order Statuses

An order moves through a small set of states:

  • Pending: received by the sequencer, awaiting matching.
  • Open: active on the order book.
  • Untriggered: a stop or TWAP order waiting for its trigger or scheduled time.
  • Done: fully filled or canceled (terminal).

A limit order moves from pending to open to done. A stop or TWAP order starts untriggered, becomes open when it activates, then reaches done.

Market Mode Restrictions

Order placement is validated against the market's current mode before any other checks. See Market Lifecycle for the full mode reference.

ModeRegular User PlacementMarket Maker PlacementCancel
TradingAll order typesAll order typesyes
Post-onlyPost-only ordersPost-only ordersyes
Wind-downReduce-only ordersReduce-only + post-onlyyes
HaltedBlockedBlockedyes
DelistingBlockedBlockedyes (by admin)
DelistedBlockedBlockedblocked

In wind-down, market makers may also place post-only orders to provide counterparty liquidity for users closing positions. Cancellations are accepted in every mode except delisted; in delisting, only admin-initiated cancels are allowed.

Cancellation Reasons

When an order reaches the done state, it records why it ended. The full list of cancellation reasons is in the Orders API reference.

On this page