Skip to content
UDX
On this page

Order Entry

Understand what an order is, how time in force, post-only, and self-trade prevention shape it, and how to place, amend, and cancel orders.

An order is an instruction to buy or sell YES contracts in one market at a limit price. It belongs to one account, carries your own client_order_id for correlation, and is identified by the exchange-assigned order_id once accepted. See Markets and Trading for YES-side pricing and units.

Time in Force

Value Meaning
gtc Good till canceled. Rests until it fills or you cancel it.
day Rests until the end of the trading day.
gtt Good till time. Rests until the instant you set as expires_at, then expires.
ioc Immediate or cancel. Fills what it can on arrival; the rest is canceled.
fok Fill or kill. Fills completely on arrival or is canceled entirely.

An order read back from the exchange can also report unknown when it was placed through another channel with a time in force the exchange does not model. unknown is never accepted when placing an order.

Post-Only

A post-only order only ever adds liquidity. If it would cross the book on placement, the exchange rejects it instead of trading. Post-only cannot be combined with ioc or fok.

Self-Trade Prevention

Orders placed under the same member never trade with each other, whichever user or account placed them. self_trade_prevention_type on the incoming order chooses which order gives way when it would match one of your member’s resting orders:

Value Behavior
placed Cancels the incoming order when it would self-trade. The resting order stays open. This is the default.
resting Cancels the conflicting resting order and lets the incoming order continue matching.

Self-trade prevention cannot be disabled.

Order Status

Status Meaning
resting Open on the book with nothing filled yet.
partially_filled Open on the book with some quantity filled.
filled Completely filled.
canceled Canceled before filling completely.
expired Its time in force ended before it filled completely.
rejected Rejected by the exchange; rejection_reason says why.

Rejection Reasons

Reason Meaning
duplicate_client_order_id The client_order_id was already used on this account.
self_trade_prevented The order would have traded against your member’s own order.
market_closed The market is not open for trading.
insufficient_funds The account lacks the balance to carry the order.
price_out_of_bounds The price is outside the market’s limits.
quantity_out_of_bounds The quantity or notional is outside the market’s limits.
post_only_would_cross A post-only order would have traded on arrival.
no_liquidity Nothing was available to trade against.
quote_unavailable The quote named by an accept no longer exists or has lapsed.
quote_terms_mismatch The accept’s side, price, or quantity did not match the quote.
quote_already_accepted The quote or its RFQ is already in last look.
rate_limited The exchange’s global rate limit was exceeded.
expires_at_invalid A gtt order’s expires_at had already passed when the exchange received it.
exchange_rejected The exchange rejected the order for a reason UDX does not classify.

Amend and Cancel

An amendment changes a resting order’s price, quantity, or both, in place. The new quantity is the total, not a delta, and must exceed the quantity already filled. Queue priority is preserved only when the quantity decreases at an unchanged price; any other change moves the order to the back of its price level.

A cancellation ends one resting order. A bulk cancellation ends every open order the credential can act for, optionally narrowed to one market or to named accounts; orders that fill while the cancellation is in flight are unaffected. A bulk cancellation is complete once a read of your working orders, those resting or partially_filled, returns none.