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>"
}
'
{
  "canceled": [
    "<string>"
  ],
  "not_canceled": {}
}
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 canceled. If an order cannot be cancelled, it remains in not_canceled with a short reason string. Use GET /data/order/{id} to confirm the terminal status after issuing a cancellation.

Response fields

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

Possible not_canceled 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

canceled
string[]
required

List of order IDs that were successfully canceled.

not_canceled
object
required

Map of order IDs to cancellation failure reasons.