Skip to main content
DELETE
/
order
Cancel order
curl --request DELETE \
  --url https://clob.forka.st/order \
  --header 'Content-Type: application/json' \
  --data '
{
  "orderId": "01L0XY0R3M8FGP3A5X4KJ8BPAG"
}
'
{
  "cancelled": [
    "01L0XY0R3M8FGP3A5X4KJ8BPAG"
  ],
  "notCanceled": {}
}
Cancel a resting order using its ULID. Provide the identifier in the JSON body and the endpoint returns which orders were cancelled as well as any that failed.
Cancellation requests also require L2 authentication headers: FORKAST_ADDRESS, FORKAST_SIGNATURE, FORKAST_TIMESTAMP, FORKAST_API_KEY, and FORKAST_PASSPHRASE.
The response always returns HTTP 200 OK. Successful cancellations append the ULID to cancelled. If an order cannot be cancelled, it remains in notCanceled with a short reason string. Use GET /data/order/{id} to confirm the terminal status after issuing a cancellation.

Response fields

FieldTypeDescription
cancelledstring[]List of order ULIDs successfully cancelled.
notCanceledobjectMap of order IDs that were not cancelled to the reason string.

Possible notCanceled reasons

  • order not found
  • order could not be cancelled

Body

application/json
orderId
string
required

Order identifier to cancel.

Example:

"01L0XY0R3M8FGP3A5X4KJ8BPAG"

Response

Cancellation result

cancelled
string[]
required

List of order ULIDs successfully cancelled.

Example:
["01L0XY0R3M8FGP3A5X4KJ8BPAG"]
notCanceled
object
required

Map of order IDs that failed to cancel and the reason.

Example:
{}