Orders

Cancel all of the authenticated user's open orders on an exchange

Kill-switch endpoint: cancels every open order the caller has on exchange_id (optionally scoped further to a single market_id) via the venue's native cancel-all call, then reconciles local Order rows up to however many the venue actually reported cancelled. If the venue reports 0 cancellations, no local rows are touched — a mismatch between "0 cancelled" and locally-tracked active orders is reconciled automatically in the background rather than being blindly marked cancelled. Unlike POST /orders/{order_id}/cancel and POST /orders/cancel-batch, input errors here (e.g. an unsupported exchange_id) surface as a real 400, not a success: false 200 — this is the kill-switch path, so a caller-input problem must be visibly distinct from "the venue kept orders resting." Auth & scope. Requires trade:execute.

post/orders/cancel-all

Request

  • Base URL
    https://execution.kairos.trade
  • Auth
    API key in header X-Client-Id and API key in header X-Api-Key and API key in header X-Api-Secret

Request body

user_idstring

Ignored. The authenticated caller's id is always used.

exchange_idstring required

Venue to cancel all open orders on.

market_idstring nullable

Optionally scope the cancel-all to a single market/contract id instead of every open order on the exchange.

Example request

{
  "exchange_id": "polymarket"
}

Response

Cancel-all result. cancelled_count is the venue's authoritative count; cancelled_order_ids lists the local rows actually updated (may be fewer than cancelled_count if some local rows lag).

cancelled_countinteger required

Authoritative count of orders the venue reported cancelled.

failed_countinteger required

Local rows that failed to update to cancelled after the venue confirmed the cancel.

cancelled_order_idsstring[] required

Internal order ids (as strings) whose local status was updated. May be fewer than cancelled_count if the venue cancelled more than the locally-tracked active set.

Changes

No recorded changes to this operation across all 1 revision of this API.