Skip to main content
POST
/
orders
Create Order
curl --request POST \
  --url https://api.limitless.exchange/orders \
  --header 'Content-Type: application/json' \
  --header 'lmts-api-key: <api-key>' \
  --data '
{
  "order": {
    "salt": "1778155025318314496",
    "maker": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
    "signer": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
    "tokenId": "19633204485790857949828516737993423758628930235371629943999544859324645414627",
    "makerAmount": 5000000,
    "takerAmount": 10000000,
    "feeRateBps": 0,
    "side": 0,
    "signature": "0x123abc456def789ghi0123abc456def789ghi0123abc456def789ghi0123456789012345678901",
    "signatureType": 2,
    "taker": "0x0000000000000000000000000000000000000000",
    "expiration": "0",
    "nonce": 0,
    "price": 0.75
  },
  "ownerId": 12345,
  "orderType": "GTC",
  "marketSlug": "biden-vs-trump-2024",
  "postOnly": true,
  "clientOrderId": "client-order-001",
  "onBehalfOf": 12345,
  "timestamp": 1735689600000,
  "recvWindow": 1500,
  "stpPolicy": "cancel_maker"
}
'
{
  "order": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "salt": "1778155025318314496",
    "maker": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
    "signer": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
    "tokenId": "19633204485790857949828516737993423758628930235371629943999544859324645414627",
    "makerAmount": "5000000",
    "takerAmount": "10000000",
    "signatureType": 2,
    "signature": "<string>",
    "orderType": "GTC",
    "side": 0,
    "marketId": "<string>",
    "ownerId": 12345,
    "createdAt": "2023-11-07T05:31:56Z",
    "market": {
      "id": 7348,
      "slug": "btc-up-or-down-1-hour",
      "title": "BTC Up or Down - Hourly",
      "yesPositionId": "<string>",
      "noPositionId": "<string>",
      "group": {
        "id": 123,
        "slug": "<string>",
        "title": "<string>"
      }
    },
    "taker": "0x0000000000000000000000000000000000000000",
    "expiration": "0",
    "nonce": "0",
    "feeRateBps": 0,
    "price": "0.75",
    "updatedAt": "2023-11-07T05:31:56Z",
    "owner": {
      "id": 123,
      "account": "<string>",
      "displayName": "<string>",
      "username": "<string>",
      "imageURI": "<string>"
    }
  },
  "execution": {
    "matched": true,
    "settlementStatus": "MINED",
    "feeRateBps": 25,
    "effectiveFeeBps": 26,
    "totalsRaw": {
      "contractsGross": "1000000",
      "contractsFee": "1000",
      "contractsNet": "999000",
      "usdGross": "500000",
      "usdFee": "500",
      "usdNet": "499500"
    },
    "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"
    ]
  },
  "makerMatches": [
    {}
  ]
}
Before creating orders:
  1. Fetch market data via Get Market Details to get venue and token IDs
  2. Sign the order using EIP-712 with venue.exchange as verifyingContract
  3. Ensure you have token approvals set up
Order creation can be temporarily restricted during maintenance. In post_only, only orders with postOnly: true are accepted. In cancel_only or disabled, new orders return 503 Service Unavailable. Check Maintenance Mode before sending orders.

Optional Fields

FieldTypeDescription
clientOrderIdstringIdempotency key (max 128 chars). If a duplicate is submitted, the server returns 409 Conflict.
onBehalfOfnumberProfile 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.
postOnlybooleanGTC 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.
timestampnumberOptional client-stamped Unix time in milliseconds for receive-window checks. Top-level request field; not part of the signed order.
recvWindownumberOptional 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.
stpPolicystringSelf-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.
{
  "order": {
    "...": "signed order fields"
  },
  "orderType": "GTC",
  "marketSlug": "btc-100k",
  "timestamp": 1779870000000,
  "recvWindow": 1500
}
FieldDescription
timestampClient order creation time as Unix milliseconds. Direct API callers should send this with recvWindow when they want client-to-server freshness checks.
recvWindowMaximum accepted age, in milliseconds, between timestamp and the server receive time. Valid range: 1 to 10000. If omitted, no receive-window check is applied.
Keep trading hosts NTP-synced. If the timestamp is too far in the future or older than the receive window, the API returns 425 Too Early. Do not retry the same signed payload after a 425; build and sign a fresh order.

