Skip to main content
DELETE
/
order
Cancel an order
curl --request DELETE \
  --url https://clob.kuest.com/order \
  --header 'Content-Type: application/json' \
  --header 'KUEST_ADDRESS: <kuest_address>' \
  --header 'KUEST_API_KEY: <kuest_api_key>' \
  --header 'KUEST_PASSPHRASE: <kuest_passphrase>' \
  --header 'KUEST_SIGNATURE: <kuest_signature>' \
  --header 'KUEST_TIMESTAMP: <kuest_timestamp>' \
  --data '
{
  "orderId": "<string>"
}
'
{
  "cancelled": [
    "<string>"
  ],
  "notCanceled": {}
}
Cancel a resting order using its ULID. Provide the identifier in the JSON body and the endpoint returns which orders were cancelled as well as any that failed.
Cancellation requests also require L2 authentication headers: KUEST_ADDRESS, KUEST_SIGNATURE, KUEST_TIMESTAMP, KUEST_API_KEY, and KUEST_PASSPHRASE.
The response always returns HTTP 200 OK. Successful cancellations append the ULID to cancelled. If an order cannot be cancelled, it remains in notCanceled with a short reason string. Use GET /data/order/{id} to confirm the terminal status after issuing a cancellation.

Response fields

FieldTypeDescription
cancelledstring[]List of order ULIDs successfully cancelled.
notCanceledobjectMap of order IDs that were not cancelled to the reason string.

Possible notCanceled reasons

  • order not found
  • order could not be cancelled

Headers

KUEST_ADDRESS
string
required

Checksummed wallet address performing the request.

KUEST_API_KEY
string<uuid>
required

API key obtained from the L1 derivation endpoint.

KUEST_PASSPHRASE
string
required

64 character hexadecimal passphrase associated with the API key.

KUEST_TIMESTAMP
string
required

Millisecond epoch timestamp (string) used for freshness checks.

KUEST_SIGNATURE
string
required

Hex-encoded HMAC-SHA256 signature built from the L2 signing string.

Body

application/json
orderId
string
required

Order identifier to cancel.

Response

Cancel result

cancelled
string[]
required

List of order IDs that were successfully cancelled.

notCanceled
object
required

Map of order IDs to cancellation failure reasons.