Create Order
Creates a buy/sell order for prediction market positions. Requires signed order data.
- Fetch market data via Get Market Details to get venue and token IDs
- Sign the order using EIP-712 with
venue.exchangeasverifyingContract - Ensure you have token approvals set up
Optional Fields
| Field | Type | Description |
|---|---|---|
clientOrderId | string | Idempotency key (max 128 chars). If a duplicate is submitted, the server returns 409 Conflict. |
onBehalfOf | number | Profile ID of the sub-account to place the order for. Requires a scoped API token with trading scope and a partner relationship with the target profile. The maker and signer in the order must match the sub-account’s wallet address. |
postOnly | boolean | GTC orders only. When true, the order is rejected if it would immediately match. Guarantees the order rests on the book as a maker order. Default false. |
timestamp | number | Optional client-stamped Unix time in milliseconds for receive-window checks. Top-level request field; not part of the signed order. |
recvWindow | number | Optional maximum accepted order age in milliseconds. Valid range: 1 to 10000. If omitted, no receive-window check is applied. Top-level request field; not part of the signed order. |
stpPolicy | string | Self-trade prevention policy. Values: cancel_maker, cancel_taker, cancel_both. Default cancel_maker. Top-level request field; not part of the signed order. |
Receive Window
POST /orders supports optional receive-window controls for clients that want freshness checks on order submission. Send these fields at the top level of the request body, next to order, orderType, and marketSlug; never put them inside the EIP-712 signed order object.
| Field | Description |
|---|---|
timestamp | Client order creation time as Unix milliseconds. Direct API callers should send this with recvWindow when they want client-to-server freshness checks. |
recvWindow | Maximum accepted age, in milliseconds, between timestamp and the server receive time. Valid range: 1 to 10000. If omitted, no receive-window check is applied. |
Self-Trade Prevention
POST /orders can reject or cancel orders that would match against your own resting order on the same token.
| Policy | Result |
|---|---|
cancel_maker | Default. Cancel your conflicting resting order and continue with the incoming order. |
cancel_taker | Reject the incoming order before it self-trades. |
cancel_both | Cancel your conflicting resting order and reject the incoming order. |
cancel_maker, matching continues against the remaining non-self liquidity, and limit orders still never execute past their limit price.
Outcomes on the placement response:
- A rejected taker (
cancel_taker/cancel_both) returnssettlementStatus: "CANCELED"withreason: "STP_TAKER_REJECTED". - A
cancel_makertaker lists the canceled resting order IDs instpMakerCancelsand keeps its normal status (UNMATCHEDwhen nothing else fills it); noreasonis set.
stpPolicy is a top-level request field. Do not include it inside the EIP-712 signed order object.execution object on the response. See TypeScript, Python, Rust, and Go.ownerId come from? It is the id field returned by GET /profiles/me or GET /profiles/{address}. For partner sub-accounts, it is the profileId returned by POST /profiles/partner-accounts, or recovered with GET /profiles/partner-accounts.Delegated Signing
Partners with thedelegated_signing scope can omit signature and signatureType from the order object. The server signs the order using a Privy server wallet linked to the target sub-account and sets maker/signer to the server wallet address. See Authentication for details.
Execution Response
The response includes anexecution object with settlement details:
| Field | Type | Description |
|---|---|---|
matched | boolean | Whether the order was matched immediately |
settlementStatus | string | UNMATCHED, MATCHED, MINED, CONFIRMED, RETRYING, FAILED, DELAYED, or CANCELED |
reason | string | Reason the order was canceled. STP_TAKER_REJECTED when self-trade prevention rejected the incoming order (cancel_taker / cancel_both). Present only when settlementStatus is CANCELED. |
eligibleAt | string | ISO-8601 time the order is released to the matching engine. Present only when settlementStatus is DELAYED (taker delay). |
tradeEventId | string | Trade event ID (present when matched) |
txHash | string | On-chain transaction hash (present when mined) |
stpMakerCancels | string[] | Resting order IDs canceled by self-trade prevention (present when cancel_maker / cancel_both cancelled one or more of your resting orders) |
feeRateBps | number | Fee rate in basis points |
effectiveFeeBps | number | Effective fee rate after rebates |
totalsRaw | object | Raw execution totals (contractsGross, contractsFee, contractsNet, usdGross, usdFee, usdNet) |
DELAYED (taker delay). Some markets apply a short hold to marketable (taker) orders before the matching engine fills them. On such a market, a marketable order’s response returns immediately with settlementStatus: "DELAYED", matched: false, zero totalsRaw, and an eligibleAt timestamp — it does not block until the trade is mined. Track the outcome over subscribe_order_events (provisional MATCHED → terminal MINED / FAILED), correlating by clientOrderId / tradeEventId. postOnly orders are never delayed.Authorizations
Scoped API token with HMAC-SHA256 signing. Requires three headers: lmts-api-key (token ID), lmts-timestamp (ISO-8601), lmts-signature (Base64-encoded HMAC). See Authentication docs for details.
Body
Order creation data including signature and order parameters
Order details including signature and amounts
Profile ID of the order owner
12345
Order type (GTC=Good Till Cancelled, FAK=Fill And Kill, FOK=Fill Or Kill)
FAK, FOK, GTC "GTC"
Market identifier slug
"biden-vs-trump-2024"
Reject the order if it would match immediately. Supported only for GTC orders.
true
Client-provided idempotency key for order placement. If a duplicate is submitted, the server returns 409 Conflict.
128"client-order-001"
Profile ID to place order on behalf of (partner flow). Requires an API token with trading scope and a partner relationship with the target profile.
12345
Optional client-stamped order creation time, Unix ms epoch. Top-level request field; not part of the EIP-712 signed order payload.
x >= 01735689600000
Optional maximum accepted order age in milliseconds. Valid range: 1 to 10000. If omitted, no receive-window check is applied. Top-level request field; not part of the EIP-712 signed order payload.
1 <= x <= 100001500
Self-trade prevention policy. Top-level request field; not part of the EIP-712 signed order payload. Defaults to cancel_maker when omitted.
cancel_both, cancel_maker, cancel_taker "cancel_maker"