Skip to main content
Cancels all open orders for a specific user in a given market. This removes all pending and partially filled orders from the order book.

Endpoint

DELETE /api/v1/orders

Request

Body parameters

user_id
string
required
The unique identifier of the user whose orders to cancel
market
string
required
The trading pair market (e.g., “SOL_USDC”, “BTC_USDT”)

Response

Success response

status
string
Status message indicating all orders were cancelled
user_id
string
The unique identifier of the user whose orders were cancelled

Error response

status
string
Status message indicating the cancellation failed

Example

curl -X DELETE http://localhost:8080/api/v1/orders \
  -H "Content-Type: application/json" \
  -d '{
    "user_id": "user123",
    "market": "SOL_USDC"
  }'
Success response:
{
  "status": "Cancelled All Orders",
  "user_id": "user123"
}
Error response:
{
  "status": "Failed to Cancel All Orders"
}

Error codes

  • 200 OK - All orders cancelled successfully
  • 500 Internal Server Error - Failed to cancel orders or Redis connection error

Build docs developers (and LLMs) love