Self-Trade Prevention

POST /orders can reject or cancel orders that would match against your own resting order on the same token.
{
  "order": {
    "...": "signed order fields"
  },
  "orderType": "GTC",
  "marketSlug": "btc-100k",
  "stpPolicy": "cancel_taker"
}
PolicyResult
cancel_makerDefault. Cancel your conflicting resting order and continue with the incoming order.
cancel_takerReject the incoming order before it self-trades.
cancel_bothCancel your conflicting resting order and reject the incoming order.
With 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) returns settlementStatus: "CANCELED" with reason: "STP_TAKER_REJECTED".
  • A cancel_maker taker lists the canceled resting order IDs in stpMakerCancels and keeps its normal status (UNMATCHED when nothing else fills it); no reason is set.
stpPolicy is a top-level request field. Do not include it inside the EIP-712 signed order object.
SDK support. Self-trade prevention is available in the TypeScript, Python, Rust, and Go SDKs — pass the policy on order creation and read the outcome from the execution object on the response. See TypeScript, Python, Rust, and Go.
Where does 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.
ownerId must match the profile that owns the order (see Programmatic API — EOA flow):
  • Partner EOA + signed order + onBehalfOf: set both onBehalfOf and ownerId to the sub-account’s profileId. order.maker and order.signer must match that sub-account’s wallet. A mismatched ownerId returns 400"Profile ID does not match the order owner".
  • Delegated signing (unsigned order, delegated_signing scope, server wallet sub-account): the server fills in ownerId when it signs — omit the client signature per Delegated Signing below.
  • Trading as yourself (no onBehalfOf): ownerId is your own profile id (the SDK often fills this after fetching your profile).

Delegated Signing

Partners with the delegated_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 an execution object with settlement details:
FieldTypeDescription
matchedbooleanWhether the order was matched immediately
settlementStatusstringUNMATCHED, MATCHED, MINED, CONFIRMED, RETRYING, FAILED, DELAYED, or CANCELED
reasonstringReason 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.
eligibleAtstringISO-8601 time the order is released to the matching engine. Present only when settlementStatus is DELAYED (taker delay).
tradeEventIdstringTrade event ID (present when matched)
txHashstringOn-chain transaction hash (present when mined)
stpMakerCancelsstring[]Resting order IDs canceled by self-trade prevention (present when cancel_maker / cancel_both cancelled one or more of your resting orders)
feeRateBpsnumberFee rate in basis points
effectiveFeeBpsnumberEffective fee rate after rebates
totalsRawobjectRaw 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

lmts-api-key
string
header
required

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

application/json

Order creation data including signature and order parameters

order
object
required

Order details including signature and amounts

ownerId
number
required

Profile ID of the order owner

Example:

12345

orderType
enum<string>
required

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

Available options:
FAK,
FOK,
GTC
Example:

"GTC"

marketSlug
string
required

Market identifier slug

Example:

"biden-vs-trump-2024"

postOnly
boolean

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

Example:

true

clientOrderId
string

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

Maximum string length: 128
Example:

"client-order-001"

onBehalfOf
number

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.

Example:

12345

timestamp
number

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

Required range: x >= 0
Example:

1735689600000

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 EIP-712 signed order payload.

Required range: 1 <= x <= 10000
Example:

1500

stpPolicy
enum<string>

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

Available options:
cancel_both,
cancel_maker,
cancel_taker
Example:

"cancel_maker"

Response

Order successfully created and matched

order
object
required

Order details including slim market and owner

execution
object
required

Execution and settlement summary

makerMatches
object[]

Maker matches if order was matched immediately