Skip to content
UNHEDGED / DOCS

Search documentation

Browse docs or start typing to find a topic

↑ ↓ to navigate Enter to open Esc to close

Cancel Orders

DELETE https://api.unhedged.gg/api/v1/orders

Cancels open orders in one market. Targets are the union of orderIds and clientOrderIds. Cancel-all (every open order for this balance on the market) runs only when both lists are empty. Numeric ids and clientOrderIds are best-effort (continue after soft failures such as unresolved client ids; { dropped, err } when some succeed).

Configure request

Request

Security · Bearer token

Send your API key in the Authorization header. Required scope order:cancel.

Rate limit · 120 req/min · 60 per market

Request body

marketId string
Required
Market ID
orderIds string[]
Required
Numeric order IDs (as strings). Pass [] when cancelling only by clientOrderIds, or with empty/omitted clientOrderIds for cancel-all.
clientOrderIds string[]
Optional
Client order IDs (same charset/length as clientOrderId). Union with orderIds. Both empty = cancel-all.
Authorization
Bearer token Authorization: Bearer ak_your_key_here
Body application/json
curl -X DELETE https://api.unhedged.gg/api/v1/orders \
  -H "Authorization: Bearer ak_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
  "marketId": "clx...",
  "orderIds": ["213"],
  "clientOrderIds": ["bot-42"]
}'
Response
{
  "result": {
    "dropped": ["213", "214"]
  }
}

// client-only cancel:
// { "marketId": "clx...", "orderIds": [], "clientOrderIds": ["bot-42"] }

// cancel-all:
// { "marketId": "clx...", "orderIds": [] }