Skip to main content
DELETE
/
v1
/
pm
/
orders
/
{orderId}
Cancel order
curl --request DELETE \
  --url https://relay.bayse.markets/v1/pm/orders/{orderId}
{
  "message": "Order cancelled"
}

Authentication

Write authentication required — X-Public-Key, X-Timestamp, and X-Signature headers. See the Authentication guide.

Path parameters

orderId
string
required
UUID of the order to cancel.

Example request

PUBLIC_KEY="pk_live_abcdef123456"
SECRET_KEY="sk_live_secret789xyz"
TIMESTAMP=$(date +%s)
METHOD="DELETE"
URL_PATH="/v1/pm/orders/f6a7b8c9-d0e1-2345-fabc-678901234567"

# No body — bodyHash is empty, payload ends with a trailing dot
PAYLOAD="${TIMESTAMP}.${METHOD}.${URL_PATH}."
SIGNATURE=$(printf '%s' "$PAYLOAD" | openssl dgst -sha256 -hmac "$SECRET_KEY" -binary | base64)

curl -X DELETE "https://relay.bayse.markets${URL_PATH}" \
  -H "X-Public-Key: ${PUBLIC_KEY}" \
  -H "X-Timestamp: ${TIMESTAMP}" \
  -H "X-Signature: ${SIGNATURE}"

Response

{
  "message": "Order cancelled"
}
Only CLOB orders with status open or partial_filled can be cancelled. AMM orders execute instantly and cannot be cancelled — sell your shares to exit instead.