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 is a limit order. There are no market orders, no combination or spread orders, no fill-or-kill, all-or-none or minimum-quantity orders.

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.
There is no immediate-or-cancel flag. An order whose expiry equals the exchange's clock at the instant it is sequenced has a lifetime of zero: it matches once and the remainder expires without resting. Since a client cannot aim for that instant, a short lifetime is the practical way to take liquidity only.
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 with a market order. The 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.

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.

Halts

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