Skip to main content

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>&timestamp=<ms>&signature=<hex>

Query params

NameTypeRequiredNotes
symbolstringyes
orderIdstringone ofTakes precedence if both are sent.
origClientOrderIdstringone of

Response — 200 — same shape as New Order with status: "CANCELED".

Sparky behaviour

  1. 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.
  2. If the matching engine reports the order is not in the book, the API returns -2011 instead of faking CANCELED, so a same-direction IOC cannot phantom-fill against a ghost order.
  3. Frozen margin (amount − filled) × price / leverage × 1.005 is returned to available.

Errors

HTTPcodemsg
400-1102Neither id supplied.
400-2011Unknown order / not on the book.
404-2013Order 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.