Update Close Trade
MngUpdateCloseTrade¶
Description: Allows a manager to update a closed trade with new values such as open/close time, SL/TP, commission, and profit. Useful for correcting historical trade data.
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 | ID of the trade order to update |
| login | int | Yes | User login ID associated with the trade |
| cmd | int | Yes | Trade command (e.g., OP_BUY = 0) |
| volume | int | Yes | New trade volume in minimal lots |
| symbol | string | Yes | Trading symbol (e.g., "EURUSD") |
| open_time | int | Yes | Open time (epoch format) |
| close_time | int | Yes | Close time (epoch format) |
| sl | double | No | Stop Loss value |
| tp | double | No | Take Profit value |
| profit | double | No | Profit value |
| open_price | double | No | Price at which trade was opened |
| close_price | double | No | Price at which trade was closed |
| commission | double | No | Commission value |
| storage | double | No | Storage charges |
| expiration | int64 | No | Expiration time for pending orders |
| comment | string | No | Optional trade comment |
| __access | object | Yes | Session object with permission type |
Request Example¶
{
"order": 1001234,
"login": 123456,
"cmd": 1,
"volume": 1000,
"symbol": "EURUSD",
"open_time": 1629980000,
"close_time": 1629989999,
"sl": 1.1000,
"tp": 1.2000,
"profit": 150.0,
"open_price": 1.1010,
"close_price": 1.2010,
"commission": -2.5,
"storage": -0.5,
"comment": "Adjusted by manager",
"__access": {
"type": 1
}
}
Response Parameters¶
| Name | Type | Description |
|---|---|---|
| data | string | Returns "OK" on success |
Response Example¶
{
"accepted": true,
"order": 1001234,
"state": 15,
"login": 123456,
"symbol": "EURUSD",
"cmd": 0,
"volume": 1000
}