ModifyPendingTrade¶
Modifies a pending order.
PUT
https://{some_domain}/trade/modify/pending
Authorization¶
All requests must include a JWT token:
Authorization: <JWT_TOKEN>
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 |
open_price |
double | No | New activation price |
sl |
double | No | New Stop Loss |
tp |
double | No | New Take Profit |
expiration |
int64 | No | New expiration timestamp, 0 clears expiration |
At least one of open_price, sl, tp, or expiration must be provided.
This method works only for pending orders with:
cmd = OP_BUY_LIMITcmd = OP_BUY_STOPcmd = OP_SELL_LIMITcmd = OP_SELL_STOP
Response¶
Success (200)¶
The response is an acknowledgment that the pending-order update request was accepted into runtime processing.
{
"accepted": true,
"order": 123456,
"state": 16,
"login": 1001,
"symbol": "EURUSD",
"cmd": 2,
"volume": 100
}
state = 16 corresponds to TS_PENDING_UPDATE_REQUEST.
Error Responses¶
| Code | Error | Description |
|---|---|---|
| 400 | INVALID_DATA |
Validation failed or no mutable fields were provided |
| 401 | PERMISSION_DENIED |
Access denied |
| 403 | MODIFY_TRADE_ERROR |
Order does not belong to the authenticated user |
| 400/409 | RET_TRADE_INCORRECT_CMD |
The target order is not a pending order |
| 4xx/5xx | RET_* |
Runtime validation/update error |
| 503 | LICENSE_NOT_ACTIVE |
A v2 runtime lease is required before this risk-increasing action is admitted |