Cancel Order
Type: TRADE
Weight: 1
DELETE /fapi/v1/order
Cancel an active order by orderId or origClientOrderId.
Request
DELETE /fapi/v1/order?symbol=BTCUSDT&orderId=<uuid>×tamp=<ms>&signature=<hex>
Query params
| Name | Type | Required | Notes |
|---|---|---|---|
symbol | string | yes | |
orderId | string | one of | Takes precedence if both are sent. |
origClientOrderId | string | one of |
Response — 200 — same shape as New Order with status: "CANCELED".
Sparky behaviour
- Trigger orders (
STOP_*/TAKE_PROFIT_*) are routed to the trigger-order service and their frozen margin is released based on the mark price at creation. - If the matching engine reports the order is not in the book, the API returns
-2011instead of fakingCANCELED, so a same-direction IOC cannot phantom-fill against a ghost order. - Frozen margin
(amount − filled) × price / leverage × 1.005is returned toavailable.
Errors
| HTTP | code | msg |
|---|---|---|
400 | -1102 | Neither id supplied. |
400 | -2011 | Unknown order / not on the book. |
404 | -2013 | Order does not exist. |
Authentication failures (INVALID_API_KEY, API_KEY_DISABLED, IP_NOT_ALLOWED, SIGNATURE_INVALID) apply to every signed endpoint and use Sparky's {"success":false,"error":{...}} envelope; see Error Codes.