v1

latestOpenAPI 3.0.02026-07-265081124.2 KB
Trading

Create Order

Creates a buy/sell order for prediction market positions. Requires signed order data.

post/orders

Request body

ownerIdnumber required

Profile ID of the order owner

orderType'FAK' | 'FOK' | 'GTC' required

Order type (GTC=Good Till Cancelled, FAK=Fill And Kill, FOK=Fill Or Kill)

marketSlugstring required

Market identifier slug

postOnlyboolean

Reject the order if it would match immediately. Supported only for GTC orders.

clientOrderIdstring

Client-provided idempotency key for order placement. If a duplicate is submitted, the server returns 409 Conflict.

onBehalfOfnumber

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.

timestampnumber

Optional client-stamped order creation time, Unix ms epoch. Top-level request field; not part of the EIP-712 signed order payload.

recvWindownumber

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.

stpPolicy'cancel_both' | 'cancel_maker' | 'cancel_taker'

Self-trade prevention policy. Top-level request field; not part of the EIP-712 signed order payload. Defaults to cancel_maker when omitted.

Example request

{
  "order": {
    "salt": "1778155025318314496",
    "maker": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
    "signer": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
    "taker": "0x0000000000000000000000000000000000000000",
    "tokenId": "19633204485790857949828516737993423758628930235371629943999544859324645414627",
    "makerAmount": 5000000,
    "takerAmount": 10000000,
    "expiration": "0",
    "price": 0.75,
    "signature": "0x123abc456def789ghi0123abc456def789ghi0123abc456def789ghi0123456789012345678901",
    "signatureType": 2
  },
  "ownerId": 12345,
  "orderType": "GTC",
  "marketSlug": "biden-vs-trump-2024",
  "postOnly": true,
  "clientOrderId": "client-order-001",
  "onBehalfOf": 12345,
  "timestamp": 1735689600000,
  "recvWindow": 1500,
  "stpPolicy": "cancel_maker"
}

Response

Order successfully created and matched

makerMatchesMakerMatch[]

Maker matches if order was matched immediately

Example response

{
  "order": {
    "salt": "1778155025318314496",
    "maker": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
    "signer": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
    "taker": "0x0000000000000000000000000000000000000000",
    "tokenId": "19633204485790857949828516737993423758628930235371629943999544859324645414627",
    "makerAmount": "5000000",
    "takerAmount": "10000000",
    "expiration": "0",
    "signatureType": 2,
    "nonce": "0",
    "orderType": "GTC",
    "price": "0.75",
    "ownerId": 12345,
    "market": {
      "id": 7348,
      "slug": "btc-up-or-down-1-hour",
      "title": "BTC Up or Down - Hourly"
    }
  },
  "execution": {
    "matched": true,
    "settlementStatus": "MINED",
    "reason": "STP_TAKER_REJECTED",
    "eligibleAt": "2026-06-08T10:15:30.000Z",
    "tradeEventId": "4aa706dd-6c57-4f3c-945a-99818dfd95f1",
    "txHash": "0xabc123",
    "clientOrderId": "client-order-001",
    "stpMakerCancels": [
      "4aa706dd-6c57-4f3c-945a-99818dfd95f1"
    ],
    "feeRateBps": 25,
    "effectiveFeeBps": 26,
    "totalsRaw": {
      "contractsGross": "1000000",
      "contractsFee": "1000",
      "contractsNet": "999000",
      "usdGross": "500000",
      "usdFee": "500",
      "usdNet": "499500"
    }
  }
}