Skip to main content

Order Types

PMX supports two order types, each with different matching behavior.

Limit Orders

A limit order rests in the orderbook at your specified price until it is filled, cancelled, or expires. If a matching counterparty exists at submission time, the order fills immediately (partially or fully) — any unfilled remainder stays in the book.
FieldValue
orderType"limit"
priceBps1–9,999 (your limit price)
Default timeInForcegtc
When to use: You want a specific price and are willing to wait for it.
{
  "orderMessage": { ... },
  "signature": "...",
  "orderType": "limit",
  "timeInForce": "gtc"
}

Market Orders

A market order fills immediately at the best available prices in the book. Any unfilled remainder is automatically cancelled — market orders never rest in the book.
FieldValue
orderType"market"
priceBps1–10,000 (worst-case slippage limit)
timeInForceAlways ioc (forced by the engine)
When to use: You want immediate execution and accept the current market price.
{
  "orderMessage": { ... },
  "signature": "...",
  "orderType": "market"
}
Market orders use priceBps as a slippage limit, not a target price. Set it to the maximum price you’re willing to pay (for buys) or minimum you’ll accept (for sells). A priceBps of 10000 means no slippage protection.

Time-in-Force Policies

Time-in-force controls what happens to unfilled quantity after matching.

GTC — Good-Til-Cancelled

The default for limit orders. The order stays in the book until fully filled, manually cancelled, or it reaches its expiry timestamp.
{ "timeInForce": "gtc" }
  • Counts toward your open order limits (100 per market, 500 global)
  • Must have an expiry within 30 days
  • Cancelled orders emit an order:cancelled event on the user WebSocket channel

IOC — Immediate-Or-Cancel

Fills as much as possible immediately, then cancels any remaining quantity. The order never rests in the book.
{ "timeInForce": "ioc" }
  • Does not count toward open order limits (since it never rests)
  • The response will show status: "filled" or status: "cancelled" (partial fill + auto-cancel)
  • All market orders are internally treated as IOC

FOK — Fill-Or-Kill

Must be filled entirely in a single match, or the entire order is rejected. Nothing partial.
{ "timeInForce": "fok" }
  • The engine checks book depth before matching. If the book can’t fill the full quantity, the order is rejected with FOK_NOT_FILLABLE
  • Useful when you need an exact quantity and can’t accept partials

Matching Behavior

The PMX matching engine supports three types of fills:
Fill TypeHow It Works
DirectA buy YES order matches against a sell YES order (same outcome, opposite sides)
ComplementaryA buy YES order matches against a buy NO order when yesPriceBps + noPriceBps >= 10000. The vault mints both outcome tokens
Sell ComplementaryA sell YES order matches against a sell NO order. Both sellers’ tokens are burned and USDC is returned from the vault
All three fill types can happen on a single order. For example, a large buy YES order might first match direct sellers, then match complementary NO buyers to fill the remaining quantity.

Order Limits

LimitValue
Max open orders per market100
Max open orders globally500
Min quantity1,000,000 (1 token)
Min notional value10,000 ($0.01)
Max expiry30 days from now
IOC and FOK orders do not count toward open order limits since they never rest in the book.

Order Statuses

StatusMeaning
openResting in the book, waiting for a match
partially_filledSome quantity has been matched; remainder still in book
filledFully matched — no remaining quantity
cancelledCancelled by user, expired, or IOC remainder cancelled
settlingTemporarily locked during on-chain settlement
The status lifecycle is: openpartially_filled (optional) → filled or cancelled.