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