Skip to main content
See API keys for format, scope taxonomy, associatedWallet requirement, and rate-limit buckets.

Request body

The request body is whitelisted (forbidNonWhitelisted). Any extra field returns 400 invalid_request, and error.details.fields[] names the offending property, for example: { "field": "foo", "constraint": "whitelistValidation", "message": "property foo should not exist" }. Field bounds, checked at request validation (after authentication, rate limits and account gates, before any market, price or signature check) on place and on every entry of place-batch (one entry out of bounds refuses the whole batch with 400 invalid_request; RND-3929, RND-3943, RND-4156, RND-4196): Send feeRateBps with the value you signed. If the market fee changed after you fetched it, the order is rejected with status: REJECTED, code: stale_fee_quote and a message giving the current rate. Re-fetch feeTakerBps, then re-sign. If you omit the field, the signature is still checked against the current fee, and a stale fee comes back as bad_signature. The platform never receives the struct you signed. It rebuilds the on-chain Order from your request fields and recovers your signature against that rebuild. So the struct you sign must always contain:
  • signer = the wallet you authenticate as (your key’s associatedWallet, or the X-User-Wallet for a multi_wallet key)
  • maker = that wallet’s vault of the market’s generation (GET /api/me/vault vaults[]), never the EOA
  • signatureType = 1 (VAULT). 0 (EOA) is deprecated. The platform and the exchange contract both reject it, even when maker == signer.
  • salt = the body nonce, expiration = expiry, feeRateBps = the market’s feeTakerBps, taker = 0x0, tokenId = the token for outcome, side = 0 BUY / 1 SELL
  • makerAmount / takerAmount derived from price / quantity (CEIL on BUY notional, FLOOR on SELL)
  • the EIP-712 domain of the market’s exchange: market.exchangeAddress, or when it is null the binary or the neg-risk exchange according to the market’s negRiskEligible
On a generation-2 market (contractGeneration: 2), verifyingContract is the market’s exchangeAddress and maker is your generation-2 vault. See Placing orders on gen-2 markets.
See EIP-712 signing for the typed-data definition. The body maker field is only an ownership check. It must be your wallet or one of its vaults (anything else is rejected with maker_mismatch, an HTTP 401 on /place), and the platform verifies against your vault of the market’s generation in both cases. If the signature is not in canonical 65-byte (r, s, v) form (RND-2432) or does not recover to your wallet, the order comes back as status: REJECTED, code: bad_signature (HTTP 201), not as an HTTP 400; see Response shape. If a non-zero expiry is within the 60s safety window or has passed, the request is refused with HTTP 400 order_expiry_too_soon.

Validation rules

Except where a row shows an HTTP status, every rule in this table is checked as a business rule. A failure comes back as a REJECTED envelope, not an HTTP error: an HTTP 201 body { status: "REJECTED", code, message } on /place, or an entry with success: false on /place-batch. Branch on status / code, not on the HTTP status. (Shape errors, such as a non-numeric price or an unknown field, fail request validation first with 400 invalid_request.)

Worked example — BUY 10 YES at 0.42

Response shape

trades[].price is the price per outcome token in your own outcome frame. On the taker leg of a MINT (your BUY crossed with a BUY of the other outcome), it is what you actually paid: 1 - maker price, at or below your signed limit. The chain charges the signed limit and refunds the difference, so this matches the price GET /api/orders/{id}/fills reports for the same leg (RND-2522). In the rare case the service cannot cross-check a MINT leg, price keeps your signed limit. On code: bad_signature, details takes one of two shapes (RND-2432): if the signature is not in canonical 65-byte (r, s, v) form (v = 27 or 28 and low s), details contains { expected_signer, signature_form } (such as length_64, v_00, high_s); if the signature is canonical 65 bytes, details contains recovered (the address your signature recovers to against the platform’s struct), expected_signer (the acting wallet: your key’s associatedWallet, or the X-User-Wallet on multi_wallet keys), and platform_canonical_struct (the exact Order the platform verified). Compare platform_canonical_struct field by field with the struct you signed. If your non-zero expiry has already passed or is within the 60s safety window, the order is refused with 400 order_expiry_too_soon (or REJECTED with order_expiry_too_soon on batch), so bad_signature indicates an encoding or cryptographic verification failure. See bad_signature diagnostic hints. The clientOrderId field is echoed verbatim when the request supplied one — present on every shape (success, REJECTED, idempotent replay). Use it to correlate the server-issued orderId to your own client-side handle without a follow-up GET /api/orders/{id}. The same value is also carried on the order_placed and order_cancelled frames of the user_orders channel on /ws/user, so partners that drive their state machine off the WS feed get the correlation key on both surfaces.

