Skip to content

Update Pending Trade

MngUpdatePendingTrade

Description: Allows a manager to update a pending trade order with modified values such as open price, SL/TP, volume, and timing.

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 pending 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 Volume in minimal lots
symbol string Yes Trading symbol
open_price double No Updated price at which trade will open
open_time int64 No Scheduled time to open the trade (epoch)
sl double No Stop Loss value
tp double No Take Profit value
expiration int64 No Expiration time for the pending order (epoch)
comment string No Optional trade comment
__access object Yes Access object with session information

Request Example

{
  "order": 1001234,
  "login": 123456,
  "cmd": 1,
  "volume": 1000,
  "symbol": "EURUSD",
  "open_price": 1.1050,
  "open_time": 1629981111,
  "sl": 1.1000,
  "tp": 1.2000,
  "expiration": 1629989999,
  "comment": "Updated pending order",
  "__access": {
    "type": 1
  }
}

Response Parameters

Name Type Description
data string Returns "OK" on success

Response Example

{
  "accepted": true,
  "order": 1001234,
  "state": 16,
  "login": 123456,
  "symbol": "EURUSD",
  "cmd": 2,
  "volume": 1000
}