For the complete documentation index, see llms.txt. This page is also available as Markdown.

DELETE /orders/{order_id}

Cancel an order

Cancel an order.

operationId: cancelOrder · CCXT method: cancelOrder · Rate-limit class: trading

Authentication: hmacAuth.

Charged to the cancel budget, which is separate from the order budget that submission and amend draw on (x-nexus-rate-limit-class: trading names the class both belong to, not the bucket). A key that has spent its entire submission allowance can still cancel: exhausting one never refuses the other. It is a separate bucket rather than an exemption, so cancelling in a tight loop can still 429 — with bucket: cancel, the only refusal that means your cancel channel itself is saturated. See "Rate limits" for the full model.

Parameters

Name
In
Type
Required
Default
Description

order_id

path

string

Yes

market_id

query

string

Yes

Market the order rests on (required for routing).

Responses

Status
Body
Meaning

200

(no schema declared)

Cancelled order returned

401

(no schema declared)

404

(no schema declared)

Order not found

Example

curl -X DELETE 'https://exchange.nexus.xyz/api/exchange/orders/{order_id}' \
  -H 'X-API-Key: nx_7f3a1b...' \
  -H 'X-Timestamp: 1776033911836' \
  -H 'X-Signature: <hmac-sha256>'
import requests

headers = {
    "X-API-Key": "nx_7f3a1b...",
    "X-Timestamp": "1776033911836",
    "X-Signature": "<hmac-sha256>"
}

response = requests.delete("https://exchange.nexus.xyz/api/exchange/orders/{order_id}", headers=headers)
response.raise_for_status()
print(response.json())
const response = await fetch("https://exchange.nexus.xyz/api/exchange/orders/{order_id}", {
  method: "DELETE",
  headers: {
    "X-API-Key": "nx_7f3a1b...",
    "X-Timestamp": "1776033911836",
    "X-Signature": "<hmac-sha256>"
  },
});
if (!response.ok) throw new Error(`${response.status} ${await response.text()}`);
console.log(await response.json());

X-Signature is a placeholder: it is derived from this specific request. See Authentication for the canonical string and the HMAC rule.


Generated from eng/apps/exchange/api/openapi.json (spec 0.9.36). Do not edit by hand — regenerate with python3 product/docs/tools/api-reference/generate.py. Hand-authored context lives in the Guides pages.

Last updated