Post-only orders

Set postOnly: true to guarantee an order only ever rests on the book and never matches on entry. It’s the maker-side guarantee market makers need to avoid paying taker fees. (No order of yours ever trades against your own quotes, post-only or not: a limit order that would reach them is rejected, and a market order cancels the ones it comes to; see Self-trade prevention.)
Only valid for LIMIT orders with gtc time-in-force (optionally with expiry). Omit it (or send false) for today’s behavior.
Two rejection modes.
  • post_only_invalid_order_type — postOnly was sent with a MARKET order or an ioc / fok time-in-force. The combination is invalid and nothing is placed. On /place this is an HTTP 400. On /place-batch it comes back as that entry’s own { "success": false, "status": "REJECTED", "code": "post_only_invalid_order_type" } inside a successful batch response, and the other entries still process. In a batch, check the entry, not the HTTP status.
  • post_only_would_cross — the order was marketable at entry: its price meets or crosses the best price on the opposite side of the book (at-touch equality counts as crossing). It returns { "status": "REJECTED", "code": "post_only_would_cross" } with no fills — reprice inside the spread and resubmit. If its price also reaches one of your own resting orders, you get self_cross_blocked instead, even when another participant’s order sits in front of yours: self-trade prevention is checked first.

Self-trade prevention

A wallet never trades with itself. When a new order would meet one of your own resting orders, the platform stops that match. What it stops depends on the new order’s type: For a limit order, “reaches” means a BUY priced at or above your lowest resting SELL, or a SELL priced at or below your highest resting BUY; an equal price counts. Quoting both sides with a spread between them is always allowed.
A limit order is checked against your own price, not against the whole book. If its price reaches one of your resting orders, the whole order is rejected, even when other participants’ orders at better prices would have filled it first. Example: another trader asks 0.45 and your own ask rests at 0.55. A BUY limit at 0.60 is rejected with self_cross_blocked and takes nothing; a BUY at 0.50 fills against the 0.45 ask. To trade through your own quote, cancel it first, or send a market order with a price cap, which cancels your own orders it comes to and fills against everyone else’s.
  • YES and NO share one book. On a binary market, buying NO at p is the same as selling YES at 1 − p, so your orders on both outcomes are checked together. A BUY YES and a BUY NO reach each other when their prices add up to 1.00 or more; a SELL YES and a SELL NO when they add up to 1.00 or less. With your BUY NO at 0.40 resting, a BUY YES at 0.60 is self_cross_blocked and a BUY YES at 0.55 is not. Different markets never block each other, including the questions of one multi-outcome event.
  • Checked first. The check runs before the post-only and fill-or-kill checks. A postOnly order that reaches your own order gets self_cross_blocked, not post_only_would_cross, and a LIMIT + FOK order comes back REJECTED with self_cross_blocked, not CANCELLED. A LIMIT + IOC order that reaches your own order takes nothing, not even better-priced orders of other participants.
  • Batches. place-batch entries are processed in array order. A limit entry that reaches an order an earlier entry of the same batch left resting is rejected with self_cross_blocked, and the earlier entry is unaffected. A market entry cancels that order instead, as described above.
  • Pre-market. While a market is PRE_MARKET, an order that would cross another wallet’s resting order is rejected with code: pre_market_crossing_order (see Market status). The self-trade check runs first, so an order that reaches one of your own resting orders, including one an earlier entry of the same place-batch left resting, comes back as self_cross_blocked instead. An order you send with postOnly: true that would cross gets post_only_would_cross.
  • Just-expired orders. One of your orders whose expiry has just passed can still count for a few seconds, until the platform removes it from the book.
  • Per wallet. Orders from two different wallets are never blocked or cancelled against each other, even when they belong to the same multi_wallet API key: they match like any two participants. Trading between wallets you control is still subject to market surveillance.
