PATCH /classic/cancel/:sGroupId
Cancel every bot in a classic group.
- If the group is still
INITIATED(unpaid), bots move straight toCANCELLED. - If the group is already
RUNNING, bots are scheduled to cancel — they finish the in-flight swap, then stop. - Groups that are already initializing deposits cannot be cancelled.
Use case
User aborts a campaign (pre-payment or mid-run). No follow-up calls needed — wallets are drained and state settles automatically.
Path params
| Param | Required | Description |
|---|---|---|
sGroupId | yes | 13-char group id returned by /classic/initialize. |
Response 200
{ "message": "Order canceled" }
Or, if the group was running:
{ "message": "Order scheduled to cancel" }
Errors
| Status | Meaning |
|---|---|
400 | Bots already paying-in, or in a state where cancel is not allowed. |
403 | Group not owned by caller. |
404 | Group not found. |
Example
curl -X PATCH "$BASE_URL/classic/cancel/<sGroupId>" \
-H "Authorization: Bearer $ACCESS" \
-H "x-user-id: $USER_ID"