Cancel one order and submit its replacement in one request. The two actions are not atomic: cancellation and replacement have independent outcomes, and a successful cancellation does not guarantee a successful replacement.
Identifies the order to cancel. Provide exactly one of orderId or clientOrderId.
replacement
object
A standard signed order request. It accepts the same fields as POST /orders, except onBehalfOf.
mode
string
STOP_ON_FAILURE or ALLOW_FAILURE. Controls whether replacement is attempted after cancellation fails.
onBehalfOf
number
Optional profile ID for an authorized partner sub-account. Applies to both cancellation and replacement.
replacement.ownerId must own the order being cancelled. Put onBehalfOf only at the operation level, not inside replacement.
The x-on-behalf-of header is not supported by this endpoint.
Use a scoped API token with the trading scope and HMAC-sign the exact request body and path /orders/cancel-replace; see Authentication.The cancellation itself is not EIP-712 signed. For a direct request, the replacement is a normal order and must contain an EIP-712 signature. The authenticated profile must be a valid signer of the order being cancelled.For an authorized partner sub-account, set the operation-level onBehalfOf to the sub-account profile ID and set replacement.ownerId to the same ID. This path requires delegated_signing in addition to trading. If the replacement omits its order signature, the server signs it only for a managed server-wallet sub-account under the existing delegated signing rules.
The order values below illustrate the request shape. Generate order.signature from the complete replacement payload instead of copying the placeholder signature.
Example: allow replacement after cancellation failure
Changing mode to ALLOW_FAILURE attempts the replacement even if cancellation fails. The replacement reports its own result. The response remains 409 Conflict because the complete cancel-and-replace operation did not succeed:
Request-level authentication, authorization, validation, market, signature, maintenance-mode, and receive-window failures return their ordinary HTTP status without a cancel/replace result. Maintenance-mode and receive-window rejections use 425 Too Early.A successful cancellation does not guarantee replacement success. Insufficient balance or allowance can produce cancel.status: "SUCCESS" with replacement.status: "FAILURE" and an HTTP-status error code such as "400"; the endpoint returns 409 Conflict.A receive-window or trading-availability rejection can likewise produce a successful cancellation with replacement.status: "FAILURE" and error.code: "425".
cancel.status can be SUCCESS, FAILURE, or UNKNOWN. replacement.status can be SUCCESS, FAILURE, UNKNOWN, or NOT_ATTEMPTED.
Outcome
HTTP status
Cancellation and replacement are both SUCCESS
200 OK
Cancellation fails under STOP_ON_FAILURE; replacement is NOT_ATTEMPTED
409 Conflict
Cancellation fails under ALLOW_FAILURE; replacement is attempted
409 Conflict
The service returns any other non-success top-level result
409 Conflict
Operation error codes are strings, not a closed enum. A missing cancellation target uses ORDER_NOT_FOUND; request failures use their decimal HTTP status such as 400, 404, 409, 425, or 500; other failures use INTERNAL_ERROR. FAILURE identifies a known failure and UNKNOWN an inconclusive outcome. Cancellation authorization failures remain request-level 401 or 403 responses.
replacement.status: "SUCCESS" means the placement was accepted. It does not guarantee on-chain settlement. A matched replacement remains top-level SUCCESS when replacement.data.execution.settlementStatus is FAILED; the settlement failure and reason remain nested under execution. There is no top-level SETTLEMENT_FAILED replacement status.
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.
The matching engine accepted the replacement. The canonical created-order, owner, maker-match, and execution schemas are reused; nested settlementStatus may still be FAILED with a free-form reason.
Option 1
Option 2
Option 3
Show child attributes
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Limitless Exchange","colors":{"primary":"#9AB83A","light":"#DCF58C","dark":"#7A9A1E"},"logo":{"light":"https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/light.svg?fit=max\u0026auto=format\u0026n=r7gW3TwphUtCZ8zM\u0026q=85\u0026s=0d6f32ed5e8a1f35ba9d1fa2e0b57a4b","dark":"https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/dark.svg?fit=max\u0026auto=format\u0026n=r7gW3TwphUtCZ8zM\u0026q=85\u0026s=6500e01609e582f758db1a9610b63bd8"},"favicon":"https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/favicon.svg?fit=max\u0026auto=format\u0026n=r7gW3TwphUtCZ8zM\u0026q=85\u0026s=345f02206803d94b3b1911d2a80bf9c3","api":{"playground":{}},"navbar":{"links":[{"href":"mailto:help@limitless.network","label":"Support"}]},"footer":{"socials":{"x":"https://x.com/trylimitless","discord":"https://discord.com/invite/yb4SscD8RZ"}},"seo":{"metatags":{"twitter:card":"summary_large_image"}},"contextual":{"options":["copy","view","chatgpt","claude","cursor"],"display":"header"},"styling":{"latex":true},"navigation":{"global":{"anchors":[{"anchor":"Limitless Exchange","icon":"arrow-up-right-from-square","href":"https://limitless.exchange"},{"anchor":"Builders Chat","icon":"telegram","href":"https://t.me/LimitlessBuildersChat"},{"anchor":"Discord","icon":"discord","href":"https://discord.com/invite/yb4SscD8RZ"},{"anchor":"Twitter","icon":"x-twitter","href":"https://x.com/trylimitless"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"limitless","hasAudioNarration":false,"actualSubdomain":"limitless","customDomains":["docs.limitless.exchange"],"gitSource":{"type":"github","owner":"limitless-labs-group","repo":"limitless-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"entitlements":{"AI_CHAT":{"status":"DISABLED"},"WEB_MCP":{"status":"DISABLED"},"NARRATION":{"status":"DISABLED"}},"buildId":"6ae2027fd6a250fd1db9a4f3","clientVersion":"0.0.4102","searchFilterCounts":[{"language":"default","tag":"API Reference","count":81},{"language":"default","tag":"For Developers","count":67},{"language":"default","tag":"User Guide","count":26},{"language":"default","tag":"Portfolio","count":14},{"language":"default","tag":"Trading","count":14},{"language":"default","tag":"Getting Started","count":14},{"language":"default","tag":"Go SDK","count":11},{"language":"default","tag":"Python SDK","count":11},{"language":"default","tag":"Rust SDK","count":11},{"language":"default","tag":"TypeScript SDK","count":11}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"api-reference/trading/cancel-replace","slug":"/api-reference/trading/cancel-replace","pageMetadata":{"title":"Cancel and Replace Order","openapi":"POST /orders/cancel-replace","description":null,"href":"/api-reference/trading/cancel-replace"},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{CodeBlock,Heading,Table,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Cancel one order and submit its replacement in one request. The two actions are `,_jsx(_components.strong,{children:`not atomic`}),`: cancellation and replacement have independent outcomes, and a successful cancellation does not guarantee a successful replacement.`]}),`\n`,_jsx(Heading,{level:`2`,id:`request`,children:`Request`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`cancel`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`object`})}),_jsxs(_components.td,{children:[`Identifies the order to cancel. Provide exactly one of `,_jsx(_components.code,{children:`orderId`}),` or `,_jsx(_components.code,{children:`clientOrderId`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`replacement`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`object`})}),_jsxs(_components.td,{children:[`A standard signed order request. It accepts the same fields as `,_jsx(_components.a,{href:`/api-reference/trading/create-order`,children:_jsx(_components.code,{children:`POST /orders`})}),`, except `,_jsx(_components.code,{children:`onBehalfOf`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`mode`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`string`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`STOP_ON_FAILURE`}),` or `,_jsx(_components.code,{children:`ALLOW_FAILURE`}),`. Controls whether replacement is attempted after cancellation fails.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`onBehalfOf`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`number`})}),_jsx(_components.td,{children:`Optional profile ID for an authorized partner sub-account. Applies to both cancellation and replacement.`})]})]})]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`replacement.ownerId`}),` must own the order being cancelled. Put `,_jsx(_components.code,{children:`onBehalfOf`}),` only at the operation level, not inside `,_jsx(_components.code,{children:`replacement`}),`.\nThe `,_jsx(_components.code,{children:`x-on-behalf-of`}),` header is not supported by this endpoint.`]}),`\n`,_jsx(Heading,{level:`3`,id:`failure-modes`,children:`Failure modes`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Mode`}),_jsx(_components.th,{children:`Cancellation fails`}),_jsx(_components.th,{children:`Replacement result`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`STOP_ON_FAILURE`})}),_jsx(_components.td,{children:`Stops this operation`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`NOT_ATTEMPTED`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`ALLOW_FAILURE`})}),_jsx(_components.td,{children:`Continues this operation`}),_jsxs(_components.td,{children:[`Placement is attempted and reports `,_jsx(_components.code,{children:`SUCCESS`}),`, `,_jsx(_components.code,{children:`FAILURE`}),`, or `,_jsx(_components.code,{children:`UNKNOWN`}),` independently`]})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`authentication-and-signing`,children:`Authentication and signing`}),`\n`,_jsxs(_components.p,{children:[`Use a scoped API token with the `,_jsx(_components.code,{children:`trading`}),` scope and HMAC-sign the exact request body and path `,_jsx(_components.code,{children:`/orders/cancel-replace`}),`; see `,_jsx(_components.a,{href:`/developers/authentication#hmac-request-signing`,children:`Authentication`}),`.`]}),`\n`,_jsxs(_components.p,{children:[`The cancellation itself is not EIP-712 signed. For a direct request, the replacement is a normal order and must contain an `,_jsx(_components.a,{href:`/developers/eip712-signing`,children:`EIP-712 signature`}),`. The authenticated profile must be a valid signer of the order being cancelled.`]}),`\n`,_jsxs(_components.p,{children:[`For an authorized partner sub-account, set the operation-level `,_jsx(_components.code,{children:`onBehalfOf`}),` to the sub-account profile ID and set `,_jsx(_components.code,{children:`replacement.ownerId`}),` to the same ID. This path requires `,_jsx(_components.code,{children:`delegated_signing`}),` in addition to `,_jsx(_components.code,{children:`trading`}),`. If the replacement omits its order signature, the server signs it only for a managed server-wallet sub-account under the existing `,_jsx(_components.a,{href:`/developers/authentication#delegated-signing`,children:`delegated signing`}),` rules.`]}),`\n`,_jsx(Heading,{level:`2`,id:`example-stop-after-cancellation-failure`,children:`Example: stop after cancellation failure`}),`\n`,_jsxs(_components.p,{children:[`The order values below illustrate the request shape. Generate `,_jsx(_components.code,{children:`order.signature`}),` from the complete replacement payload instead of copying the placeholder signature.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`27`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`27`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"cancel\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"clientOrderId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"old-order-001\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"replacement\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"ownerId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`12345`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"orderType\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"GTC\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"marketSlug\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"btc-100k\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"clientOrderId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"replacement-001\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"order\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"salt\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"1778155025318314496\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"maker\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"0x742d35Cc6634C0532925a3b844Bc454e4438f44e\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"signer\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"0x742d35Cc6634C0532925a3b844Bc454e4438f44e\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"taker\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"0x0000000000000000000000000000000000000000\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"tokenId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"19633204485790857949828516737993423758628930235371629943999544859324645414627\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"makerAmount\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`5000000`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"takerAmount\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`10000000`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"nonce\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"price\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.5`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"feeRateBps\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"side\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"signature\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"0x1234\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"signatureType\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"mode\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"STOP_ON_FAILURE\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`If `,_jsx(_components.code,{children:`old-order-001`}),` is not found, the response is `,_jsx(_components.code,{children:`409 Conflict`}),`:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`12`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`12`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"cancel\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"FAILURE\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ORDER_NOT_FOUND\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Order not found\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"replacement\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"NOT_ATTEMPTED\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`example-allow-replacement-after-cancellation-failure`,children:`Example: allow replacement after cancellation failure`}),`\n`,_jsxs(_components.p,{children:[`Changing `,_jsx(_components.code,{children:`mode`}),` to `,_jsx(_components.code,{children:`ALLOW_FAILURE`}),` attempts the replacement even if cancellation fails. The replacement reports its own result. The response remains `,_jsx(_components.code,{children:`409 Conflict`}),` because the complete cancel-and-replace operation did not succeed:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`16`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`16`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"cancel\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"FAILURE\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ORDER_NOT_FOUND\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Order not found\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"replacement\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"FAILURE\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"400\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Insufficient balance\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`validation-and-outcomes`,children:`Validation and outcomes`}),`\n`,_jsxs(_components.p,{children:[`Request-level authentication, authorization, validation, market, signature, maintenance-mode, and receive-window failures return their ordinary HTTP status without a cancel/replace result. Maintenance-mode and receive-window rejections use `,_jsx(_components.code,{children:`425 Too Early`}),`.`]}),`\n`,_jsxs(_components.p,{children:[`A successful cancellation does not guarantee replacement success. Insufficient balance or allowance can produce `,_jsx(_components.code,{children:`cancel.status: \"SUCCESS\"`}),` with `,_jsx(_components.code,{children:`replacement.status: \"FAILURE\"`}),` and an HTTP-status error code such as `,_jsx(_components.code,{children:`\"400\"`}),`; the endpoint returns `,_jsx(_components.code,{children:`409 Conflict`}),`.`]}),`\n`,_jsxs(_components.p,{children:[`A receive-window or trading-availability rejection can likewise produce a successful cancellation with `,_jsx(_components.code,{children:`replacement.status: \"FAILURE\"`}),` and `,_jsx(_components.code,{children:`error.code: \"425\"`}),`.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`13`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`13`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"cancel\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"SUCCESS\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"orderId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"6f52b6d2-6c9e-4a5c-8a4f-28ab4b7ff203\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"replacement\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"FAILURE\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"425\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"order receive window expired: elapsed=2500ms, window=1500ms\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`response-semantics`,children:`Response semantics`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`cancel.status`}),` can be `,_jsx(_components.code,{children:`SUCCESS`}),`, `,_jsx(_components.code,{children:`FAILURE`}),`, or `,_jsx(_components.code,{children:`UNKNOWN`}),`. `,_jsx(_components.code,{children:`replacement.status`}),` can be `,_jsx(_components.code,{children:`SUCCESS`}),`, `,_jsx(_components.code,{children:`FAILURE`}),`, `,_jsx(_components.code,{children:`UNKNOWN`}),`, or `,_jsx(_components.code,{children:`NOT_ATTEMPTED`}),`.`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Outcome`}),_jsx(_components.th,{children:`HTTP status`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[`Cancellation and replacement are both `,_jsx(_components.code,{children:`SUCCESS`})]}),_jsx(_components.td,{children:_jsx(_components.code,{children:`200 OK`})})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[`Cancellation fails under `,_jsx(_components.code,{children:`STOP_ON_FAILURE`}),`; replacement is `,_jsx(_components.code,{children:`NOT_ATTEMPTED`})]}),_jsx(_components.td,{children:_jsx(_components.code,{children:`409 Conflict`})})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[`Cancellation fails under `,_jsx(_components.code,{children:`ALLOW_FAILURE`}),`; replacement is attempted`]}),_jsx(_components.td,{children:_jsx(_components.code,{children:`409 Conflict`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`The service returns any other non-success top-level result`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`409 Conflict`})})]})]})]}),`\n`,_jsxs(_components.p,{children:[`Operation error codes are strings, not a closed enum. A missing cancellation target uses `,_jsx(_components.code,{children:`ORDER_NOT_FOUND`}),`; request failures use their decimal HTTP status such as `,_jsx(_components.code,{children:`400`}),`, `,_jsx(_components.code,{children:`404`}),`, `,_jsx(_components.code,{children:`409`}),`, `,_jsx(_components.code,{children:`425`}),`, or `,_jsx(_components.code,{children:`500`}),`; other failures use `,_jsx(_components.code,{children:`INTERNAL_ERROR`}),`. `,_jsx(_components.code,{children:`FAILURE`}),` identifies a known failure and `,_jsx(_components.code,{children:`UNKNOWN`}),` an inconclusive outcome. Cancellation authorization failures remain request-level `,_jsx(_components.code,{children:`401`}),` or `,_jsx(_components.code,{children:`403`}),` responses.`]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`replacement.status: \"SUCCESS\"`}),` means the placement was accepted. It does not guarantee on-chain settlement. A matched replacement remains top-level `,_jsx(_components.code,{children:`SUCCESS`}),` when `,_jsx(_components.code,{children:`replacement.data.execution.settlementStatus`}),` is `,_jsx(_components.code,{children:`FAILED`}),`; the settlement failure and `,_jsx(_components.code,{children:`reason`}),` remain nested under `,_jsx(_components.code,{children:`execution`}),`. There is no top-level `,_jsx(_components.code,{children:`SETTLEMENT_FAILED`}),` replacement status.`]})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Cancel and Replace Order","openapi":"POST /orders/cancel-replace","description":null,"href":"/api-reference/trading/cancel-replace"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Request","slug":"request","depth":2,"children":[{"title":"Failure modes","slug":"failure-modes","depth":3,"children":[]}]},{"title":"Authentication and signing","slug":"authentication-and-signing","depth":2,"children":[]},{"title":"Example: stop after cancellation failure","slug":"example-stop-after-cancellation-failure","depth":2,"children":[]},{"title":"Example: allow replacement after cancellation failure","slug":"example-allow-replacement-after-cancellation-failure","depth":2,"children":[]},{"title":"Validation and outcomes","slug":"validation-and-outcomes","depth":2,"children":[]},{"title":"Response semantics","slug":"response-semantics","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"operationId":"OrderController_cancelReplace","parameters":[],"requestBody":"007de676-dacd-4edb-9c3b-1e4bc6a96ee0","responses":{"200":"60f13afd-1809-4e38-9a06-dea606c7839f","400":"54f94a41-6160-4971-9635-1c61b9bc8a94","401":"cb419664-0d07-466d-8780-9d9fef9e0380","403":"52054537-9323-432c-9dbb-8d13ebcbadcf","404":"dbd202a2-90c7-4310-8ceb-47b597d1f6e2","409":"41963ea4-6a61-478b-a8d6-9feec8acafd3","425":"d10a1b4e-af13-4e26-99d8-50be5b4d110f","500":"66ac48ae-8669-4ecd-a67a-4f07a03302c7"},"security":["f3540713-6f20-4f18-a2b4-4e02a71fffeb"],"summary":"Cancel an order and place a replacement non-atomically","tags":["Trading"],"method":"post","type":"path","servers":["09c89b92-1b1b-488d-af55-0f936f286701"],"path":"/orders/cancel-replace","baseUrlOptions":["https://api.limitless.exchange"],"title":"Cancel an order and place a replacement non-atomically","description":"","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"cancel":{"oneOf":[{"type":"object","description":"Order to cancel; provide exactly one identifier","required":["orderId"],"properties":{"orderId":{"type":"string","description":"Internal order ID. Provide exactly one of orderId or clientOrderId.","example":"6f52b6d2-6c9e-4a5c-8a4f-28ab4b7ff203","format":"uuid","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$","isRequired":true,"uniqueKey":"cancel.oneOf.0.orderId","typeLabel":"string\u003cuuid>"},"clientOrderId":{"type":"string","description":"Client-provided order ID from order creation. Provide exactly one of orderId or clientOrderId.","example":"partner-order-001","maxLength":128,"uniqueKey":"cancel.oneOf.0.clientOrderId","typeLabel":"string"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"cancel.oneOf.0","typeLabel":"object"},{"type":"object","description":"Order to cancel; provide exactly one identifier","required":["clientOrderId"],"properties":{"clientOrderId":{"type":"string","description":"Client-provided order ID from order creation. Provide exactly one of orderId or clientOrderId.","example":"partner-order-001","maxLength":128,"isRequired":true,"uniqueKey":"cancel.oneOf.1.clientOrderId","typeLabel":"string"},"orderId":{"type":"string","description":"Internal order ID. Provide exactly one of orderId or clientOrderId.","example":"6f52b6d2-6c9e-4a5c-8a4f-28ab4b7ff203","format":"uuid","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$","uniqueKey":"cancel.oneOf.1.orderId","typeLabel":"string\u003cuuid>"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"cancel.oneOf.1","typeLabel":"object"}],"isRequired":true,"uniqueKey":"cancel","typeLabel":"object"},"replacement":{"type":"object","properties":{"order":{"oneOf":[{"type":"object","description":"Order details including signature and amounts","required":["salt","maker","signer","tokenId","makerAmount","takerAmount","nonce","feeRateBps","side","signature","signatureType"],"properties":{"salt":{"oneOf":[{"type":"string","description":"Unique random value for signature uniqueness. Send unsafe integers as decimal strings to preserve EIP-712 bytes.","pattern":"^\\d+$","example":"1778155025318314496","isRequired":true,"uniqueKey":"replacement.order.oneOf.0.salt.oneOf.0","typeLabel":"string"},{"type":"number","description":"Unique random value for signature uniqueness. Send unsafe integers as decimal strings to preserve EIP-712 bytes.","example":1234567890,"isRequired":true,"uniqueKey":"replacement.order.oneOf.0.salt.oneOf.1","typeLabel":"number"}],"isRequired":true,"uniqueKey":"replacement.order.oneOf.0.salt","typeLabel":"string | number"},"maker":{"type":"string","description":"Ethereum address of the maker (order creator)","example":"0x742d35Cc6634C0532925a3b844Bc454e4438f44e","pattern":"^0x[a-fA-F0-9]{40}$","isRequired":true,"uniqueKey":"replacement.order.oneOf.0.maker","typeLabel":"string"},"signer":{"type":"string","description":"Address that signed the order","example":"0x742d35Cc6634C0532925a3b844Bc454e4438f44e","pattern":"^0x[a-fA-F0-9]{40}$","isRequired":true,"uniqueKey":"replacement.order.oneOf.0.signer","typeLabel":"string"},"tokenId":{"type":"string","description":"Token ID being traded (YES or NO position ID from conditional token)","example":"19633204485790857949828516737993423758628930235371629943999544859324645414627","isRequired":true,"uniqueKey":"replacement.order.oneOf.0.tokenId","typeLabel":"string"},"makerAmount":{"type":"integer","description":"Raw 6-decimal amount offered by the maker. For GTC/FAK: collateral for BUY or contracts for SELL. For FOK: maximum collateral for BUY or contracts for SELL.","example":5000000,"minimum":100,"isRequired":true,"uniqueKey":"replacement.order.oneOf.0.makerAmount","typeLabel":"integer"},"takerAmount":{"type":"integer","description":"Raw 6-decimal amount requested. For GTC/FAK: contracts for BUY or collateral for SELL. For FOK this must equal 1.","example":10000000,"minimum":1,"isRequired":true,"uniqueKey":"replacement.order.oneOf.0.takerAmount","typeLabel":"integer"},"nonce":{"type":"number","description":"Required numeric zero.","example":0,"enum":[0],"isRequired":true,"uniqueKey":"replacement.order.oneOf.0.nonce","typeLabel":"enum\u003cnumber>"},"feeRateBps":{"type":"number","description":"Fee rate in basis points (1% = 100)","example":0,"isRequired":true,"uniqueKey":"replacement.order.oneOf.0.feeRateBps","typeLabel":"number"},"side":{"type":"number","description":"Order side: 0 = BUY, 1 = SELL","enum":[0,1],"example":0,"isRequired":true,"uniqueKey":"replacement.order.oneOf.0.side","typeLabel":"enum\u003cnumber>"},"signature":{"type":"string","description":"EIP-712 signature of order details as a 0x-prefixed hex string with full-byte (even) length. Optional when using delegated signing.","example":"0x6e3a3f2c2c2bb1ce3a14c4f5e4ad6f3c8b1ad9c44d4d5fa1c4cd5b6e74a4d4a36cc4ad9c44d4d5fa1c4cd5b6e74a4d4a36cc4ad9c44d4d5fa1c4cd5b6e74a4d41b","pattern":"^0x([a-fA-F0-9]{2})*$","isRequired":true,"uniqueKey":"replacement.order.oneOf.0.signature","typeLabel":"string"},"signatureType":{"type":"number","description":"Signature type (0-3). Optional when using delegated signing.","enum":[0,1,2,3],"example":2,"isRequired":true,"uniqueKey":"replacement.order.oneOf.0.signatureType","typeLabel":"enum\u003cnumber>"},"taker":{"type":"string","description":"Specific taker address (optional for open orders)","example":"0x0000000000000000000000000000000000000000","pattern":"^0x[a-fA-F0-9]{40}$","uniqueKey":"replacement.order.oneOf.0.taker","typeLabel":"string"},"expiration":{"type":"string","description":"Omission is signed as zero; if supplied, the value must represent zero because non-zero expiration is unsupported.","example":"0","pattern":"^0+$","uniqueKey":"replacement.order.oneOf.0.expiration","typeLabel":"string"},"price":{"type":"number","description":"Required for GTC/FAK and forbidden for FOK. Decimal price with at most three places; price × contracts must equal the collateral amount exactly as an integer.","example":0.75,"minimum":0.001,"maximum":0.999,"multipleOf":0.001,"uniqueKey":"replacement.order.oneOf.0.price","typeLabel":"number"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"replacement.order.oneOf.0","typeLabel":"object"},{"type":"object","description":"Order details including signature and amounts","required":["salt","maker","signer","tokenId","makerAmount","takerAmount","nonce","feeRateBps","side"],"properties":{"salt":{"oneOf":[{"type":"string","description":"Unique random value for signature uniqueness. Send unsafe integers as decimal strings to preserve EIP-712 bytes.","pattern":"^\\d+$","example":"1778155025318314496","isRequired":true,"uniqueKey":"replacement.order.oneOf.1.salt.oneOf.0","typeLabel":"string"},{"type":"number","description":"Unique random value for signature uniqueness. Send unsafe integers as decimal strings to preserve EIP-712 bytes.","example":1234567890,"isRequired":true,"uniqueKey":"replacement.order.oneOf.1.salt.oneOf.1","typeLabel":"number"}],"isRequired":true,"uniqueKey":"replacement.order.oneOf.1.salt","typeLabel":"string | number"},"maker":{"type":"string","description":"Ethereum address of the maker (order creator)","example":"0x742d35Cc6634C0532925a3b844Bc454e4438f44e","pattern":"^0x[a-fA-F0-9]{40}$","isRequired":true,"uniqueKey":"replacement.order.oneOf.1.maker","typeLabel":"string"},"signer":{"type":"string","description":"Address that signed the order","example":"0x742d35Cc6634C0532925a3b844Bc454e4438f44e","pattern":"^0x[a-fA-F0-9]{40}$","isRequired":true,"uniqueKey":"replacement.order.oneOf.1.signer","typeLabel":"string"},"tokenId":{"type":"string","description":"Token ID being traded (YES or NO position ID from conditional token)","example":"19633204485790857949828516737993423758628930235371629943999544859324645414627","isRequired":true,"uniqueKey":"replacement.order.oneOf.1.tokenId","typeLabel":"string"},"makerAmount":{"type":"integer","description":"Raw 6-decimal amount offered by the maker. For GTC/FAK: collateral for BUY or contracts for SELL. For FOK: maximum collateral for BUY or contracts for SELL.","example":5000000,"minimum":100,"isRequired":true,"uniqueKey":"replacement.order.oneOf.1.makerAmount","typeLabel":"integer"},"takerAmount":{"type":"integer","description":"Raw 6-decimal amount requested. For GTC/FAK: contracts for BUY or collateral for SELL. For FOK this must equal 1.","example":10000000,"minimum":1,"isRequired":true,"uniqueKey":"replacement.order.oneOf.1.takerAmount","typeLabel":"integer"},"nonce":{"type":"number","description":"Required numeric zero.","example":0,"enum":[0],"isRequired":true,"uniqueKey":"replacement.order.oneOf.1.nonce","typeLabel":"enum\u003cnumber>"},"feeRateBps":{"type":"number","description":"Fee rate in basis points (1% = 100)","example":0,"isRequired":true,"uniqueKey":"replacement.order.oneOf.1.feeRateBps","typeLabel":"number"},"side":{"type":"number","description":"Order side: 0 = BUY, 1 = SELL","enum":[0,1],"example":0,"isRequired":true,"uniqueKey":"replacement.order.oneOf.1.side","typeLabel":"enum\u003cnumber>"},"taker":{"type":"string","description":"Specific taker address (optional for open orders)","example":"0x0000000000000000000000000000000000000000","pattern":"^0x[a-fA-F0-9]{40}$","uniqueKey":"replacement.order.oneOf.1.taker","typeLabel":"string"},"expiration":{"type":"string","description":"Omission is signed as zero; if supplied, the value must represent zero because non-zero expiration is unsupported.","example":"0","pattern":"^0+$","uniqueKey":"replacement.order.oneOf.1.expiration","typeLabel":"string"},"price":{"type":"number","description":"Required for GTC/FAK and forbidden for FOK. Decimal price with at most three places; price × contracts must equal the collateral amount exactly as an integer.","example":0.75,"minimum":0.001,"maximum":0.999,"multipleOf":0.001,"uniqueKey":"replacement.order.oneOf.1.price","typeLabel":"number"},"signature":{"type":"string","description":"EIP-712 signature of order details as a 0x-prefixed hex string with full-byte (even) length. Optional when using delegated signing.","example":"0x6e3a3f2c2c2bb1ce3a14c4f5e4ad6f3c8b1ad9c44d4d5fa1c4cd5b6e74a4d4a36cc4ad9c44d4d5fa1c4cd5b6e74a4d4a36cc4ad9c44d4d5fa1c4cd5b6e74a4d41b","pattern":"^0x([a-fA-F0-9]{2})*$","uniqueKey":"replacement.order.oneOf.1.signature","typeLabel":"string"},"signatureType":{"type":"number","description":"Signature type (0-3). Optional when using delegated signing.","enum":[0,1,2,3],"example":2,"uniqueKey":"replacement.order.oneOf.1.signatureType","typeLabel":"enum\u003cnumber>"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"replacement.order.oneOf.1","typeLabel":"object"}],"isRequired":true,"uniqueKey":"replacement.order","typeLabel":"object"},"ownerId":{"type":"integer","description":"Required profile ID of the order owner. For delegated signing, send the target profile ID as both ownerId and onBehalfOf.","example":12345,"isRequired":true,"uniqueKey":"replacement.ownerId","typeLabel":"integer"},"orderType":{"type":"string","description":"Order type (GTC=Good Till Cancelled, FAK=Fill And Kill, FOK=Fill Or Kill)","enum":["FAK","FOK","GTC"],"example":"GTC","isRequired":true,"uniqueKey":"replacement.orderType","typeLabel":"enum\u003cstring>"},"marketSlug":{"type":"string","description":"Market identifier slug","example":"biden-vs-trump-2024","isRequired":true,"uniqueKey":"replacement.marketSlug","typeLabel":"string"},"postOnly":{"type":"boolean","description":"Reject the order if it would match immediately. Supported only for GTC orders.","example":true,"uniqueKey":"replacement.postOnly","typeLabel":"boolean"},"clientOrderId":{"type":"string","description":"Optional owner-scoped uniqueness and deduplication key. The submitted value is limited to 128 characters, then trimmed; blank values are rejected. Reuse returns 409 rather than replaying an earlier response.","example":"client-order-001","maxLength":128,"uniqueKey":"replacement.clientOrderId","typeLabel":"string"},"timestamp":{"type":"integer","description":"Optional client-stamped order creation time, Unix ms epoch. Top-level request field; not part of the EIP-712 signed order payload.","example":1735689600000,"minimum":0,"uniqueKey":"replacement.timestamp","typeLabel":"integer"},"recvWindow":{"type":"integer","description":"Optional maximum accepted order age in milliseconds. Valid range: 1 to 10000. If omitted, the server applies a 2000 ms default receive window. Top-level request field; not part of the EIP-712 signed order payload.","example":1500,"maximum":10000,"minimum":1,"uniqueKey":"replacement.recvWindow","typeLabel":"integer"},"stpPolicy":{"type":"string","description":"Self-trade prevention policy. If omitted, defaults to cancel_maker. Top-level request field; not part of the EIP-712 signed order payload.","enum":["cancel_both","cancel_maker","cancel_taker"],"example":"cancel_maker","uniqueKey":"replacement.stpPolicy","typeLabel":"enum\u003cstring>"}},"additionalProperties":false,"description":"Replacement order fields. This is the POST /orders request shape without onBehalfOf; delegation is set on the enclosing cancel-replace operation.","required":["order","ownerId","orderType","marketSlug"],"isRequired":true,"uniqueKey":"replacement","typeLabel":"object"},"mode":{"type":"string","enum":["ALLOW_FAILURE","STOP_ON_FAILURE"],"description":"Whether to stop this operation or attempt replacement after cancellation failure","example":"STOP_ON_FAILURE","isRequired":true,"uniqueKey":"mode","typeLabel":"enum\u003cstring>"},"onBehalfOf":{"type":"number","minimum":1,"description":"Authorized partner sub-account profile ID. Applies to both cancellation and replacement.","example":12345,"uniqueKey":"onBehalfOf","typeLabel":"number"}},"additionalProperties":false,"required":["cancel","replacement","mode"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"cancel":{"orderId":"6f52b6d2-6c9e-4a5c-8a4f-28ab4b7ff203","clientOrderId":"partner-order-001"},"replacement":{"order":{"salt":"1778155025318314496","maker":"0x742d35Cc6634C0532925a3b844Bc454e4438f44e","signer":"0x742d35Cc6634C0532925a3b844Bc454e4438f44e","tokenId":"19633204485790857949828516737993423758628930235371629943999544859324645414627","makerAmount":5000000,"takerAmount":10000000,"nonce":0,"feeRateBps":0,"side":0,"signature":"0x6e3a3f2c2c2bb1ce3a14c4f5e4ad6f3c8b1ad9c44d4d5fa1c4cd5b6e74a4d4a36cc4ad9c44d4d5fa1c4cd5b6e74a4d4a36cc4ad9c44d4d5fa1c4cd5b6e74a4d41b","signatureType":2,"taker":"0x0000000000000000000000000000000000000000","expiration":"0","price":0.75},"ownerId":12345,"orderType":"GTC","marketSlug":"biden-vs-trump-2024","postOnly":true,"clientOrderId":"client-order-001","timestamp":1735689600000,"recvWindow":1500,"stpPolicy":"cancel_maker"},"mode":"STOP_ON_FAILURE","onBehalfOf":12345}}},"exampleType":"generated"}},"exampleType":"generated"},"responses":{"60f13afd-1809-4e38-9a06-dea606c7839f":{"description":"Cancellation and replacement both succeeded","content":{"application/json":{"schema":{"type":"object","properties":{"cancel":{"oneOf":[{"type":"object","required":["status","orderId"],"properties":{"status":{"type":"string","enum":["SUCCESS"],"isRequired":true,"uniqueKey":"cancel.oneOf.0.status","typeLabel":"enum\u003cstring>"},"orderId":{"type":"string","format":"uuid","isRequired":true,"uniqueKey":"cancel.oneOf.0.orderId","typeLabel":"string\u003cuuid>"},"clientOrderId":{"type":"string","uniqueKey":"cancel.oneOf.0.clientOrderId","typeLabel":"string"}},"isRequired":true,"uniqueKey":"cancel.oneOf.0","typeLabel":"object"},{"type":"object","description":"FAILURE covers a missing target or expected HTTP error below 500. UNKNOWN means the cancellation outcome could not be determined.","required":["status","error"],"properties":{"status":{"type":"string","enum":["FAILURE","UNKNOWN"],"isRequired":true,"uniqueKey":"cancel.oneOf.1.status","typeLabel":"enum\u003cstring>"},"error":{"type":"object","properties":{"code":{"type":"string","description":"ORDER_NOT_FOUND, a decimal HTTP status such as 400/404/409/425/500, or INTERNAL_ERROR.","example":"ORDER_NOT_FOUND","isRequired":true,"uniqueKey":"cancel.oneOf.1.error.code","typeLabel":"string"},"message":{"type":"string","example":"Order not found","isRequired":true,"uniqueKey":"cancel.oneOf.1.error.message","typeLabel":"string"}},"description":"Operation-level error. Code is not a closed enum: ORDER_NOT_FOUND identifies a missing cancellation target, decimal HTTP status strings identify captured HTTP failures, and INTERNAL_ERROR identifies uncategorized errors.","required":["code","message"],"isRequired":true,"uniqueKey":"cancel.oneOf.1.error","typeLabel":"object"}},"isRequired":true,"uniqueKey":"cancel.oneOf.1","typeLabel":"object"}],"isRequired":true,"uniqueKey":"cancel","typeLabel":"object"},"replacement":{"oneOf":[{"type":"object","description":"The matching engine accepted the replacement. The canonical created-order, owner, maker-match, and execution schemas are reused; nested settlementStatus may still be FAILED with a free-form reason.","required":["status","data"],"properties":{"status":{"type":"string","enum":["SUCCESS"],"isRequired":true,"uniqueKey":"replacement.oneOf.0.status","typeLabel":"enum\u003cstring>"},"data":{"type":"object","properties":{"order":{"type":"object","description":"Order details including slim market and owner","required":["id","salt","maker","signer","tokenId","signatureType","signature","orderType","side","marketId","ownerId","createdAt","market","makerAmount","takerAmount","nonce","owner"],"properties":{"id":{"type":"string","format":"uuid","description":"Internal order ID","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.order.id","typeLabel":"string\u003cuuid>"},"salt":{"type":"string","description":"Order salt as a decimal string","example":"1778155025318314496","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.order.salt","typeLabel":"string"},"maker":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.order.maker","typeLabel":"string"},"signer":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.order.signer","typeLabel":"string"},"tokenId":{"type":"string","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.order.tokenId","typeLabel":"string"},"signatureType":{"type":"number","enum":[0,1,2,3],"isRequired":true,"uniqueKey":"replacement.oneOf.0.data.order.signatureType","typeLabel":"enum\u003cnumber>"},"signature":{"type":"string","pattern":"^0x([a-fA-F0-9]{2})*$","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.order.signature","typeLabel":"string"},"orderType":{"type":"string","enum":["GTC","FAK","FOK"],"isRequired":true,"uniqueKey":"replacement.oneOf.0.data.order.orderType","typeLabel":"enum\u003cstring>"},"side":{"type":"number","enum":[0,1],"description":"0 = BUY, 1 = SELL","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.order.side","typeLabel":"enum\u003cnumber>"},"marketId":{"type":"string","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.order.marketId","typeLabel":"string"},"ownerId":{"type":"integer","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.order.ownerId","typeLabel":"integer"},"createdAt":{"type":"string","format":"date-time","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.order.createdAt","typeLabel":"string\u003cdate-time>"},"market":{"type":"object","properties":{"id":{"type":"integer","example":7348,"isRequired":true,"uniqueKey":"replacement.oneOf.0.data.order.market.id","typeLabel":"integer"},"slug":{"type":"string","example":"btc-up-or-down-1-hour","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.order.market.slug","typeLabel":"string"},"title":{"type":"string","example":"BTC Up or Down - Hourly","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.order.market.title","typeLabel":"string"},"status":{"type":"string","example":"FUNDED","enum":["CREATED","DRAFTED","FUNDED","LOCKED","RESOLVED"],"isRequired":true,"uniqueKey":"replacement.oneOf.0.data.order.market.status","typeLabel":"enum\u003cstring>"},"yesPositionId":{"oneOf":[{"type":"string","example":"11514974713064423461...","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.order.market.yesPositionId.oneOf.0","typeLabel":"string"},{"type":"null","example":"11514974713064423461...","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.order.market.yesPositionId.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"replacement.oneOf.0.data.order.market.yesPositionId","typeLabel":"string | null"},"noPositionId":{"oneOf":[{"type":"string","example":"14525308260861904048...","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.order.market.noPositionId.oneOf.0","typeLabel":"string"},{"type":"null","example":"14525308260861904048...","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.order.market.noPositionId.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"replacement.oneOf.0.data.order.market.noPositionId","typeLabel":"string | null"},"group":{"type":"object","properties":{"id":{"type":"integer","example":42,"isRequired":true,"uniqueKey":"replacement.oneOf.0.data.order.market.group.id","typeLabel":"integer"},"slug":{"type":"string","example":"btc-price-markets","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.order.market.group.slug","typeLabel":"string"},"title":{"type":"string","example":"BTC Price Markets","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.order.market.group.title","typeLabel":"string"}},"required":["id","slug","title"],"uniqueKey":"replacement.oneOf.0.data.order.market.group","typeLabel":"object"}},"required":["id","slug","title","status","yesPositionId","noPositionId"],"isRequired":true,"uniqueKey":"replacement.oneOf.0.data.order.market","typeLabel":"object"},"makerAmount":{"type":"integer","description":"Raw 6-decimal amount","example":5000000,"isRequired":true,"uniqueKey":"replacement.oneOf.0.data.order.makerAmount","typeLabel":"integer"},"takerAmount":{"type":"integer","description":"Raw 6-decimal amount","example":10000000,"isRequired":true,"uniqueKey":"replacement.oneOf.0.data.order.takerAmount","typeLabel":"integer"},"nonce":{"type":"number","enum":[0],"description":"Numeric zero","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.order.nonce","typeLabel":"enum\u003cnumber>"},"owner":{"type":"object","properties":{"id":{"type":"integer","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.order.owner.id","typeLabel":"integer"},"account":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.order.owner.account","typeLabel":"string"},"client":{"type":"string","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.order.owner.client","typeLabel":"string"},"tradeWalletOption":{"oneOf":[{"type":"string","enum":["eoa","smartWallet"],"isRequired":true,"uniqueKey":"replacement.oneOf.0.data.order.owner.tradeWalletOption.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","enum":["eoa","smartWallet"],"isRequired":true,"uniqueKey":"replacement.oneOf.0.data.order.owner.tradeWalletOption.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"replacement.oneOf.0.data.order.owner.tradeWalletOption","typeLabel":"enum\u003cstring> | null"},"smartWallet":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.order.owner.smartWallet.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.order.owner.smartWallet.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"replacement.oneOf.0.data.order.owner.smartWallet","typeLabel":"string | null"},"username":{"type":"string","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.order.owner.username","typeLabel":"string"},"displayName":{"type":"string","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.order.owner.displayName","typeLabel":"string"},"pfpUrl":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.order.owner.pfpUrl.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.order.owner.pfpUrl.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"replacement.oneOf.0.data.order.owner.pfpUrl","typeLabel":"string | null"},"socialUrl":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.order.owner.socialUrl.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.order.owner.socialUrl.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"replacement.oneOf.0.data.order.owner.socialUrl","typeLabel":"string | null"},"rankName":{"type":"string","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.order.owner.rankName","typeLabel":"string"},"points":{"type":"number","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.order.owner.points","typeLabel":"number"},"referredUsersCount":{"type":"integer","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.order.owner.referredUsersCount","typeLabel":"integer"},"isTop100":{"type":"boolean","uniqueKey":"replacement.oneOf.0.data.order.owner.isTop100","typeLabel":"boolean"},"leaderboardPosition":{"type":"integer","uniqueKey":"replacement.oneOf.0.data.order.owner.leaderboardPosition","typeLabel":"integer"}},"required":["id","account","client","tradeWalletOption","smartWallet","username","displayName","pfpUrl","socialUrl","rankName","points","referredUsersCount"],"isRequired":true,"uniqueKey":"replacement.oneOf.0.data.order.owner","typeLabel":"object"},"taker":{"oneOf":[{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$","uniqueKey":"replacement.oneOf.0.data.order.taker.oneOf.0","typeLabel":"string"},{"type":"null","pattern":"^0x[a-fA-F0-9]{40}$","uniqueKey":"replacement.oneOf.0.data.order.taker.oneOf.1","typeLabel":"null"}],"uniqueKey":"replacement.oneOf.0.data.order.taker","typeLabel":"string | null"},"expiration":{"oneOf":[{"type":"string","format":"date-time","uniqueKey":"replacement.oneOf.0.data.order.expiration.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","uniqueKey":"replacement.oneOf.0.data.order.expiration.oneOf.1","typeLabel":"null"}],"uniqueKey":"replacement.oneOf.0.data.order.expiration","typeLabel":"string\u003cdate-time> | null"},"feeRateBps":{"oneOf":[{"type":"integer","uniqueKey":"replacement.oneOf.0.data.order.feeRateBps.oneOf.0","typeLabel":"integer"},{"type":"null","uniqueKey":"replacement.oneOf.0.data.order.feeRateBps.oneOf.1","typeLabel":"null"}],"uniqueKey":"replacement.oneOf.0.data.order.feeRateBps","typeLabel":"integer | null"},"price":{"type":"number","example":0.75,"uniqueKey":"replacement.oneOf.0.data.order.price","typeLabel":"number"}},"isRequired":true,"uniqueKey":"replacement.oneOf.0.data.order","typeLabel":"object"},"execution":{"type":"object","description":"Execution and settlement summary","required":["matched","settlementStatus","feeRateBps","effectiveFeeBps","totalsRaw"],"properties":{"matched":{"type":"boolean","example":true,"isRequired":true,"uniqueKey":"replacement.oneOf.0.data.execution.matched","typeLabel":"boolean"},"settlementStatus":{"type":"string","example":"MINED","enum":["UNMATCHED","MATCHED","MINED","CONFIRMED","RETRYING","FAILED","DELAYED","CANCELED"],"isRequired":true,"uniqueKey":"replacement.oneOf.0.data.execution.settlementStatus","typeLabel":"enum\u003cstring>"},"feeRateBps":{"type":"number","example":25,"isRequired":true,"uniqueKey":"replacement.oneOf.0.data.execution.feeRateBps","typeLabel":"number"},"effectiveFeeBps":{"type":"number","example":26,"isRequired":true,"uniqueKey":"replacement.oneOf.0.data.execution.effectiveFeeBps","typeLabel":"number"},"totalsRaw":{"type":"object","properties":{"contractsGross":{"type":"string","example":"1000000","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.execution.totalsRaw.contractsGross","typeLabel":"string"},"contractsFee":{"type":"string","example":"1000","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.execution.totalsRaw.contractsFee","typeLabel":"string"},"contractsNet":{"type":"string","example":"999000","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.execution.totalsRaw.contractsNet","typeLabel":"string"},"usdGross":{"type":"string","example":"500000","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.execution.totalsRaw.usdGross","typeLabel":"string"},"usdFee":{"type":"string","example":"500","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.execution.totalsRaw.usdFee","typeLabel":"string"},"usdNet":{"type":"string","example":"499500","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.execution.totalsRaw.usdNet","typeLabel":"string"}},"required":["contractsGross","contractsFee","contractsNet","usdGross","usdFee","usdNet"],"isRequired":true,"uniqueKey":"replacement.oneOf.0.data.execution.totalsRaw","typeLabel":"object"},"reason":{"type":"string","example":"settlement transaction reverted","uniqueKey":"replacement.oneOf.0.data.execution.reason","typeLabel":"string"},"eligibleAt":{"oneOf":[{"type":"string","example":"2026-06-08T10:15:30.000Z","format":"date-time","uniqueKey":"replacement.oneOf.0.data.execution.eligibleAt.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","example":"2026-06-08T10:15:30.000Z","format":"date-time","uniqueKey":"replacement.oneOf.0.data.execution.eligibleAt.oneOf.1","typeLabel":"null"}],"uniqueKey":"replacement.oneOf.0.data.execution.eligibleAt","typeLabel":"string\u003cdate-time> | null"},"tradeEventId":{"type":"string","example":"4aa706dd-6c57-4f3c-945a-99818dfd95f1","uniqueKey":"replacement.oneOf.0.data.execution.tradeEventId","typeLabel":"string"},"txHash":{"oneOf":[{"type":"string","example":"0xabc123","uniqueKey":"replacement.oneOf.0.data.execution.txHash.oneOf.0","typeLabel":"string"},{"type":"null","example":"0xabc123","uniqueKey":"replacement.oneOf.0.data.execution.txHash.oneOf.1","typeLabel":"null"}],"uniqueKey":"replacement.oneOf.0.data.execution.txHash","typeLabel":"string | null"},"clientOrderId":{"type":"string","example":"client-order-001","uniqueKey":"replacement.oneOf.0.data.execution.clientOrderId","typeLabel":"string"},"stpMakerCancels":{"example":["4aa706dd-6c57-4f3c-945a-99818dfd95f1"],"type":"array","items":{"type":"string","uniqueKey":"replacement.oneOf.0.data.execution.stpMakerCancels.items.[INDEX]","typeLabel":"string"},"uniqueKey":"replacement.oneOf.0.data.execution.stpMakerCancels","typeLabel":"string[]"}},"isRequired":true,"uniqueKey":"replacement.oneOf.0.data.execution","typeLabel":"object"},"makerMatches":{"description":"Maker matches if order was matched immediately","type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.makerMatches.items.[INDEX].id","typeLabel":"string\u003cuuid>"},"matchedSize":{"type":"string","description":"Matched contracts in raw 6-decimal units.","example":"1000000","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.makerMatches.items.[INDEX].matchedSize","typeLabel":"string"},"fillPrice":{"type":"string","description":"Effective taker-perspective fill price.","example":"0.55","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.makerMatches.items.[INDEX].fillPrice","typeLabel":"string"},"fillCost":{"type":"string","description":"Fill collateral cost in raw 6-decimal units.","example":"550000","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.makerMatches.items.[INDEX].fillCost","typeLabel":"string"},"orderId":{"type":"string","format":"uuid","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.makerMatches.items.[INDEX].orderId","typeLabel":"string\u003cuuid>"},"order":{"type":"object","properties":{"id":{"type":"string","format":"uuid","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.makerMatches.items.[INDEX].order.id","typeLabel":"string\u003cuuid>"},"maker":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.makerMatches.items.[INDEX].order.maker","typeLabel":"string"},"price":{"oneOf":[{"type":"string","example":"0.55","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.makerMatches.items.[INDEX].order.price.oneOf.0","typeLabel":"string"},{"type":"null","example":"0.55","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.makerMatches.items.[INDEX].order.price.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"replacement.oneOf.0.data.makerMatches.items.[INDEX].order.price","typeLabel":"string | null"},"side":{"type":"number","enum":[0,1],"isRequired":true,"uniqueKey":"replacement.oneOf.0.data.makerMatches.items.[INDEX].order.side","typeLabel":"enum\u003cnumber>"},"tokenId":{"type":"string","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.makerMatches.items.[INDEX].order.tokenId","typeLabel":"string"},"owner":{"type":"object","properties":{"id":{"type":"integer","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.makerMatches.items.[INDEX].order.owner.id","typeLabel":"integer"},"account":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.makerMatches.items.[INDEX].order.owner.account","typeLabel":"string"},"client":{"type":"string","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.makerMatches.items.[INDEX].order.owner.client","typeLabel":"string"},"tradeWalletOption":{"oneOf":[{"type":"string","enum":["eoa","smartWallet"],"isRequired":true,"uniqueKey":"replacement.oneOf.0.data.makerMatches.items.[INDEX].order.owner.tradeWalletOption.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","enum":["eoa","smartWallet"],"isRequired":true,"uniqueKey":"replacement.oneOf.0.data.makerMatches.items.[INDEX].order.owner.tradeWalletOption.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"replacement.oneOf.0.data.makerMatches.items.[INDEX].order.owner.tradeWalletOption","typeLabel":"enum\u003cstring> | null"},"smartWallet":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.makerMatches.items.[INDEX].order.owner.smartWallet.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.makerMatches.items.[INDEX].order.owner.smartWallet.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"replacement.oneOf.0.data.makerMatches.items.[INDEX].order.owner.smartWallet","typeLabel":"string | null"},"username":{"type":"string","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.makerMatches.items.[INDEX].order.owner.username","typeLabel":"string"},"displayName":{"type":"string","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.makerMatches.items.[INDEX].order.owner.displayName","typeLabel":"string"},"pfpUrl":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.makerMatches.items.[INDEX].order.owner.pfpUrl.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.makerMatches.items.[INDEX].order.owner.pfpUrl.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"replacement.oneOf.0.data.makerMatches.items.[INDEX].order.owner.pfpUrl","typeLabel":"string | null"},"socialUrl":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.makerMatches.items.[INDEX].order.owner.socialUrl.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.makerMatches.items.[INDEX].order.owner.socialUrl.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"replacement.oneOf.0.data.makerMatches.items.[INDEX].order.owner.socialUrl","typeLabel":"string | null"},"points":{"type":"number","enum":[0],"isRequired":true,"uniqueKey":"replacement.oneOf.0.data.makerMatches.items.[INDEX].order.owner.points","typeLabel":"enum\u003cnumber>"},"referredUsersCount":{"type":"number","enum":[0],"isRequired":true,"uniqueKey":"replacement.oneOf.0.data.makerMatches.items.[INDEX].order.owner.referredUsersCount","typeLabel":"enum\u003cnumber>"}},"required":["id","account","client","tradeWalletOption","smartWallet","username","displayName","pfpUrl","socialUrl","points","referredUsersCount"],"isRequired":true,"uniqueKey":"replacement.oneOf.0.data.makerMatches.items.[INDEX].order.owner","typeLabel":"object"}},"required":["id","maker","price","side","tokenId","owner"],"isRequired":true,"uniqueKey":"replacement.oneOf.0.data.makerMatches.items.[INDEX].order","typeLabel":"object"}},"required":["id","matchedSize","fillPrice","fillCost","orderId","order"],"uniqueKey":"replacement.oneOf.0.data.makerMatches.items.[INDEX]","typeLabel":"object"},"uniqueKey":"replacement.oneOf.0.data.makerMatches","typeLabel":"object[]"}},"required":["order","execution"],"isRequired":true,"uniqueKey":"replacement.oneOf.0.data","typeLabel":"object"}},"isRequired":true,"uniqueKey":"replacement.oneOf.0","typeLabel":"object"},{"type":"object","description":"FAILURE covers rejected and thrown placement errors, including balance or allowance rejection and an execution-time 425 after cancellation. UNKNOWN means placement reported an inconclusive result.","required":["status","error"],"properties":{"status":{"type":"string","enum":["FAILURE","UNKNOWN"],"isRequired":true,"uniqueKey":"replacement.oneOf.1.status","typeLabel":"enum\u003cstring>"},"error":{"type":"object","properties":{"code":{"type":"string","description":"ORDER_NOT_FOUND, a decimal HTTP status such as 400/404/409/425/500, or INTERNAL_ERROR.","example":"ORDER_NOT_FOUND","isRequired":true,"uniqueKey":"replacement.oneOf.1.error.code","typeLabel":"string"},"message":{"type":"string","example":"Order not found","isRequired":true,"uniqueKey":"replacement.oneOf.1.error.message","typeLabel":"string"}},"description":"Operation-level error. Code is not a closed enum: ORDER_NOT_FOUND identifies a missing cancellation target, decimal HTTP status strings identify captured HTTP failures, and INTERNAL_ERROR identifies uncategorized errors.","required":["code","message"],"isRequired":true,"uniqueKey":"replacement.oneOf.1.error","typeLabel":"object"}},"isRequired":true,"uniqueKey":"replacement.oneOf.1","typeLabel":"object"},{"type":"object","required":["status"],"properties":{"status":{"type":"string","enum":["NOT_ATTEMPTED"],"isRequired":true,"uniqueKey":"replacement.oneOf.2.status","typeLabel":"enum\u003cstring>"}},"isRequired":true,"uniqueKey":"replacement.oneOf.2","typeLabel":"object"}],"isRequired":true,"uniqueKey":"replacement","typeLabel":"object"}},"description":"Independent cancellation and replacement outcomes.","required":["cancel","replacement"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"cancel":{"status":"SUCCESS","orderId":"3c90c3cc-0d44-4b50-8888-8dd25736052a","clientOrderId":"\u003cstring>"},"replacement":{"status":"SUCCESS","data":{"order":{"id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","salt":"1778155025318314496","maker":"\u003cstring>","signer":"\u003cstring>","tokenId":"\u003cstring>","signatureType":0,"signature":"\u003cstring>","orderType":"GTC","side":0,"marketId":"\u003cstring>","ownerId":123,"createdAt":"2023-11-07T05:31:56Z","market":{"id":7348,"slug":"btc-up-or-down-1-hour","title":"BTC Up or Down - Hourly","status":"FUNDED","yesPositionId":"11514974713064423461...","noPositionId":"14525308260861904048...","group":{"id":42,"slug":"btc-price-markets","title":"BTC Price Markets"}},"makerAmount":5000000,"takerAmount":10000000,"nonce":0,"owner":{"id":123,"account":"\u003cstring>","client":"\u003cstring>","tradeWalletOption":"eoa","smartWallet":"\u003cstring>","username":"\u003cstring>","displayName":"\u003cstring>","pfpUrl":"\u003cstring>","socialUrl":"\u003cstring>","rankName":"\u003cstring>","points":123,"referredUsersCount":123,"isTop100":true,"leaderboardPosition":123},"taker":"\u003cstring>","expiration":"2023-11-07T05:31:56Z","feeRateBps":123,"price":0.75},"execution":{"matched":true,"settlementStatus":"MINED","feeRateBps":25,"effectiveFeeBps":26,"totalsRaw":{"contractsGross":"1000000","contractsFee":"1000","contractsNet":"999000","usdGross":"500000","usdFee":"500","usdNet":"499500"},"reason":"settlement transaction reverted","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":[{"id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","matchedSize":"1000000","fillPrice":"0.55","fillCost":"550000","orderId":"3c90c3cc-0d44-4b50-8888-8dd25736052a","order":{"id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","maker":"\u003cstring>","price":"0.55","side":0,"tokenId":"\u003cstring>","owner":{"id":123,"account":"\u003cstring>","client":"\u003cstring>","tradeWalletOption":"eoa","smartWallet":"\u003cstring>","username":"\u003cstring>","displayName":"\u003cstring>","pfpUrl":"\u003cstring>","socialUrl":"\u003cstring>","points":0,"referredUsersCount":0}}}]}}}}},"exampleType":"generated"}},"exampleType":"generated"},"54f94a41-6160-4971-9635-1c61b9bc8a94":{"description":"Request validation or cancel-replace preflight failed before mutation","content":{"application/json":{"schema":{"oneOf":[{"type":"object","required":["message","error","statusCode"],"properties":{"message":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","example":"orderIds","isRequired":true,"uniqueKey":"oneOf.0.message.items.[INDEX].field","typeLabel":"string"},"message":{"type":"string","example":"orderIds should not be empty","isRequired":true,"uniqueKey":"oneOf.0.message.items.[INDEX].message","typeLabel":"string"}},"additionalProperties":false,"required":["field","message"],"uniqueKey":"oneOf.0.message.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"oneOf.0.message","typeLabel":"object[]"},"error":{"type":"string","enum":["Bad Request"],"isRequired":true,"uniqueKey":"oneOf.0.error","typeLabel":"enum\u003cstring>"},"statusCode":{"type":"number","enum":[400],"isRequired":true,"uniqueKey":"oneOf.0.statusCode","typeLabel":"enum\u003cnumber>"}},"additionalProperties":false,"uniqueKey":"oneOf.0","typeLabel":"object"},{"type":"object","required":["message","error","statusCode"],"properties":{"message":{"type":"string","isRequired":true,"uniqueKey":"oneOf.1.message","typeLabel":"string"},"error":{"type":"string","isRequired":true,"uniqueKey":"oneOf.1.error","typeLabel":"string"},"statusCode":{"type":"integer","isRequired":true,"uniqueKey":"oneOf.1.statusCode","typeLabel":"integer"}},"additionalProperties":false,"uniqueKey":"oneOf.1","typeLabel":"object"},{"type":"object","required":["message"],"properties":{"message":{"type":"string","isRequired":true,"uniqueKey":"oneOf.2.message","typeLabel":"string"}},"additionalProperties":false,"uniqueKey":"oneOf.2","typeLabel":"object"}],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"message":[{"field":"orderIds","message":"orderIds should not be empty"}],"error":"Bad Request","statusCode":400}}},"exampleType":"generated"}},"exampleType":"generated"},"cb419664-0d07-466d-8780-9d9fef9e0380":{"description":"Authentication or cancellation authorization failed before mutation","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","isRequired":true,"uniqueKey":"message","typeLabel":"string"},"error":{"type":"string","isRequired":true,"uniqueKey":"error","typeLabel":"string"},"statusCode":{"type":"integer","isRequired":true,"uniqueKey":"statusCode","typeLabel":"integer"}},"additionalProperties":false,"required":["message","error","statusCode"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"message":"\u003cstring>","error":"\u003cstring>","statusCode":123}}},"exampleType":"generated"}},"exampleType":"generated"},"52054537-9323-432c-9dbb-8d13ebcbadcf":{"description":"Required scope, delegated target authorization, or replacement ownership check failed","content":{"application/json":{"schema":{"oneOf":[{"type":"object","required":["message"],"properties":{"message":{"type":"string","isRequired":true,"uniqueKey":"oneOf.0.message","typeLabel":"string"}},"additionalProperties":false,"uniqueKey":"oneOf.0","typeLabel":"object"},{"type":"object","required":["message","error","statusCode"],"properties":{"message":{"type":"string","isRequired":true,"uniqueKey":"oneOf.1.message","typeLabel":"string"},"error":{"type":"string","isRequired":true,"uniqueKey":"oneOf.1.error","typeLabel":"string"},"statusCode":{"type":"integer","isRequired":true,"uniqueKey":"oneOf.1.statusCode","typeLabel":"integer"}},"additionalProperties":false,"uniqueKey":"oneOf.1","typeLabel":"object"}],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"message":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"dbd202a2-90c7-4310-8ceb-47b597d1f6e2":{"description":"Replacement market or profile was not found during preflight","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","isRequired":true,"uniqueKey":"message","typeLabel":"string"},"error":{"type":"string","isRequired":true,"uniqueKey":"error","typeLabel":"string"},"statusCode":{"type":"integer","isRequired":true,"uniqueKey":"statusCode","typeLabel":"integer"}},"additionalProperties":false,"required":["message","error","statusCode"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"message":"\u003cstring>","error":"\u003cstring>","statusCode":123}}},"exampleType":"generated"}},"exampleType":"generated"},"41963ea4-6a61-478b-a8d6-9feec8acafd3":{"description":"Cancellation or replacement did not succeed","content":{"application/json":{"schema":{"type":"object","properties":{"cancel":{"oneOf":[{"type":"object","required":["status","orderId"],"properties":{"status":{"type":"string","enum":["SUCCESS"],"isRequired":true,"uniqueKey":"cancel.oneOf.0.status","typeLabel":"enum\u003cstring>"},"orderId":{"type":"string","format":"uuid","isRequired":true,"uniqueKey":"cancel.oneOf.0.orderId","typeLabel":"string\u003cuuid>"},"clientOrderId":{"type":"string","uniqueKey":"cancel.oneOf.0.clientOrderId","typeLabel":"string"}},"isRequired":true,"uniqueKey":"cancel.oneOf.0","typeLabel":"object"},{"type":"object","description":"FAILURE covers a missing target or expected HTTP error below 500. UNKNOWN means the cancellation outcome could not be determined.","required":["status","error"],"properties":{"status":{"type":"string","enum":["FAILURE","UNKNOWN"],"isRequired":true,"uniqueKey":"cancel.oneOf.1.status","typeLabel":"enum\u003cstring>"},"error":{"type":"object","properties":{"code":{"type":"string","description":"ORDER_NOT_FOUND, a decimal HTTP status such as 400/404/409/425/500, or INTERNAL_ERROR.","example":"ORDER_NOT_FOUND","isRequired":true,"uniqueKey":"cancel.oneOf.1.error.code","typeLabel":"string"},"message":{"type":"string","example":"Order not found","isRequired":true,"uniqueKey":"cancel.oneOf.1.error.message","typeLabel":"string"}},"description":"Operation-level error. Code is not a closed enum: ORDER_NOT_FOUND identifies a missing cancellation target, decimal HTTP status strings identify captured HTTP failures, and INTERNAL_ERROR identifies uncategorized errors.","required":["code","message"],"isRequired":true,"uniqueKey":"cancel.oneOf.1.error","typeLabel":"object"}},"isRequired":true,"uniqueKey":"cancel.oneOf.1","typeLabel":"object"}],"isRequired":true,"uniqueKey":"cancel","typeLabel":"object"},"replacement":{"oneOf":[{"type":"object","description":"The matching engine accepted the replacement. The canonical created-order, owner, maker-match, and execution schemas are reused; nested settlementStatus may still be FAILED with a free-form reason.","required":["status","data"],"properties":{"status":{"type":"string","enum":["SUCCESS"],"isRequired":true,"uniqueKey":"replacement.oneOf.0.status","typeLabel":"enum\u003cstring>"},"data":{"type":"object","properties":{"order":{"type":"object","description":"Order details including slim market and owner","required":["id","salt","maker","signer","tokenId","signatureType","signature","orderType","side","marketId","ownerId","createdAt","market","makerAmount","takerAmount","nonce","owner"],"properties":{"id":{"type":"string","format":"uuid","description":"Internal order ID","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.order.id","typeLabel":"string\u003cuuid>"},"salt":{"type":"string","description":"Order salt as a decimal string","example":"1778155025318314496","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.order.salt","typeLabel":"string"},"maker":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.order.maker","typeLabel":"string"},"signer":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.order.signer","typeLabel":"string"},"tokenId":{"type":"string","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.order.tokenId","typeLabel":"string"},"signatureType":{"type":"number","enum":[0,1,2,3],"isRequired":true,"uniqueKey":"replacement.oneOf.0.data.order.signatureType","typeLabel":"enum\u003cnumber>"},"signature":{"type":"string","pattern":"^0x([a-fA-F0-9]{2})*$","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.order.signature","typeLabel":"string"},"orderType":{"type":"string","enum":["GTC","FAK","FOK"],"isRequired":true,"uniqueKey":"replacement.oneOf.0.data.order.orderType","typeLabel":"enum\u003cstring>"},"side":{"type":"number","enum":[0,1],"description":"0 = BUY, 1 = SELL","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.order.side","typeLabel":"enum\u003cnumber>"},"marketId":{"type":"string","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.order.marketId","typeLabel":"string"},"ownerId":{"type":"integer","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.order.ownerId","typeLabel":"integer"},"createdAt":{"type":"string","format":"date-time","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.order.createdAt","typeLabel":"string\u003cdate-time>"},"market":{"type":"object","properties":{"id":{"type":"integer","example":7348,"isRequired":true,"uniqueKey":"replacement.oneOf.0.data.order.market.id","typeLabel":"integer"},"slug":{"type":"string","example":"btc-up-or-down-1-hour","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.order.market.slug","typeLabel":"string"},"title":{"type":"string","example":"BTC Up or Down - Hourly","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.order.market.title","typeLabel":"string"},"status":{"type":"string","example":"FUNDED","enum":["CREATED","DRAFTED","FUNDED","LOCKED","RESOLVED"],"isRequired":true,"uniqueKey":"replacement.oneOf.0.data.order.market.status","typeLabel":"enum\u003cstring>"},"yesPositionId":{"oneOf":[{"type":"string","example":"11514974713064423461...","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.order.market.yesPositionId.oneOf.0","typeLabel":"string"},{"type":"null","example":"11514974713064423461...","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.order.market.yesPositionId.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"replacement.oneOf.0.data.order.market.yesPositionId","typeLabel":"string | null"},"noPositionId":{"oneOf":[{"type":"string","example":"14525308260861904048...","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.order.market.noPositionId.oneOf.0","typeLabel":"string"},{"type":"null","example":"14525308260861904048...","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.order.market.noPositionId.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"replacement.oneOf.0.data.order.market.noPositionId","typeLabel":"string | null"},"group":{"type":"object","properties":{"id":{"type":"integer","example":42,"isRequired":true,"uniqueKey":"replacement.oneOf.0.data.order.market.group.id","typeLabel":"integer"},"slug":{"type":"string","example":"btc-price-markets","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.order.market.group.slug","typeLabel":"string"},"title":{"type":"string","example":"BTC Price Markets","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.order.market.group.title","typeLabel":"string"}},"required":["id","slug","title"],"uniqueKey":"replacement.oneOf.0.data.order.market.group","typeLabel":"object"}},"required":["id","slug","title","status","yesPositionId","noPositionId"],"isRequired":true,"uniqueKey":"replacement.oneOf.0.data.order.market","typeLabel":"object"},"makerAmount":{"type":"integer","description":"Raw 6-decimal amount","example":5000000,"isRequired":true,"uniqueKey":"replacement.oneOf.0.data.order.makerAmount","typeLabel":"integer"},"takerAmount":{"type":"integer","description":"Raw 6-decimal amount","example":10000000,"isRequired":true,"uniqueKey":"replacement.oneOf.0.data.order.takerAmount","typeLabel":"integer"},"nonce":{"type":"number","enum":[0],"description":"Numeric zero","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.order.nonce","typeLabel":"enum\u003cnumber>"},"owner":{"type":"object","properties":{"id":{"type":"integer","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.order.owner.id","typeLabel":"integer"},"account":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.order.owner.account","typeLabel":"string"},"client":{"type":"string","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.order.owner.client","typeLabel":"string"},"tradeWalletOption":{"oneOf":[{"type":"string","enum":["eoa","smartWallet"],"isRequired":true,"uniqueKey":"replacement.oneOf.0.data.order.owner.tradeWalletOption.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","enum":["eoa","smartWallet"],"isRequired":true,"uniqueKey":"replacement.oneOf.0.data.order.owner.tradeWalletOption.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"replacement.oneOf.0.data.order.owner.tradeWalletOption","typeLabel":"enum\u003cstring> | null"},"smartWallet":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.order.owner.smartWallet.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.order.owner.smartWallet.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"replacement.oneOf.0.data.order.owner.smartWallet","typeLabel":"string | null"},"username":{"type":"string","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.order.owner.username","typeLabel":"string"},"displayName":{"type":"string","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.order.owner.displayName","typeLabel":"string"},"pfpUrl":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.order.owner.pfpUrl.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.order.owner.pfpUrl.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"replacement.oneOf.0.data.order.owner.pfpUrl","typeLabel":"string | null"},"socialUrl":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.order.owner.socialUrl.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.order.owner.socialUrl.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"replacement.oneOf.0.data.order.owner.socialUrl","typeLabel":"string | null"},"rankName":{"type":"string","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.order.owner.rankName","typeLabel":"string"},"points":{"type":"number","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.order.owner.points","typeLabel":"number"},"referredUsersCount":{"type":"integer","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.order.owner.referredUsersCount","typeLabel":"integer"},"isTop100":{"type":"boolean","uniqueKey":"replacement.oneOf.0.data.order.owner.isTop100","typeLabel":"boolean"},"leaderboardPosition":{"type":"integer","uniqueKey":"replacement.oneOf.0.data.order.owner.leaderboardPosition","typeLabel":"integer"}},"required":["id","account","client","tradeWalletOption","smartWallet","username","displayName","pfpUrl","socialUrl","rankName","points","referredUsersCount"],"isRequired":true,"uniqueKey":"replacement.oneOf.0.data.order.owner","typeLabel":"object"},"taker":{"oneOf":[{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$","uniqueKey":"replacement.oneOf.0.data.order.taker.oneOf.0","typeLabel":"string"},{"type":"null","pattern":"^0x[a-fA-F0-9]{40}$","uniqueKey":"replacement.oneOf.0.data.order.taker.oneOf.1","typeLabel":"null"}],"uniqueKey":"replacement.oneOf.0.data.order.taker","typeLabel":"string | null"},"expiration":{"oneOf":[{"type":"string","format":"date-time","uniqueKey":"replacement.oneOf.0.data.order.expiration.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","uniqueKey":"replacement.oneOf.0.data.order.expiration.oneOf.1","typeLabel":"null"}],"uniqueKey":"replacement.oneOf.0.data.order.expiration","typeLabel":"string\u003cdate-time> | null"},"feeRateBps":{"oneOf":[{"type":"integer","uniqueKey":"replacement.oneOf.0.data.order.feeRateBps.oneOf.0","typeLabel":"integer"},{"type":"null","uniqueKey":"replacement.oneOf.0.data.order.feeRateBps.oneOf.1","typeLabel":"null"}],"uniqueKey":"replacement.oneOf.0.data.order.feeRateBps","typeLabel":"integer | null"},"price":{"type":"number","example":0.75,"uniqueKey":"replacement.oneOf.0.data.order.price","typeLabel":"number"}},"isRequired":true,"uniqueKey":"replacement.oneOf.0.data.order","typeLabel":"object"},"execution":{"type":"object","description":"Execution and settlement summary","required":["matched","settlementStatus","feeRateBps","effectiveFeeBps","totalsRaw"],"properties":{"matched":{"type":"boolean","example":true,"isRequired":true,"uniqueKey":"replacement.oneOf.0.data.execution.matched","typeLabel":"boolean"},"settlementStatus":{"type":"string","example":"MINED","enum":["UNMATCHED","MATCHED","MINED","CONFIRMED","RETRYING","FAILED","DELAYED","CANCELED"],"isRequired":true,"uniqueKey":"replacement.oneOf.0.data.execution.settlementStatus","typeLabel":"enum\u003cstring>"},"feeRateBps":{"type":"number","example":25,"isRequired":true,"uniqueKey":"replacement.oneOf.0.data.execution.feeRateBps","typeLabel":"number"},"effectiveFeeBps":{"type":"number","example":26,"isRequired":true,"uniqueKey":"replacement.oneOf.0.data.execution.effectiveFeeBps","typeLabel":"number"},"totalsRaw":{"type":"object","properties":{"contractsGross":{"type":"string","example":"1000000","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.execution.totalsRaw.contractsGross","typeLabel":"string"},"contractsFee":{"type":"string","example":"1000","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.execution.totalsRaw.contractsFee","typeLabel":"string"},"contractsNet":{"type":"string","example":"999000","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.execution.totalsRaw.contractsNet","typeLabel":"string"},"usdGross":{"type":"string","example":"500000","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.execution.totalsRaw.usdGross","typeLabel":"string"},"usdFee":{"type":"string","example":"500","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.execution.totalsRaw.usdFee","typeLabel":"string"},"usdNet":{"type":"string","example":"499500","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.execution.totalsRaw.usdNet","typeLabel":"string"}},"required":["contractsGross","contractsFee","contractsNet","usdGross","usdFee","usdNet"],"isRequired":true,"uniqueKey":"replacement.oneOf.0.data.execution.totalsRaw","typeLabel":"object"},"reason":{"type":"string","example":"settlement transaction reverted","uniqueKey":"replacement.oneOf.0.data.execution.reason","typeLabel":"string"},"eligibleAt":{"oneOf":[{"type":"string","example":"2026-06-08T10:15:30.000Z","format":"date-time","uniqueKey":"replacement.oneOf.0.data.execution.eligibleAt.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","example":"2026-06-08T10:15:30.000Z","format":"date-time","uniqueKey":"replacement.oneOf.0.data.execution.eligibleAt.oneOf.1","typeLabel":"null"}],"uniqueKey":"replacement.oneOf.0.data.execution.eligibleAt","typeLabel":"string\u003cdate-time> | null"},"tradeEventId":{"type":"string","example":"4aa706dd-6c57-4f3c-945a-99818dfd95f1","uniqueKey":"replacement.oneOf.0.data.execution.tradeEventId","typeLabel":"string"},"txHash":{"oneOf":[{"type":"string","example":"0xabc123","uniqueKey":"replacement.oneOf.0.data.execution.txHash.oneOf.0","typeLabel":"string"},{"type":"null","example":"0xabc123","uniqueKey":"replacement.oneOf.0.data.execution.txHash.oneOf.1","typeLabel":"null"}],"uniqueKey":"replacement.oneOf.0.data.execution.txHash","typeLabel":"string | null"},"clientOrderId":{"type":"string","example":"client-order-001","uniqueKey":"replacement.oneOf.0.data.execution.clientOrderId","typeLabel":"string"},"stpMakerCancels":{"example":["4aa706dd-6c57-4f3c-945a-99818dfd95f1"],"type":"array","items":{"type":"string","uniqueKey":"replacement.oneOf.0.data.execution.stpMakerCancels.items.[INDEX]","typeLabel":"string"},"uniqueKey":"replacement.oneOf.0.data.execution.stpMakerCancels","typeLabel":"string[]"}},"isRequired":true,"uniqueKey":"replacement.oneOf.0.data.execution","typeLabel":"object"},"makerMatches":{"description":"Maker matches if order was matched immediately","type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.makerMatches.items.[INDEX].id","typeLabel":"string\u003cuuid>"},"matchedSize":{"type":"string","description":"Matched contracts in raw 6-decimal units.","example":"1000000","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.makerMatches.items.[INDEX].matchedSize","typeLabel":"string"},"fillPrice":{"type":"string","description":"Effective taker-perspective fill price.","example":"0.55","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.makerMatches.items.[INDEX].fillPrice","typeLabel":"string"},"fillCost":{"type":"string","description":"Fill collateral cost in raw 6-decimal units.","example":"550000","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.makerMatches.items.[INDEX].fillCost","typeLabel":"string"},"orderId":{"type":"string","format":"uuid","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.makerMatches.items.[INDEX].orderId","typeLabel":"string\u003cuuid>"},"order":{"type":"object","properties":{"id":{"type":"string","format":"uuid","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.makerMatches.items.[INDEX].order.id","typeLabel":"string\u003cuuid>"},"maker":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.makerMatches.items.[INDEX].order.maker","typeLabel":"string"},"price":{"oneOf":[{"type":"string","example":"0.55","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.makerMatches.items.[INDEX].order.price.oneOf.0","typeLabel":"string"},{"type":"null","example":"0.55","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.makerMatches.items.[INDEX].order.price.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"replacement.oneOf.0.data.makerMatches.items.[INDEX].order.price","typeLabel":"string | null"},"side":{"type":"number","enum":[0,1],"isRequired":true,"uniqueKey":"replacement.oneOf.0.data.makerMatches.items.[INDEX].order.side","typeLabel":"enum\u003cnumber>"},"tokenId":{"type":"string","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.makerMatches.items.[INDEX].order.tokenId","typeLabel":"string"},"owner":{"type":"object","properties":{"id":{"type":"integer","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.makerMatches.items.[INDEX].order.owner.id","typeLabel":"integer"},"account":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.makerMatches.items.[INDEX].order.owner.account","typeLabel":"string"},"client":{"type":"string","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.makerMatches.items.[INDEX].order.owner.client","typeLabel":"string"},"tradeWalletOption":{"oneOf":[{"type":"string","enum":["eoa","smartWallet"],"isRequired":true,"uniqueKey":"replacement.oneOf.0.data.makerMatches.items.[INDEX].order.owner.tradeWalletOption.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","enum":["eoa","smartWallet"],"isRequired":true,"uniqueKey":"replacement.oneOf.0.data.makerMatches.items.[INDEX].order.owner.tradeWalletOption.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"replacement.oneOf.0.data.makerMatches.items.[INDEX].order.owner.tradeWalletOption","typeLabel":"enum\u003cstring> | null"},"smartWallet":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.makerMatches.items.[INDEX].order.owner.smartWallet.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.makerMatches.items.[INDEX].order.owner.smartWallet.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"replacement.oneOf.0.data.makerMatches.items.[INDEX].order.owner.smartWallet","typeLabel":"string | null"},"username":{"type":"string","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.makerMatches.items.[INDEX].order.owner.username","typeLabel":"string"},"displayName":{"type":"string","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.makerMatches.items.[INDEX].order.owner.displayName","typeLabel":"string"},"pfpUrl":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.makerMatches.items.[INDEX].order.owner.pfpUrl.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.makerMatches.items.[INDEX].order.owner.pfpUrl.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"replacement.oneOf.0.data.makerMatches.items.[INDEX].order.owner.pfpUrl","typeLabel":"string | null"},"socialUrl":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.makerMatches.items.[INDEX].order.owner.socialUrl.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"replacement.oneOf.0.data.makerMatches.items.[INDEX].order.owner.socialUrl.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"replacement.oneOf.0.data.makerMatches.items.[INDEX].order.owner.socialUrl","typeLabel":"string | null"},"points":{"type":"number","enum":[0],"isRequired":true,"uniqueKey":"replacement.oneOf.0.data.makerMatches.items.[INDEX].order.owner.points","typeLabel":"enum\u003cnumber>"},"referredUsersCount":{"type":"number","enum":[0],"isRequired":true,"uniqueKey":"replacement.oneOf.0.data.makerMatches.items.[INDEX].order.owner.referredUsersCount","typeLabel":"enum\u003cnumber>"}},"required":["id","account","client","tradeWalletOption","smartWallet","username","displayName","pfpUrl","socialUrl","points","referredUsersCount"],"isRequired":true,"uniqueKey":"replacement.oneOf.0.data.makerMatches.items.[INDEX].order.owner","typeLabel":"object"}},"required":["id","maker","price","side","tokenId","owner"],"isRequired":true,"uniqueKey":"replacement.oneOf.0.data.makerMatches.items.[INDEX].order","typeLabel":"object"}},"required":["id","matchedSize","fillPrice","fillCost","orderId","order"],"uniqueKey":"replacement.oneOf.0.data.makerMatches.items.[INDEX]","typeLabel":"object"},"uniqueKey":"replacement.oneOf.0.data.makerMatches","typeLabel":"object[]"}},"required":["order","execution"],"isRequired":true,"uniqueKey":"replacement.oneOf.0.data","typeLabel":"object"}},"isRequired":true,"uniqueKey":"replacement.oneOf.0","typeLabel":"object"},{"type":"object","description":"FAILURE covers rejected and thrown placement errors, including balance or allowance rejection and an execution-time 425 after cancellation. UNKNOWN means placement reported an inconclusive result.","required":["status","error"],"properties":{"status":{"type":"string","enum":["FAILURE","UNKNOWN"],"isRequired":true,"uniqueKey":"replacement.oneOf.1.status","typeLabel":"enum\u003cstring>"},"error":{"type":"object","properties":{"code":{"type":"string","description":"ORDER_NOT_FOUND, a decimal HTTP status such as 400/404/409/425/500, or INTERNAL_ERROR.","example":"ORDER_NOT_FOUND","isRequired":true,"uniqueKey":"replacement.oneOf.1.error.code","typeLabel":"string"},"message":{"type":"string","example":"Order not found","isRequired":true,"uniqueKey":"replacement.oneOf.1.error.message","typeLabel":"string"}},"description":"Operation-level error. Code is not a closed enum: ORDER_NOT_FOUND identifies a missing cancellation target, decimal HTTP status strings identify captured HTTP failures, and INTERNAL_ERROR identifies uncategorized errors.","required":["code","message"],"isRequired":true,"uniqueKey":"replacement.oneOf.1.error","typeLabel":"object"}},"isRequired":true,"uniqueKey":"replacement.oneOf.1","typeLabel":"object"},{"type":"object","required":["status"],"properties":{"status":{"type":"string","enum":["NOT_ATTEMPTED"],"isRequired":true,"uniqueKey":"replacement.oneOf.2.status","typeLabel":"enum\u003cstring>"}},"isRequired":true,"uniqueKey":"replacement.oneOf.2","typeLabel":"object"}],"isRequired":true,"uniqueKey":"replacement","typeLabel":"object"}},"description":"Independent cancellation and replacement outcomes.","required":["cancel","replacement"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"cancel":{"status":"SUCCESS","orderId":"3c90c3cc-0d44-4b50-8888-8dd25736052a","clientOrderId":"\u003cstring>"},"replacement":{"status":"SUCCESS","data":{"order":{"id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","salt":"1778155025318314496","maker":"\u003cstring>","signer":"\u003cstring>","tokenId":"\u003cstring>","signatureType":0,"signature":"\u003cstring>","orderType":"GTC","side":0,"marketId":"\u003cstring>","ownerId":123,"createdAt":"2023-11-07T05:31:56Z","market":{"id":7348,"slug":"btc-up-or-down-1-hour","title":"BTC Up or Down - Hourly","status":"FUNDED","yesPositionId":"11514974713064423461...","noPositionId":"14525308260861904048...","group":{"id":42,"slug":"btc-price-markets","title":"BTC Price Markets"}},"makerAmount":5000000,"takerAmount":10000000,"nonce":0,"owner":{"id":123,"account":"\u003cstring>","client":"\u003cstring>","tradeWalletOption":"eoa","smartWallet":"\u003cstring>","username":"\u003cstring>","displayName":"\u003cstring>","pfpUrl":"\u003cstring>","socialUrl":"\u003cstring>","rankName":"\u003cstring>","points":123,"referredUsersCount":123,"isTop100":true,"leaderboardPosition":123},"taker":"\u003cstring>","expiration":"2023-11-07T05:31:56Z","feeRateBps":123,"price":0.75},"execution":{"matched":true,"settlementStatus":"MINED","feeRateBps":25,"effectiveFeeBps":26,"totalsRaw":{"contractsGross":"1000000","contractsFee":"1000","contractsNet":"999000","usdGross":"500000","usdFee":"500","usdNet":"499500"},"reason":"settlement transaction reverted","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":[{"id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","matchedSize":"1000000","fillPrice":"0.55","fillCost":"550000","orderId":"3c90c3cc-0d44-4b50-8888-8dd25736052a","order":{"id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","maker":"\u003cstring>","price":"0.55","side":0,"tokenId":"\u003cstring>","owner":{"id":123,"account":"\u003cstring>","client":"\u003cstring>","tradeWalletOption":"eoa","smartWallet":"\u003cstring>","username":"\u003cstring>","displayName":"\u003cstring>","pfpUrl":"\u003cstring>","socialUrl":"\u003cstring>","points":0,"referredUsersCount":0}}}]}}}}},"exampleType":"generated"}},"exampleType":"generated"},"d10a1b4e-af13-4e26-99d8-50be5b4d110f":{"description":"Request-wide receive-window or maintenance-mode preflight failure before cancellation","content":{"application/json":{"schema":{"oneOf":[{"type":"object","required":["message"],"properties":{"message":{"type":"string","isRequired":true,"uniqueKey":"oneOf.0.message","typeLabel":"string"}},"additionalProperties":false,"uniqueKey":"oneOf.0","typeLabel":"object"},{"type":"object","required":["code","message","mode"],"properties":{"code":{"type":"string","enum":["post_only_mode","cancel_only_mode","trading_disabled"],"isRequired":true,"uniqueKey":"oneOf.1.code","typeLabel":"enum\u003cstring>"},"message":{"type":"string","example":"Trading is currently cancel-only. New orders are not accepted, but cancels are allowed.","isRequired":true,"uniqueKey":"oneOf.1.message","typeLabel":"string"},"mode":{"type":"string","enum":["post_only","cancel_only","disabled"],"isRequired":true,"uniqueKey":"oneOf.1.mode","typeLabel":"enum\u003cstring>"},"resumeAt":{"oneOf":[{"type":"string","format":"date-time","uniqueKey":"oneOf.1.resumeAt.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","uniqueKey":"oneOf.1.resumeAt.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.1.resumeAt","typeLabel":"string\u003cdate-time> | null"}},"additionalProperties":false,"uniqueKey":"oneOf.1","typeLabel":"object"}],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"message":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"66ac48ae-8669-4ecd-a67a-4f07a03302c7":{"description":"Unexpected request-wide server error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","isRequired":true,"uniqueKey":"message","typeLabel":"string"}},"additionalProperties":false,"required":["message"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"message":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"f3540713-6f20-4f18-a2b4-4e02a71fffeb":{"HmacAuth":{"type":"apiKey","in":"header","name":"lmts-api-key","description":"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.","scopes":[],"schemeName":"HmacAuth"}}},"servers":{"09c89b92-1b1b-488d-af55-0f936f286701":{"url":"https://api.limitless.exchange","description":"Production API"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"apiKey","in":"header","name":"lmts-api-key","description":"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.","scopes":[],"schemeName":"HmacAuth"},"schema":{"title":"lmts-api-key","type":"string","description":"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.","isRequired":true,"typeLabel":"string","deprecated":false},"schemeName":"HmacAuth","name":"lmts-api-key"}],"title":"HmacAuth"}]},"originalFileLocation":"openapi.json"},"subdomain":"limitless","siteName":"Limitless Exchange","title":"Cancel and Replace Order - Limitless Exchange","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-20T19:52:57.016Z","originalFileLocation":"api-reference/trading/cancel-replace.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"application-name\" content=\"Limitless Exchange\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/limitless/eKG_O-mKVQpNZHIN/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/limitless/eKG_O-mKVQpNZHIN/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/limitless/eKG_O-mKVQpNZHIN/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/limitless/eKG_O-mKVQpNZHIN/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/limitless/eKG_O-mKVQpNZHIN/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/limitless/eKG_O-mKVQpNZHIN/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/limitless/eKG_O-mKVQpNZHIN/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/limitless/eKG_O-mKVQpNZHIN/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/limitless/eKG_O-mKVQpNZHIN/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Cancel and Replace Order - Limitless Exchange\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Limitless Exchange\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.limitless.exchange/api-reference/trading/cancel-replace\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://limitless.mintlify.site/_mintlify/api/og/v2?division=Trading\u0026amp;title=Cancel+and+Replace+Order\u0026amp;theme=888cee6df57f640d9a30d0c6\u0026amp;signature=27556df5aabb3d7d373aed186e0a1fde74b9b631b3b3d1fbc66d3d77adaccab1\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Cancel and Replace Order - Limitless Exchange\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://limitless.mintlify.site/_mintlify/api/og/v2?division=Trading\u0026amp;title=Cancel+and+Replace+Order\u0026amp;theme=888cee6df57f640d9a30d0c6\u0026amp;signature=27556df5aabb3d7d373aed186e0a1fde74b9b631b3b3d1fbc66d3d77adaccab1\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/limitless/eKG_O-mKVQpNZHIN/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Limitless Exchange\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#9AB83A\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.limitless.exchange/api-reference/trading/cancel-replace\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/trading/cancel-replace.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.limitless.exchange/#organization\",\"name\":\"Limitless Exchange\",\"url\":\"https://docs.limitless.exchange\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/light.svg?fit=max\u0026auto=format\u0026n=r7gW3TwphUtCZ8zM\u0026q=85\u0026s=0d6f32ed5e8a1f35ba9d1fa2e0b57a4b\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.limitless.exchange#website\",\"name\":\"Limitless Exchange\",\"url\":\"https://docs.limitless.exchange\",\"publisher\":{\"@id\":\"https://docs.limitless.exchange/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.limitless.exchange/api-reference/trading/cancel-replace#webpage\",\"url\":\"https://docs.limitless.exchange/api-reference/trading/cancel-replace\",\"name\":\"Cancel and Replace Order\",\"dateModified\":\"2026-10-20T19:52:57.016Z\",\"isPartOf\":{\"@id\":\"https://docs.limitless.exchange#website\"},\"breadcrumb\":{\"@id\":\"https://docs.limitless.exchange/api-reference/trading/cancel-replace#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.limitless.exchange/api-reference/trading/cancel-replace#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Trading\",\"item\":\"https://docs.limitless.exchange/api-reference/trading/create-order\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Cancel and Replace Order\",\"item\":\"https://docs.limitless.exchange/api-reference/trading/cancel-replace\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.limitless.exchange/api-reference/trading/cancel-replace#apireference\",\"headline\":\"Cancel and Replace Order\",\"name\":\"Cancel and Replace Order\",\"url\":\"https://docs.limitless.exchange/api-reference/trading/cancel-replace\",\"mainEntityOfPage\":{\"@id\":\"https://docs.limitless.exchange/api-reference/trading/cancel-replace#webpage\"},\"dateModified\":\"2026-10-20T19:52:57.016Z\",\"publisher\":{\"@id\":\"https://docs.limitless.exchange/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.limitless.exchange#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Limitless Exchange\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Limitless Exchange\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/trading/cancel-replace.md","siteName":"Limitless Exchange","nav":{"global":{"anchors":[{"anchor":"Limitless Exchange","icon":"arrow-up-right-from-square","href":"https://limitless.exchange"},{"anchor":"Builders Chat","icon":"telegram","href":"https://t.me/LimitlessBuildersChat"},{"anchor":"Discord","icon":"discord","href":"https://discord.com/invite/yb4SscD8RZ"},{"anchor":"Twitter","icon":"x-twitter","href":"https://x.com/trylimitless"}]},"tabs":[{"tab":"User Guide","pages":[{"title":"User Guide","href":""}]},{"tab":"For Developers","pages":[{"title":"For Developers","href":"/developers/introduction"}]},{"tab":"API Reference","groups":[{"group":"Overview","pages":[{"title":"API Reference","href":"/api-reference/introduction"}]},{"group":"System","pages":[{"title":"Maintenance Status","openapi":"GET /maintenance/status","href":"/api-reference/system/maintenance-status"}]},{"group":"Authentication","pages":[{"title":"User Logout","openapi":"POST /auth/logout","href":"/api-reference/auth/logout"},{"title":"Create API Key","openapi":"POST /auth/api-keys","href":"/api-reference/auth/create-api-key"},{"title":"Get Active API Key","openapi":"GET /auth/api-keys","href":"/api-reference/auth/get-api-key"},{"title":"Revoke API Key","openapi":"DELETE /auth/api-keys","href":"/api-reference/auth/revoke-api-key"}]},{"group":"Markets","pages":[{"title":"Browse Active Markets","openapi":"GET /markets/active","href":"/api-reference/markets/browse-active"},{"title":"Browse Active Markets by Category","openapi":"GET /markets/active/{categoryId}","href":"/api-reference/markets/browse-active-category"},{"title":"Get Category Counts","openapi":"GET /markets/categories/count","href":"/api-reference/markets/category-count"},{"title":"Get Active Market Slugs","openapi":"GET /markets/active/slugs","href":"/api-reference/markets/active-slugs"},{"title":"Market Timeline","href":"/api-reference/markets/timeline"},{"title":"Get Market Details","openapi":"GET /markets/{addressOrSlug}","href":"/api-reference/markets/get-market"},{"title":"Resolve Stable Slug","openapi":"GET /markets/stable/{slug}","href":"/api-reference/markets/resolve-stable-slug"},{"title":"Get Oracle Candlesticks","openapi":"GET /markets/{addressOrSlug}/oracle-candles","href":"/api-reference/markets/oracle-candles"},{"title":"Get Feed Events","openapi":"GET /markets/{slug}/get-feed-events","href":"/api-reference/markets/feed-events"},{"title":"Search Markets","openapi":"GET /markets/search","href":"/api-reference/markets/search"}]},{"group":"Packs","pages":[{"title":"List Packs","openapi":"GET /parlay/packs","href":"/api-reference/packs/list-packs"},{"title":"Search Active Packs","openapi":"GET /parlay/packs/search","href":"/api-reference/packs/search-packs"},{"title":"Get Pack","openapi":"GET /parlay/packs/{id}","href":"/api-reference/packs/get-pack"},{"title":"Quote Partner Pack","openapi":"POST /parlay/partner/quote","href":"/api-reference/packs/quote-pack"},{"title":"Buy Partner Pack","openapi":"POST /parlay/partner/buy","href":"/api-reference/packs/buy-pack"},{"title":"List Partner Pack Positions","openapi":"GET /parlay/partner/positions","href":"/api-reference/packs/list-positions"},{"title":"Get Partner Pack Position","openapi":"GET /parlay/partner/positions/{id}","href":"/api-reference/packs/get-position"},{"title":"Claim Partner Pack","openapi":"POST /parlay/partner/positions/{id}/claim","href":"/api-reference/packs/claim-position"},{"title":"Confirm Partner Pack Claim","openapi":"POST /parlay/partner/positions/{id}/claim/confirm","href":"/api-reference/packs/confirm-claim"}]},{"group":"Trading","pages":[{"title":"Create Order","openapi":"POST /orders","href":"/api-reference/trading/create-order"},{"title":"Get Order Status (Batch)","openapi":"POST /orders/status/batch","href":"/api-reference/trading/order-status-batch"},{"title":"Cancel Order (Combined)","openapi":"POST /orders/cancel","href":"/api-reference/trading/cancel"},{"title":"Batch Cancel Orders (Combined)","openapi":"POST /orders/batch-cancel","description":"Cancel open orders by either internal orderIds or client-provided clientOrderIds.","href":"/api-reference/trading/batch-cancel"},{"title":"Cancel and Replace Order","openapi":"POST /orders/cancel-replace","href":"/api-reference/trading/cancel-replace"},{"title":"Cancel and Replace Orders (Batch)","openapi":"POST /orders/cancel-replace/batch","description":null,"href":"/api-reference/trading/cancel-replace-batch"},{"title":"Cancel Order","openapi":"DELETE /orders/{orderId}","href":"/api-reference/trading/cancel-order"},{"title":"Cancel Orders (Batch)","openapi":"POST /orders/cancel-batch","href":"/api-reference/trading/cancel-batch"},{"title":"Cancel All Orders","openapi":"DELETE /orders/all/{slug}","href":"/api-reference/trading/cancel-all"},{"title":"Market Maker Heartbeat","openapi":"POST /heartbeats","href":"/api-reference/trading/heartbeats"},{"title":"Get Orderbook","openapi":"GET /markets/{slug}/orderbook","href":"/api-reference/trading/orderbook"},{"title":"Get Historical Prices","openapi":"GET /markets/{slug}/historical-price","href":"/api-reference/trading/historical-price"},{"title":"Get User Orders","openapi":"GET /markets/{slug}/user-orders","href":"/api-reference/trading/user-orders"},{"title":"Get Market Events","openapi":"GET /markets/{slug}/events","href":"/api-reference/trading/market-events"}]},{"group":"Portfolio","pages":[{"title":"Get Current Profile","openapi":"GET /profiles/me","href":"/api-reference/portfolio/get-current-profile"},{"title":"Get Your Profile","openapi":"GET /profiles/{account}","href":"/api-reference/portfolio/get-profile"},{"title":"Get Trades","openapi":"GET /portfolio/trades","href":"/api-reference/portfolio/trades"},{"title":"Get Positions","openapi":"GET /portfolio/positions","href":"/api-reference/portfolio/positions"},{"title":"Redeem Resolved Positions","href":"/api-reference/portfolio/redeem"},{"title":"Split Collateral Into Outcome Set","href":"/api-reference/portfolio/split"},{"title":"Merge Outcome Set Into Collateral","href":"/api-reference/portfolio/merge"},{"title":"Withdraw From Server Wallet","href":"/api-reference/portfolio/withdraw"},{"title":"Add Withdrawal Address","href":"/api-reference/portfolio/add-withdrawal-address"},{"title":"Delete Withdrawal Address","href":"/api-reference/portfolio/delete-withdrawal-address"},{"title":"Get PnL Chart","openapi":"GET /portfolio/pnl-chart","href":"/api-reference/portfolio/pnl-chart"},{"title":"Get History","openapi":"GET /portfolio/history","href":"/api-reference/portfolio/history"},{"title":"Get Points Breakdown","openapi":"GET /portfolio/points","href":"/api-reference/portfolio/points"},{"title":"Get Trading Allowance","openapi":"GET /portfolio/trading/allowance","href":"/api-reference/portfolio/allowance"}]},{"group":"Market Pages \u0026 Navigation","pages":[{"title":"Get Navigation Tree","openapi":"GET /navigation","href":"/api-reference/navigation/get-navigation"},{"title":"Get Market Page by Path","openapi":"GET /market-pages/by-path","href":"/api-reference/navigation/get-page-by-path"},{"title":"List Markets for a Page","openapi":"GET /market-pages/{id}/markets","href":"/api-reference/navigation/list-page-markets"},{"title":"List Property Keys","openapi":"GET /property-keys","href":"/api-reference/navigation/list-property-keys"},{"title":"Get Property Key","openapi":"GET /property-keys/{id}","href":"/api-reference/navigation/get-property-key"},{"title":"List Property Options","openapi":"GET /property-keys/{id}/options","href":"/api-reference/navigation/list-property-options"}]},{"group":"API Tokens","pages":[{"title":"Get Partner Capabilities","openapi":"GET /auth/api-tokens/capabilities","href":"/api-reference/api-tokens/get-capabilities"},{"title":"Derive Scoped Token","openapi":"POST /auth/api-tokens/derive","href":"/api-reference/api-tokens/derive-token"},{"title":"List Active Tokens","openapi":"GET /auth/api-tokens","href":"/api-reference/api-tokens/list-tokens"},{"title":"Revoke Token","openapi":"DELETE /auth/api-tokens/{tokenId}","href":"/api-reference/api-tokens/revoke-token"}]},{"group":"Partner Accounts","pages":[{"title":"Create Partner Sub-Account","openapi":"POST /profiles/partner-accounts","href":"/api-reference/partner-accounts/create-partner-account"},{"title":"List Partner Sub-Accounts","openapi":"GET /profiles/partner-accounts","href":"/api-reference/partner-accounts/list-partner-accounts"},{"title":"Check Partner Account Allowances","openapi":"GET /profiles/partner-accounts/{profileId}/allowances","href":"/api-reference/partner-accounts/check-allowances"},{"title":"Retry Partner Account Allowances","openapi":"POST /profiles/partner-accounts/{profileId}/allowances/retry","href":"/api-reference/partner-accounts/retry-allowances"}]},{"group":"Public Portfolio","pages":[{"title":"Get User Traded Volume","openapi":"GET /portfolio/{account}/traded-volume","href":"/api-reference/public-portfolio/traded-volume"},{"title":"Get User Positions (Public)","openapi":"GET /portfolio/{account}/positions","href":"/api-reference/public-portfolio/positions"},{"title":"Get Realized PnL (Public)","openapi":"GET /portfolio/{account}/realized-pnl","href":"/api-reference/public-portfolio/realized-pnl"},{"title":"Get PnL Chart (Public)","openapi":"GET /portfolio/{account}/pnl-chart","href":"/api-reference/public-portfolio/pnl-chart"},{"title":"Get User History (Public)","openapi":"GET /portfolio/{account}/history","href":"/api-reference/public-portfolio/history"},{"title":"Get User Accuracy (Public)","openapi":"GET /user-stats/accuracy/{account}","href":"/api-reference/public-portfolio/accuracy"},{"title":"Get User Pack Positions (Public)","openapi":"GET /parlay/{account}/positions","href":"/api-reference/public-portfolio/pack-positions"}]},{"group":"Feed","pages":[{"title":"Get Trading Activity Feed","openapi":"GET /feed/trading","href":"/api-reference/feed/trading-feed"}]},{"group":"Referral","pages":[{"title":"Get My Referral Stats","openapi":"GET /referral/usdc/me","href":"/api-reference/referral/my-stats"},{"title":"Get My Referred Users","openapi":"GET /referral/usdc/referrals","href":"/api-reference/referral/my-referrals"},{"title":"Get Referral Leaderboard","openapi":"GET /referral/usdc/leaderboard","href":"/api-reference/referral/leaderboard"},{"title":"Get Friends Leaderboard","openapi":"GET /referral/usdc/leaderboard/friends","href":"/api-reference/referral/leaderboard-friends"}]},{"group":"Leaderboard","pages":[{"title":"Unrealized PnL Leaderboard by Market","openapi":"GET /leaderboard/pnl/unrealized/markets/{marketId}","href":"/api-reference/leaderboard/unrealized-pnl-market"},{"title":"Biggest Open Positions","openapi":"GET /leaderboard/pnl/unrealized/biggest-positions","href":"/api-reference/leaderboard/biggest-positions"}]}]},{"tab":"Changelog","pages":[{"title":"Changelog","href":"/changelog"}]}]},"basePath":"","title":"Cancel and Replace Order - Limitless Exchange","buildId":"dpl_596ePT575z4qnAFksq1biRW97aLY","deploymentId":"dpl_596ePT575z4qnAFksq1biRW97aLY","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-C9Wu0MeN.js","utils-jWgu-6Qf.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-DBD8f9qn.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-BGuX1ui5.js","snippetPresets-Evy63nQB.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","conditional-requirements-CFM0id0Q.js","ApiExamples-BQHO1lnV.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-B6C8m-t_.js","shallow-BG4cT0fH.js","getApiPlaygroundDisplay-CgEPrE-D.js","CodeSnippet-CU8JyZ9N.js","CodeSnippets-BnxHU32T.js","Page-D6S0Yh6q.js","getPastedJson-CwiYOonh.js","icon-DYDpWmDf.js","MethodPill-C-J-l7_c.js","DuplicateIcon-B6ARwg9w.js","createIcon-Dsv4MtDq.js","DynamicMarkdown-CtasenyM.js","SectionHeading-YNcgYwjB.js","axios-vUo_bRtp.js","Markdown-CwLx6PAg.js","clsx-C3kuh_dz.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-CmKHfscc.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-U3mI6Ljh.js"]}