Cancel an order

POST/api/v1/orders/cancelBearer

Trading APIprice E4 · size E2 · amount E6 (integers)YES | NO

202 semantics. The request body takes either orderId or clientOrderId (if both are present orderId wins; if neither is, 400). Looking up by clientOrderId reuses the place-order dedup store, and a miss returns 404 client_order_id_not_found rather than silently becoming a no-op. Cancelling an already-cancelled or non-existent order is a side-effect-free no-op and is deliberately not covered by idempotency dedup.

Send Authorization: Bearer <token>. The token is issued by POST /api/v1/auth/verify, and expires after 24h idle or 7d after issuance.

Request body

  • marketIdstringrequired

    Market id

    Example"mkt-0001"

  • orderIdstringoptional

    Server-generated order id (supply this or clientOrderId)

    Example"ord_01K5H2M3N7Q8R9S0"

  • clientOrderIdstringoptional

    The idempotency key chosen at placement time, usable to look the order back up (supply this or orderId)

    Example"mm-btc-2026-09-19-0001"

Response

202Cancel command persisted
  • cursorstring

    Read-your-writes continuation point

    Example"c1:mkt-0001:184"

  • commandIdstring

    Command identifier

    Example"cmd_01K5H2M3N7Q8R9S1"

Switch status codes in the response example to view errors. For all codes, see the Errors page.