Skip to content

MngOpenPendingTradesList

Places the same pending order for a list of trading accounts. Each account is validated and submitted independently through the standard manager pending-order pipeline. A failure for one account does not stop the remaining accounts.

The command accepts between 1 and 100 unique account logins.

Access control

The command is available to manager, administrator, and dealer sessions. For every login, the server independently verifies account visibility, brand/group scope, and dealer trade-write access.

Request parameters

Name Type Required Description
logins int[] Yes Between 1 and 100 unique positive account logins
cmd int Yes OP_BUY_LIMIT=2, OP_SELL_LIMIT=3, OP_BUY_STOP=4, or OP_SELL_STOP=5
volume int Yes Order volume in server integer volume units
symbol string Yes Internal trading symbol
sl double Yes Stop Loss; use 0 when it is not set
tp double Yes Take Profit; use 0 when it is not set
open_price double Yes Pending-order activation price
open_time int64 No Optional order creation timestamp
expiration int64 No Optional pending-order expiration timestamp
comment string No Comment copied to every generated order
__access object Yes Session access object injected by the server transport

Request example

{
  "command": "MngOpenPendingTradesList",
  "extID": "bulk-pending-1",
  "data": {
    "logins": [2000001, 2000002, 2000003],
    "cmd": 2,
    "volume": 100,
    "symbol": "EURUSD",
    "open_price": 1.075,
    "sl": 1.07,
    "tp": 1.085,
    "expiration": 1788508800,
    "comment": "Manager bulk pending operation"
  }
}

Response parameters

Name Type Description
total int Number of requested accounts
accepted int Number of accepted pending-order requests
rejected int Number of rejected accounts
results object[] Independent result for every login, in request order

A successful item contains login, accepted=true, reserved order, and state. When dealer processing creates a request, it also contains dealer_request_id. A failed item contains login, accepted=false, http_code, and the available error and message fields.

Response example

{
  "extID": "bulk-pending-1",
  "status": 200,
  "data": {
    "total": 3,
    "accepted": 2,
    "rejected": 1,
    "results": [
      {"login": 2000001, "accepted": true, "order": 1249101, "state": 1},
      {
        "login": 2000002,
        "accepted": false,
        "error": "RET_TRADE_DISABLED",
        "message": "Trade disabled",
        "http_code": 400
      },
      {"login": 2000003, "accepted": true, "order": 1249102, "state": 1}
    ]
  }
}

Validation and execution semantics

  • An empty list or more than 100 logins returns 400 INVALID_DATA.
  • A non-integer or non-positive login returns 400 INVALID_DATA.
  • Duplicate logins reject the complete request with 400 DUPLICATE_LOGIN.
  • Only pending commands 2 through 5 are accepted.
  • A 200 response describes batch processing, not final activation. Every item with accepted=true has entered the normal pending-order lifecycle.
  • Routing, dealer, gateway, margin, and trading checks run separately for each generated order.

See also MngOpenPendingTrade, MngOpenTradesList, and the common Trade Request Lifecycle.