Skip to content

MngOpenPendingTrade

Description: Opens a new pending trade on behalf of the manager.

This method follows the common Trade Request Lifecycle. A successful response is an acknowledgment of accepted processing, not a guarantee that the pending order has already been activated.

Access Control

Requires dealer_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.

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
login int Yes User login ID
cmd int Yes Pending command only (OP_BUY_LIMIT=2, OP_SELL_LIMIT=3, OP_BUY_STOP=4, OP_SELL_STOP=5)
volume int Yes Trade volume in minimal lots
symbol string Yes Trading instrument
sl double Yes Stop Loss value
tp double Yes Take Profit value
open_price double Yes Pending activation price
open_time int64 No Optional trade open timestamp
expiration int64 No Optional pending expiration time
comment string No Optional comment for the trade
__access object Yes Access object with type field

Response Parameters

In the raw TCP response envelope, the fields below are returned inside data.

Name Type Description
accepted bool Always true on successful acknowledgment
order int Reserved order identifier for tracking the pending order lifecycle
login int Target account login
symbol string Requested symbol
cmd int Requested pending command
volume int Requested trade volume in minimal lots
state int Accepted request state, typically TS_OPEN_REQUEST

Response Example

{
  "extID": "open-pending-1",
  "status": 200,
  "data": {
    "accepted": true,
    "order": 1001234,
    "state": 1,
    "login": 123456,
    "symbol": "EURUSD",
    "cmd": 2,
    "volume": 1000
  }
}

Lifecycle Notes

  • The immediate response is not a final activation report.
  • The pending order should be tracked by order.
  • Final activation or cancellation is observed through trade events and trade queries.