Cancel Single Order
Removes one order from the book by its ID. This endpoint remains operational even when the platform is in cancel-only mode.
Endpoint
Section titled “Endpoint”DELETE /order
Base URL: https://api.openfish.fun
Authentication
Section titled “Authentication”L2 authentication required. All five OPENFISH_* headers must be present.
Request Body
Section titled “Request Body”| Field | Type | Required | Description |
|---|---|---|---|
orderID | string | Yes | UUID of the order to cancel (also accepts orderId) |
{ "orderID": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"}Response
Section titled “Response”{ "canceled": ["a1b2c3d4-e5f6-7890-abcd-ef1234567890"], "notCanceled": {}}| Field | Type | Description |
|---|---|---|
canceled | array of strings | IDs of orders that were successfully removed |
notCanceled | object | Mapping from order ID to an error string for any orders that could not be removed |
Failed cancellation example
Section titled “Failed cancellation example”{ "canceled": [], "notCanceled": { "a1b2c3d4-e5f6-7890-abcd-ef1234567890": "not found or already canceled" }}Example
Section titled “Example”curl -X DELETE https://api.openfish.fun/order \ -H "Content-Type: application/json" \ -H "OPENFISH_ADDRESS: 0x..." \ -H "OPENFISH_SIGNATURE: ..." \ -H "OPENFISH_TIMESTAMP: 1700000000" \ -H "OPENFISH_API_KEY: ..." \ -H "OPENFISH_PASSPHRASE: ..." \ -d '{"orderID":"a1b2c3d4-e5f6-7890-abcd-ef1234567890"}'