Skip to main content
POST
Cancel an order

Integration guide

Authorizations

x-app-id
string
header
required

Your application ID. Required on app-tier and user-tier routes. Omitted on routes that authenticate with x-app-api-key only.

Authorization
string
header
required

JWT access token from POST /auth/verify. Required with x-app-id on user routes. On the smart-route quote it is optional and turns a preview into an executable quote.

Body

application/json
orderId
string
required
Minimum string length: 1
cancelSignature
object

Self-custody Polymarket limit orders only; omit it for managed orders. An EIP-712 signature by the order's signing wallet (the signingAddress the order was placed with) over Polymarket's CLOB L1 auth message: domain { name: "ClobAuthDomain", version: "1", chainId: 137 }, primary type ClobAuth with fields address (address), timestamp (string), nonce (uint256), message (string), where address is the signing wallet, timestamp is the timestamp below encoded as a decimal string, nonce is 0, and message is "This message attests that I control the given wallet". Ask the user to sign when they cancel. The signature is never persisted or logged. The CLOB credentials derived from it are used only for this request and are not stored.

Response

200

quoteId
string | null
required

Quote whose orders were cancelled. null for limit orders and for orders placed directly on the venue.

orderIds
string[]
required

Ids of the affected orders. Can be empty for a venue order AGG did not know.

status
enum<string>
required

cancelled: done. cancel_pending: the venue has not confirmed yet; the order moves to cancelled (or fills) later.

Available options:
cancelled,
cancel_pending