Cancel an Order as a Builder
Both L2 (HMAC) credentials and the OPENFISH_BUILDER_ID header must be present.
Endpoint
Section titled “Endpoint”POST /builder/cancelServer: https://api.openfish.fun
Authentication: L2 (HMAC) + Builder ID header
Headers
Section titled “Headers”| Header | Required | Description |
|---|---|---|
OPENFISH_API_KEY | Yes | API key (UUID) |
OPENFISH_TIMESTAMP | Yes | Unix timestamp |
OPENFISH_PASSPHRASE | Yes | API passphrase |
OPENFISH_SIGNATURE | Yes | HMAC-SHA256 signature |
OPENFISH_BUILDER_ID | Yes | Builder identifier string |
Request Body
Section titled “Request Body”Content-Type: application/json
| Field | Type | Required | Description |
|---|---|---|---|
orderId | string (UUID) | Yes | ID of the order to cancel |
Sample Request Body
Section titled “Sample Request Body”{ "orderId": "0190b317-a1d3-7bec-9b91-eeb6dcd3a620"}Responses
Section titled “Responses”200 — Cancellation processed
Section titled “200 — Cancellation processed”| Field | Type | Description |
|---|---|---|
canceled | array of strings | Order IDs that were successfully canceled |
notCanceled | object | Map of order IDs to failure reasons |
builder_id | string | Builder identifier |
{ "canceled": ["0190b317-a1d3-7bec-9b91-eeb6dcd3a620"], "notCanceled": {}, "builder_id": "my-trading-bot"}400 — Bad Request
Section titled “400 — Bad Request”{ "error": "OPENFISH_BUILDER_ID header required" }401 — Unauthorized
Section titled “401 — Unauthorized”{ "error": "invalid authorization" }