Skip to content

Cancel several orders

Cancel a specific set of orders in one call. batched is a literal path segment, never read as an order_id. Requires a read_write key.

DELETE
/api/v1/orders/batched
Try it

Every endpoint, in one place: the full Try it.

Signing happens in your browser with WebCrypto. Your private key is never sent anywhere; Send request sends your key ID and the signature to the demo host above. Only demo hosts are offered. The key ID and private key are saved in this browser's local storage, per jurisdiction, until you click Clear saved key. Use a demo key here, never a production one.

Field Type Required Description
orders object[] yes The orders to cancel. Each entry is an object carrying an order_id, not a bare id string. A flat {"order_ids": [...]} is the common first guess and returns 400 {"error": "orders is required"}, which does not hint that the field exists with a different shape.
orders[].order_id string (uuid) yes The order’s UUID.
Status Description Schema
200 Success object
400 A parameter was missing or invalid. Error
401 Missing, malformed or unrecognized signature, or a timestamp outside the 30-second window. Body: {“error”:“Missing or invalid API key credentials”} Error
403 This API key does not have write access. The account behind this key is not active, for example it is pending approval or suspended. Body: {“error”:“Your account is suspended. Contact support.”}, the message naming the account’s status. Error
422 The cancel was refused, for example by the location check or because the order can no longer be cancelled. The body’s error says why. Error

Request:

curl --request DELETE \
--url 'https://demo.stxapp.io/api/v1/orders/batched' \
--header 'X-STX-ACCESS-KEY: <key-id>' \
--header 'X-STX-ACCESS-TIMESTAMP: <unix-ms>' \
--header 'X-STX-ACCESS-SIGNATURE: <base64-ed25519>' \
--header 'Content-Type: application/json' \
--data '{
"orders": [
{
"order_id": "a1b2c3d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d"
}
]
}'

Response 200:

{
"cancellations": [
{
"order_id": "4702e9b6-211a-4805-a605-0eb0817ee9b3",
"status": "partially_cancelled"
},
{
"order_id": "09b3c058-f9c0-4b0d-a6e9-f1295b7f0b33",
"status": "Order not found"
}
]
}
Field Type Description
order_id uuid The order this outcome relates to.
status string The order status after cancelling, or a reason it was not cancelled, such as “Order not found” for an unknown id.

STX is operated by XV Exchange, LLC, a Designated Contract Market regulated by the U.S. Commodity Futures Trading Commission (CFTC). Contracts traded on STX are cleared by XV Clearing, LLC, a CFTC-registered Derivatives Clearing Organization. Trading involves substantial risk of loss and may not be appropriate for everyone. Members risk losing the cost to enter any transaction, including fees. Consider whether trading is appropriate for you in light of your experience and financial resources. Nothing on this site is investment advice or a recommendation to trade. Past performance is not indicative of future results.

© 2026 STX. All rights reserved.llms.txtllms-full.txtView as Markdown
Docs version v1.10.5