curl -X DELETE https://api.galadriel.com/v1/orders/ord_abc123 \
-H "Authorization: Bearer YOUR_API_TOKEN"
import requests
response = requests.delete(
"https://api.galadriel.com/v1/orders/ord_abc123",
headers={"Authorization": "Bearer YOUR_API_TOKEN"}
)
result = response.json()
print(f"Cancelled {result['cancelled_gpus']} GPUs")
const response = await fetch(
'https://api.galadriel.com/v1/orders/ord_abc123',
{
method: 'DELETE',
headers: {
'Authorization': 'Bearer YOUR_API_TOKEN'
}
}
);
const result = await response.json();
console.log(`Cancelled ${result.cancelled_gpus} GPUs`);
{
"order_id": "ord_abc123",
"status": "cancelled",
"cancelled_gpus": 16,
"cancelled_at": "2025-11-11T14:30:00Z"
}
{
"error": {
"code": "order_already_filled",
"message": "Cannot cancel a fully filled order. Use DELETE /leases/{lease_id} to terminate the lease instead."
}
}
Orders
Cancel Order
Cancel a pending or partially filled order
DELETE
/
v1
/
orders
/
{order_id}
curl -X DELETE https://api.galadriel.com/v1/orders/ord_abc123 \
-H "Authorization: Bearer YOUR_API_TOKEN"
import requests
response = requests.delete(
"https://api.galadriel.com/v1/orders/ord_abc123",
headers={"Authorization": "Bearer YOUR_API_TOKEN"}
)
result = response.json()
print(f"Cancelled {result['cancelled_gpus']} GPUs")
const response = await fetch(
'https://api.galadriel.com/v1/orders/ord_abc123',
{
method: 'DELETE',
headers: {
'Authorization': 'Bearer YOUR_API_TOKEN'
}
}
);
const result = await response.json();
console.log(`Cancelled ${result.cancelled_gpus} GPUs`);
{
"order_id": "ord_abc123",
"status": "cancelled",
"cancelled_gpus": 16,
"cancelled_at": "2025-11-11T14:30:00Z"
}
{
"error": {
"code": "order_already_filled",
"message": "Cannot cancel a fully filled order. Use DELETE /leases/{lease_id} to terminate the lease instead."
}
}
Path Parameters
string
required
The order ID to cancel
Response
string
The cancelled order ID
string
New status:
cancelledinteger
Number of unfilled GPUs that were cancelled
Only pending or partially filled orders can be cancelled. Fully filled orders cannot be cancelled, but you can terminate the resulting lease instead.
curl -X DELETE https://api.galadriel.com/v1/orders/ord_abc123 \
-H "Authorization: Bearer YOUR_API_TOKEN"
import requests
response = requests.delete(
"https://api.galadriel.com/v1/orders/ord_abc123",
headers={"Authorization": "Bearer YOUR_API_TOKEN"}
)
result = response.json()
print(f"Cancelled {result['cancelled_gpus']} GPUs")
const response = await fetch(
'https://api.galadriel.com/v1/orders/ord_abc123',
{
method: 'DELETE',
headers: {
'Authorization': 'Bearer YOUR_API_TOKEN'
}
}
);
const result = await response.json();
console.log(`Cancelled ${result.cancelled_gpus} GPUs`);
{
"order_id": "ord_abc123",
"status": "cancelled",
"cancelled_gpus": 16,
"cancelled_at": "2025-11-11T14:30:00Z"
}
{
"error": {
"code": "order_already_filled",
"message": "Cannot cancel a fully filled order. Use DELETE /leases/{lease_id} to terminate the lease instead."
}
}