What you receive
  • Rejected limit order. POST /api/orders/place answers HTTP 201 with status: "REJECTED", code: "self_cross_blocked" and a real orderId (on place-batch, that entry with success: false). Only this response names the code. On the user_orders WebSocket channel you get the usual order_placed frame, then order_cancelled with reason: "matcher_rejected" (not order_rejected), and GET /api/orders/{id} reads REJECTED.
  • Resting order cancelled by your market order. An order_cancelled frame on user_orders with reason: "self_trade_prevention". It can arrive without clientOrderId, originalQuantity and remainingQty, so key it by orderId. GET /api/orders/{id} reads CANCELLED, and the order’s locked funds are released as with any cancel. The market order’s own response doesn’t list the orders it cancelled.

Batch placement

Submit up to 10 orders in one request with POST /api/orders/place-batch. Each entry is the exact same body as single placement; the batch is processed sequentially in array order with independent per-order outcomes — one rejected order never aborts the rest, and there is no all-or-nothing atomicity. Request validation is the exception: if any entry is malformed (for example a non-numeric price, an unknown field or a missing signature), or the array holds 0 or more than 10 entries, the whole request fails with 400 invalid_request and no entry is processed.
The response is an array aligned to the request by index. Each item is a PlaceOrderResp (identical to single place) plus a success flag:
Partner trade limits accumulate across the batch. For users who trade through a partner sign-in (partner_sso), the partner trade cap is charged against the running total of the entries accepted earlier in the same batch, so a batch can never admit more exposure than the same orders sent one at a time.
Business reject vs infrastructure failure. A rejected order (bad signature, insufficient funds, …) comes back as a per-entry success: false inside an HTTP 201 response, and the rest of the batch still processes. An infrastructure failure (matcher / verifier / DB unavailable) fails the whole request with a 5xx. Entries processed before the failure may already be placed, and the 5xx body does not say which ones.An entry the exchange was too busy to take comes back success: false with code: "journal_intent_not_durable" and details.retryable: true (or status: "PENDING", success: false, details.outcome: "unknown", and details.retryAfterMs on owner_projection_lagging / shard_overloaded), and the other entries keep their own results. Wait details.retryAfterMs when present, then resend the same signed order unchanged, under the same clientOrderId. Do not sign a new one.Always set your own clientOrderId on every entry. Then you can resend the same batch with the same keys: entries that were already placed return their original result, and the rest are processed normally.If you left clientOrderId out, the server generates srv-* keys. A 503 placement_unknown returns them in details.clientOrderIds (null for an entry refused before it was sent): resend the same signed orders, each with the key at its index. After any other 5xx you do not get them, so a resend is not linked to the first attempt. Resending the identical signed orders still cannot place anything twice: an entry that was already placed comes back success: false with code: "order_already_placed". You won’t get its original result, though, so look it up by its order hash (see Finding an order after a timeout). Don’t re-sign an entry with a new nonce until you’ve confirmed the first one was not placed.In-batch clientOrderId duplicate handling (RND-1985). A duplicate key WITHIN one batch is resolved at the gateway:
  • Identical order (all fields equal to the first occurrence): the subsequent entry is not forwarded to the matching engine. Its response is a copy of the first occurrence’s final result (placed envelope, exchange reject, unknown-outcome entry, or gateway reject), and it is charged against monetary caps ONCE.
  • Different order (any field differs from the first occurrence): the entry meets gateway checks and is then rejected in its own slot as REJECTED with code: "client_order_id_reused" (the batch binds the key to its first occurrence; resend the modified order with a fresh clientOrderId). If the exchange returns wallet_frozen for any entry in the batch, that slot receives wallet_frozen instead.
Rate limited at 12 req/sec/wallet (token bucket, so up to 120 orders/sec). Single /place has its own limit of 100 req/sec/wallet. For the full table, see Rate limits. KYC deposit-tier gating applies, same as single place.

Finding an order after a timeout

