Skip to main content

Delete Query

DELETE 

/v2/auto/queries/:queryId

Delete a terminal query.

Only queries in a terminal status (triggered, expired, cancelled, failed) can be deleted. Active queries must be cancelled first. Do not use this endpoint to cancel running queries; use POST /v2/auto/queries/{queryId}/cancel for active queries.

Cost

Free.

Auth

Required header (always):

x-elfa-api-key: <api_key>

HMAC is conditional — required when the stored query has a trade-flavoured action (market_order, limit_order, or llm callback to those). NOT required when the stored query is notification-only. If the stored query cannot be looked up, HMAC is enforced (fail-safe).

When HMAC is required, also send:

x-elfa-timestamp: <unix_seconds>
x-elfa-signature: <hex_hmac_sha256>

Signing payload: timestamp + method + path + body. For this route, sign with path = "/queries/{queryId}" and body = "".

Request Example

Path parameter:

  • queryId (string)

Response Example (200)

{
"id": "a12d20ff-6cb2-433e-afed-cc2e6a0380b6",
"deletedAt": "2026-04-01T12:00:00.000Z"
}

Request

Responses

Ok