v9

latestOpenAPI 3.0.0raw.githubusercontent.com2026-06-2491679.8 KB
Trading

Build Order

Build an order without placing it. Returns the order's typed-data payload (for the wallet to sign) plus a built_order_id to pass to submitOrderHosted once it's signed.

Use this when you want a human to approve each trade before it submits — for example, surfacing the order details in a wallet popup. For everything else, use createOrderHosted, which builds + signs + submits in one call.

post/v0/trade/build-order

Request body

venue'polymarket' | 'opinion' | 'limitless'

Venue the outcome trades on. Inferred automatically from your client class in the SDKs.

venue_outcome_idstring

The outcome's identifier (e.g. Polymarket tokenId, Opinion outcome hash, or Limitless token address). Returned by client.fetch_markets().

side'buy' | 'sell' required

Direction of the order. buy opens or adds to a long position on the outcome; sell closes or reduces it.

order_type'market' | 'limit'

market fills immediately at the best available price (subject to slippage_pct); limit rests on the venue's order book at price until matched or cancelled.

amountnumber required

Order size. For market buys, in USDC dollars (the budget you want to spend). For market sells and all limit orders, in outcome shares.

denom'shares' | 'usdc'

Unit amount is denominated in. shares = outcome shares; usdc = USDC dollars. Market buys require usdc; market sells and limit orders require shares (the server validates this combination).

pricenumber nullable

Required for limit orders. Probability in [0, 1] -- e.g. 0.55 means buying / selling shares at 55 cents each. Ignored for market orders.

slippage_pctnumber nullable

Maximum acceptable slippage as a percent. Use aggressive defaults (30 for buys, 99.9 for sells) until the upstream economic validator tightens -- lower values frequently trip precision checks. Ignored for market orders, which pin worst-price to the domain extreme; the server defaults to 20 when omitted.

user_addressstring required

EVM wallet address that will sign the resulting typed data. Must match the wallet whose USDC funded the PMXT PreFundedEscrow on Polygon.

Response

Built order with typed data to sign.

built_order_idstring required

Opaque server-side key used by submitOrderHosted to look up the build context.

side'buy' | 'sell' required

Echo of the order side from the request.

typed_dataobject required

EIP-712 typed-data payload to sign locally with the wallet key matching user_address. Return the signature in SubmitOrderHostedRequest.signature.

pull_typed_dataobject nullable

Optional secondary EIP-712 payload for venues that require a separate pull-authorization (notably Polymarket neg-risk markets and sell orders). Sign with the same wallet and return in SubmitOrderHostedRequest.pull_signature. null when not required.