Update Trade
MngUpdateTrade¶
Description: Allows a manager to update an existing trade by order number. Supports partial field updates such as SL/TP, volume, price, comment, and timing values.
Access Control¶
Requires set_trades for manager/dealer sessions. The target account must also match the manager groups and brand scope loaded from the cached manager record. Token payload is used only for manager id and session type.
Request Parameters¶
| Name | Type | Required | Description |
|---|---|---|---|
| order | int | Yes | Order ID of the trade to update |
| login | int | Yes | Account login to which the trade belongs |
| cmd | int | Yes | Trade command (e.g., OP_BUY = 0) |
| volume | int | No | Updated volume (minimal lots) |
| sl | double | No | Updated Stop Loss |
| tp | double | No | Updated Take Profit |
| profit | double | No | Updated profit value |
| open_price | double | No | Updated opening price |
| open_time | int64 | No | Updated open time (epoch) |
| close_price | double | No | Updated closing price |
| commission | double | No | Updated commission |
| storage | double | No | Updated storage |
| close_time | int64 | No | Updated close time (epoch) |
| expiration | int64 | No | Updated expiration time |
| comment | string | No | Updated trade comment |
| __access | object | Yes | Access object with type field |
Request Example¶
{
"order": 1001234,
"login": 123456,
"cmd": 0,
"volume": 2000,
"sl": 1.1050,
"tp": 1.2150,
"comment": "adjusted by manager",
"__access": {
"type": 1
}
}
Response Parameters¶
| Name | Type | Description |
|---|---|---|
| accepted | bool | Always true on successful acknowledgment |
| order | int | Order identifier being updated |
| state | int | Accepted request state after update acceptance |
| login | int | Target account login |
| symbol | string | Trade symbol |
| cmd | int | Trade command |
| volume | int | Current trade volume |
Response Example¶
{
"accepted": true,
"order": 1001234,
"state": 0,
"login": 123456,
"symbol": "EURUSD",
"cmd": 0,
"volume": 1000
}