CancelGroupPendingTrade¶
Info
DELETE https://{some_domain}/trade/cancel/group
Cancels multiple pending orders for a specific user in one request.
If symbol is provided, only pending orders for that symbol are considered.
Authorization¶
All requests must include a JWT token:
Authorization: <JWT_TOKEN>
The token is issued by the authentication method (/sign/in) and contains session info (login, type, expiration).
Request¶
Content-Type: application/json
Body Parameters¶
| Field | Type | Required | Description |
|---|---|---|---|
login |
int | Yes | User account login ID whose pending orders will be cancelled |
symbol |
string | No | Symbol filter (e.g. EURUSD) |
Response¶
Success (200)¶
{
"rows": [
{
"accepted": true,
"order": 123456,
"state": 9,
"login": 1001,
"symbol": "EURUSD",
"cmd": 2,
"volume": 100
}
],
"matched": 1,
"cancelled": 1,
"failed": 0
}
Partial Success (207)¶
Returned when some pending orders were accepted for cancellation and some failed.
Error Responses¶
| Code | Error | Description |
|---|---|---|
| 400 | INVALID_DATA |
Validation failed, missing or incorrect request fields |
| 404 | RET_NOT_FOUND |
No matching pending trades found for the request |
| 409 | mixed batch failure | Matching orders were found, but none were accepted for cancellation |
Note: Failed pending orders are returned in
failures. Successful requests are returned inrowsas acknowledgment objects.
Example¶
Request¶
DELETE https://{some_domain}/trade/cancel/group
Authorization: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
Content-Type: application/json
{
"login": 1001,
"symbol": "EURUSD"
}
Response¶
{
"rows": [
{
"accepted": true,
"order": 123456,
"state": 9,
"login": 1001,
"symbol": "EURUSD",
"cmd": 2,
"volume": 100
},
{
"accepted": true,
"order": 123457,
"state": 9,
"login": 1001,
"symbol": "EURUSD",
"cmd": 3,
"volume": 100
}
],
"matched": 2,
"cancelled": 2,
"failed": 0
}