Cancel Orders for a Market
Removes all open orders that the authenticated user holds in a given market or for a given asset.
Endpoint
Section titled “Endpoint”DELETE /cancel-market-orders
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 |
|---|---|---|---|
market | string | No | Condition ID of the market to target |
asset_id | string | No | Token ID (asset ID) to target |
Supply at least one of market or asset_id.
{ "market": "0x0000000000000000000000000000000000000000000000000000000000000001"}Response
Section titled “Response”{ "canceled": [ "a1b2c3d4-e5f6-7890-abcd-ef1234567890" ], "notCanceled": {}}| Field | Type | Description |
|---|---|---|
canceled | array of strings | IDs of orders that were removed |
notCanceled | object | Mapping from order ID to error string for any that could not be removed |
Example
Section titled “Example”curl -X DELETE https://api.openfish.fun/cancel-market-orders \ -H "Content-Type: application/json" \ -H "OPENFISH_ADDRESS: 0x..." \ -H "OPENFISH_SIGNATURE: ..." \ -H "OPENFISH_TIMESTAMP: 1700000000" \ -H "OPENFISH_API_KEY: ..." \ -H "OPENFISH_PASSPHRASE: ..." \ -d '{"market":"0x0000...0001"}'