Cancels an order before it is executed
Rate limit: 20 requests per 60 seconds. This is a shared quota — the same budget is consumed by a group of related endpoints, so calling any of them reduces what is left for the others (you cannot call each at the full rate independently). Endpoints sharing this quota:
DELETE /api/v1/trading/execution/demo/limit-orders/{orderId}DELETE /api/v1/trading/execution/demo/market-close-orders/{orderId}DELETE /api/v1/trading/execution/demo/market-open-orders/{orderId}POST /api/v1/trading/execution/demo/limit-ordersPOST /api/v1/trading/execution/demo/market-close-orders/positions/{positionId}POST /api/v1/trading/execution/demo/market-open-orders/by-amountPOST /api/v1/trading/execution/demo/market-open-orders/by-unitsPOST /api/v2/trading/execution/demo/orders
This endpoint sends a cancellation request to cancel an order before execution. An order can be cancelled if it is waiting for the market to open, or for the trigger rate to be published (MIT orders). The cancellation request may be successful, and the order is cancelled, or unsuccessful, and the order is not cancelled. This operation is idempotent when the order is already closed or cancelled. A 200 response confirms the cancellation request was accepted, not that the order was cancelled - it may already have executed. Confirm with GET /api/v2/trading/info/demo/orders:lookup: status.id 7 (Canceled) or 9 (CanceledPartiallyFilled) means the cancellation took effect, while 6 (PendingCancel) means it is still being processed.
Authorizations
API key of the application. Only valid together with the x-user-key header — the pair is an alternative to OAuth bearer authentication, never sent alongside it. The pair is granted the same permissions the operation's OAuth scopes describe.
Demo credential for trying the API from these docs: lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663
User-specific authentication key. Only valid together with the x-api-key header — the pair is an alternative to OAuth bearer authentication, never sent alongside it.
Demo credential for trying the API from these docs: eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_
Headers
A unique request identifier.
"7046a05f-34af-4f39-acf1-aed95843f08e"
Path Parameters
The ID of the order to cancel.
Response
Order cancellation request submitted successfully.
Acknowledgment when the service returns a confirmation payload.
Optional confirmation token for the cancellation request.