Agent-readable docs index: /llms.txt. Full docs in one file: /llms-full.txt. Download /docs.zip to grep all markdown files locally.

Orders and matching

What an order says

An order names one instrument, a side (buy or sell), a quantity, a limit price, an expiry instant and a fee cap, and it is signed by its maker. It does not say whether it opens or closes a position: positions net to one signed number per contract, and the exchange works out what each fill opens and closes. An account never holds a long and a short in the same contract at once.
Every order the exchange accepts is a limit order. It has no market order type, no combination or spread orders, and no fill-or-kill, all-or-none or minimum-quantity orders.

Market orders

The web client offers a market order, but the exchange never sees one. The client turns it into an ordinary limit order before signing it:
  • its price is the protection price: the best opposing price in the book, moved protectionTicks ticks against you on the ladder, and never above what the contract can pay. protectionTicks is published in GET /v1/config;
  • it is immediate-or-cancel ("ioc": true, below), so it takes what is resting up to that price and the remainder expires at once, without resting. Its signed expiresAt is about two seconds ahead, because the contract never fills an order after its signed expiry.
With nothing on the opposing side there is no protection price, and the client offers a quote request instead.
The gateway and the engine treat that order like any other: it is matched by price and time, and it trades at the resting orders' prices, never worse than its limit. The protection range, like the client's warning before a sell below intrinsic value, is the client's alone. An order sent straight to the API gets none of it: its limit is the only bound on what it pays.

Lifetime

Every order carries an expiry instant, expiresAt, and rests until then if it is not filled first.
  • The contract's own expiry makes the order good until the contract expires.
  • An earlier instant makes it good until that instant. A lifetime of a few hundred milliseconds takes what is resting and lets the remainder lapse almost at once.
  • An instant already past is refused, and so is one after the contract's expiry.
Immediate-or-cancel. Send "ioc": true beside the order (not inside it: it is not part of what you sign). The order matches once against the book in front of it and the remainder expires within the same step, so it never rests, and it does not count against your account's resting order cap. Its expiresAt must still be in the future when the order is sequenced, since the contract checks every fill against the expiry you signed: a few seconds ahead of your clock is enough. The web client sends every market order this way. Over FIX, 59=3 with 126.
An order outlives the session that sent it. Disconnecting cancels nothing.

Cancels and replacements

There is no modification. To change an order, cancel it and send another. A cancel names the order by its nonce, which the client chose before sending, so a cancel can be sent before the order is acknowledged.
To cancel and replace without anything trading in between, send both in one batch: up to 256 orders and cancels from one maker, accepted or refused whole and sequenced with nothing between them.

Asking for a quote

Most contracts hold no resting interest at most moments: the grids are wide and the underlyings thin. A participant who wants one can ask the market for a price with a quote request: a signed, sequenced message naming the contract, a size, and a side or none, which every participant sees without the requester's name. It holds nothing on the exchange. Makers answer with ordinary limit orders on the book, firm and open to anyone, which the requester takes like any resting order. The web client offers it beside the market order, and in its place where the book has nothing to trade against.

Matching

Each contract has one book, matched by price-time priority: better prices first, and at one price the order the exchange sequenced first. A trade happens at the resting order's price.
When an account's incoming order would trade with its own resting order, the resting order is cancelled and the incoming order carries on.
Resting orders stay where they are when the underlying moves. Nothing reprices or cancels them.
A trade is final. The exchange does not cancel or reprice a trade once it has happened.

Admission

An order is admitted if the account's free cash covers what the order adds to the account's requirement (see Security). That is the only risk check. After it, nothing is checked again: a fill, a cancel or an expiry never raises what an account must hold, so there are no margin calls and no liquidations.
An account's class also caps how much it may have open: its resting orders (OPEN_ORDER_LIMIT) and the books it holds orders or positions in (BOOK_LIMIT). An order past either cap is refused whole, before it matches. The caps decide no price, fee or priority.

Halts

A halted instrument refuses new orders. Its resting orders stay in the book.