Skip to content

MngUpdatePendingTradeSync

Description: Updates a pending order and returns the applied result of this specific operation in the same TCP request.

SEO

MngUpdatePendingTradeSync is the synchronous TCP pending order update method for ScaleTrade manager API integrations. Use this endpoint when a CRM, dealer plugin, backoffice tool, or trading connector must update a pending order and receive the resulting trade event payload by order.

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 Pending order ID
open_price double No Pending open price
volume int No Pending order volume
open_time int No Open timestamp
sl double No Stop Loss
tp double No Take Profit
expiration int64 No Expiration timestamp
comment string No Trade comment
__access object Yes Manager/session access object

At least one pending order field must be provided.

Success Response

The response uses the existing trade-event data schema, but contains the snapshot applied by this operation, not a later quote or another request. See Sync completion and response fields for every response field and error format.

{
  "extID": "sync-1",
  "status": 200,
  "data": {
    "order": 1001234,
    "login": 123456,
    "cmd": 2,
    "state": 0,
    "symbol": "EURUSD",
    "reason": 3,
    "cashier_transaction_id": 0,
    "volume": 40,
    "parent_order": 0,
    "closed_volume": 0,
    "partial_close_volume": 0,
    "open_time": 1790950014,
    "close_time": 0,
    "open_price": 1.08,
    "close_price": 0,
    "sl": 1.08,
    "tp": 1.12,
    "profit": 0,
    "commission": 0,
    "storage": 0,
    "comment": "Sync pending update",
    "digits": 5,
    "expiration": 0,
    "update_time": 1790950014
  }
}

Operation Correlation

The result is correlated to the internal operation context and this request's completion latch. Matching an order number or receiving an ordinary quote update cannot complete the request. No broadcast subscription is required. Command access checks and broadcast recipient filtering remain unchanged.

Timeout

The default completion deadline is 5000 ms, measured from TCP worker dispatch. Known execution failures return their mapped error without waiting for that deadline. If no result completes within the deadline, TCP returns 504 SYNC_TIMEOUT. A timeout does not cancel execution or prove that no mutation occurred; inspect the trade and traces before retrying. See Sync completion for complete error examples.