Skip to main content
DELETE
/
public
/
v1
/
orders
/
{order_id}
Cancel Order
curl --request DELETE \
  --url https://api.pro.daya.co/public/v1/orders/{order_id} \
  --header 'X-Api-Key: <x-api-key>'
{
  "success": true,
  "message": "Order cancelled successfully",
  "data": null,
  "timestamp": "2024-01-15T10:40:00Z"
}

Overview

Cancel an open or partially filled order. Only orders with status open or partially_filled can be cancelled.

Authentication

X-Api-Key
string
required
Your API key with Trade scope
X-Api-Key: daya_sk_YOUR_API_KEY

Path Parameters

order_id
string
required
The unique order identifier (UUID) to cancelExample: 550e8400-e29b-41d4-a716-446655440000

Request Examples

curl --request DELETE \
  --url https://api.pro.daya.co/public/v1/orders/550e8400-e29b-41d4-a716-446655440000 \
  --header 'X-Api-Key: daya_sk_YOUR_API_KEY'

Response

success
boolean
required
Indicates if the request was successful
message
string
required
Human-readable response message
data
null
Returns null on successful cancellation
timestamp
string
ISO 8601 timestamp of the response

Success Response

{
  "success": true,
  "message": "Order cancelled successfully",
  "data": null,
  "timestamp": "2024-01-15T10:40:00Z"
}

Error Responses

{
  "success": false,
  "message": "Unauthorized",
  "error": {
    "code": "API_KEY_INVALID",
    "message": "The provided API key is invalid"
  },
  "timestamp": "2024-01-15T10:40:00Z"
}

Cancellable Order Statuses

StatusCan Cancel?
pending_settlementNo
newYes
openYes
partially_filledYes
filledNo
cancelledNo
rejectedNo
failedNo
When cancelling a partially filled order, the filled portion remains executed. Only the remaining unfilled quantity is cancelled.

Rate Limits

  • 100 requests per minute per API key

Next Steps

Place Order

Place a new order

List Orders

View your orders