Overview
Cancel an open or partially filled order. Only orders with status open or partially_filled can be cancelled.
Authentication
Your API key with Trade scopeX-Api-Key: daya_sk_YOUR_API_KEY
Path Parameters
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
Indicates if the request was successful
Human-readable response message
Returns null on successful cancellation
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
| Status | Can Cancel? |
|---|
pending_settlement | No |
new | Yes |
open | Yes |
partially_filled | Yes |
filled | No |
cancelled | No |
rejected | No |
failed | No |
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