MngUpdateOpenTrade¶
Description: Allows a manager to update an already open trade. Updates fields such as SL/TP, volume, price, symbol, and time. The trade must be in an open state.
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.
Admission is synchronous under the cached-order lock; calculation completion
remains asynchronous. Closing/finalized trades and competing in-flight requests
are rejected before acknowledgment. SL/TP closing uses the same reservation:
an accepted update is evaluated with its updated protection, while a close that
wins admission rejects the update. Late updates cannot produce OPEN after CLOSED
or recreate floating profit/margin. The same admission rule applies to
MngUpdateOpenTradeSync and the open-position branch of MngUpdateTradeSync;
their success responses still wait for the matching runtime event.
Copy-Follower Manual-Write Checks¶
For SESSION_USER or SESSION_CUSTOMER requests, this mutation applies the
copy-follower manual_trading_mode after the usual account/order ownership
checks. The check applies only when the target account has an enabled follower
profile. Mode 0 rejects all manual writes; mode 1 permits new or non-copied
orders but rejects changes to linked copied orders; mode 2 permits both.
Manager/admin/dealer staff sessions bypass this follower policy.
| 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 |
The command returns the denial for its target login or order without accepting that mutation.
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_price | double | No | New open price |
| open_time | int64 | No | New open time (epoch format) |
| sl | double | No | Stop Loss value |
| tp | double | No | Take Profit value |
| commission | double | No | Commission value |
| storage | double | No | Storage/swap value |
| expiration | int64 | No | Order expiration time (epoch) |
| comment | string | No | Optional trade comment |
| __access | object | Yes | Session object with permission type |
Request Example¶
{
"order": 1001234,
"login": 123456,
"cmd": 0,
"volume": 2000,
"symbol": "EURUSD",
"sl": 1.1050,
"tp": 1.2150,
"open_price": 1.1045,
"open_time": 1629981234,
"expiration": 0,
"comment": "Adjusted SL/TP",
"__access": {
"type": 1
}
}
Response Parameters¶
| Name | Type | Description |
|---|---|---|
| accepted | boolean | true after successful admission |
| order | int | Target order ID |
| state | int | Request state, 14 (TS_OPEN_UPDATE_REQUEST) |
| login | int | Account login |
| symbol | string | Trading instrument |
| cmd | int | Market command |
| volume | int | Requested position volume in minimal lots |
Response Example¶
{
"accepted": true,
"order": 1001234,
"state": 14,
"login": 123456,
"symbol": "EURUSD",
"cmd": 0,
"volume": 2000
}