ModifyPendingTrade¶
Modifies a pending order.
PUT
https://{some_domain}/trade/modify/pending
Authorization¶
All requests must include a JWT token:
Authorization: <JWT_TOKEN>
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 |