When a place request times out or answers 5xx you don’t have the orderId, but you hold two keys for the order: the clientOrderId you sent, and its orderHash, the EIP-712 digest of the struct you signed (see EIP-712 signing). Look the order up by either one:
  • Pass exactly one of the two; neither or both answers 400 invalid_request.
  • The answer is the same Order object as GET /api/orders/{id}.
  • clientOrderId is matched exactly (case-sensitive, not trimmed). URL-encode it: a raw + in a query string reads as a space. orderHash is accepted in any case.
  • An unknown key and an order of another wallet both answer 404 order_not_found.
  • The server-generated srv-* key comes back in details.clientOrderId on a single POST /api/orders/place 503 (placement_unknown, placement_matched (the order traded), placement_resting (it rests on the book); do not sign a new order on any of them), and in details.clientOrderIds (request order; null for an entry refused before it was sent) on a place-batch 503 placement_unknown. Every other place-batch 5xx carries no keys, so set your own clientOrderId on every batch entry, or look the order up by orderHash.
  • Ended orders with no trade are archived after 30 days. GET /api/orders/{id} continues to find archived orders by orderId and returns them with orderSource: "archive" (final; on rows archived before the archive kept them, expiration, feeRateBps, maker, and signer are null, and orderHash may be null). GET /api/orders/lookup (clientOrderId / orderHash) only searches live unarchived orders, so a /lookup 404 for an archived order says nothing about it.
A 404 right after a timeout does not prove the order was never placed. It may not be recorded yet. The authoritative answer is still to re-send the identical request under the same clientOrderId: that returns the original result if the order was placed, and places it if it never reached us. It never creates a second order. Don’t sign a new order until you know the first one was not placed. If you sent no clientOrderId, look the order up by orderHash. Re-send only in that window, never an old order.

Sell orders

Same shape; side: 'sell'. No USDC is locked for a SELL order. Instead, the order reserves its quantity of the outcome token (ERC-1155), which must already sit in the vault, not the EOA. Tokens reserved by one open SELL cannot back another; cancelling or expiry releases the reservation for the unfilled remainder. Position resolution is keyed by maker (the vault), which is why on-chain splits (USDC → YES + NO) must be initiated by vault.splitPosition(...) rather than by the EOA directly. See Vaults for the split flow.

Placing orders on gen-2 markets (API market makers)

The endpoints, the Order struct and the domain name / version are the same on both generations. Three values change: the vault, the verifyingContract, and which markets you quote.

1. Find generation-2 markets

GET /api/markets has no generation filter; an unknown query parameter such as contractGeneration=2 does not narrow the list. Page through it and filter on the client:
  • limit is 1 to 500 (default 50). Page with the default sort=kickoff: the other sorts can shift between pages. The list can change while you page, so deduplicate by symbol.
  • PRE_MARKET markets are tradable: true too, but accept only resting limit + gtc orders that do not cross. See Market status.
  • Send your API key on these reads. A market hidden by the liquidity gate is left out of the list for everyone except registered market makers, and GET /api/markets/{slug} answers others 404 market_unavailable. Any other market that is not public is not listed and answers 404 market_not_found. New markets are listed as they open, so refresh the list.
  • Decide the generation from contractGeneration, not from whether exchangeAddress is set. See Detect a market’s generation.

2. Pick the vault and the domain

Cash and positions are held per vault: the order locks USDC or outcome tokens of the generation-2 vault only. No generation-2 vault yet? See Upgrade. Build the rest of the struct, sign it and send it exactly as in the worked example above on this page, with this maker and domain. The types are in EIP-712 signing.
Send the vault as body maker, not your wallet. With maker = your wallet the platform uses your vault of the market’s generation by itself. If you signed with your other vault, the answer is then a plain bad_signature. With the vault in the body, the same mistake is answered 409 vault_generation_mismatch, and details.vaultAddress names the vault to sign with.

3. Check every entry of a batch

HTTP 201 on POST /api/orders/place-batch means the batch was processed, not that orders were placed. The response array matches the request 1:1; read success, then status, then code of each entry: A batch sent once in which every entry is REJECTED (without the exceptions above) leaves no order on the book. To confirm what exists:
  • GET /api/orders/open: a resting order shows your generation-2 vault as maker. Page until nextCursor is null.
  • GET /api/orders/lookup?clientOrderId=…: one order by your key. A 404 right after a timeout is not proof; see Finding an order after a timeout.

Troubleshooting

On /place the HTTP errors below carry their fields in error.details. On /place-batch each is that entry’s own REJECTED slot with the same code, and the fields are in the entry’s details.

Next

Time-in-force

GTC vs IOC vs FOK behaviour.

Cancelling orders

Single-order and cancel-all flows.