Cancel Pending Trade¶
Cancels a pending order for the authenticated client account.
DELETE
https://{some_domain}/trade/cancel
Authorization¶
All requests must include a JWT token:
Authorization: <JWT_TOKEN>
With runtime protocol v2, this close/cancellation endpoint remains available when the license lease is inactive, subject to its normal authorization and account/order checks. Risk-increasing opens and modifications are gated separately.
Copy-follower manual trading policy¶
For authenticated user/customer requests, an enabled copy follower's
manual_trading_mode is enforced after account/order ownership checks:
0rejects all manual trade writes with HTTP403,COPY_MANUAL_TRADING_DISABLED(Manual trading is disabled for this copy follower).1permits writes to non-copied orders and rejects changes to copied orders with HTTP403,COPY_COPIED_ORDER_MANUAL_FORBIDDEN(Manual changes to copied orders are disabled for this copy follower).2permits manual writes to copied and non-copied orders.
| HTTP | Error | Message |
|---|---|---|
403 |
COPY_MANUAL_TRADING_DISABLED |
Manual trading is disabled for this copy follower |
403 |
COPY_COPIED_ORDER_MANUAL_FORBIDDEN |
Manual changes to copied orders are disabled for this copy follower |
This applies to opens, modifications, closes, pending-order changes, and group operations. A group operation that matches a protected copied order is rejected before any order is changed. Staff and internal requests bypass this follower policy.
Request¶
Content-Type: application/json
Body Parameters¶
| Field | Type | Required | Description |
|---|---|---|---|
order |
int | Yes | Pending order ID |
Response¶
Success (200)¶
{
"accepted": true,
"order": 123456,
"state": 9
}
Error Responses¶
| Code | Error | Description |
|---|---|---|
| 400 | INVALID_DATA |
Validation failed |
| 401 | PERMISSION_DENIED |
Missing or invalid authenticated session |
| 403 | PERMISSION_DENIED |
Order does not belong to the authenticated session |
| 4xx/5xx | RET_* |
Runtime validation or cancel error |
Only pending orders are supported. Non-pending orders are rejected with RET_TRADE_INCORRECT_CMD.