Open Pending Trade
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.
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¶
| 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 |
| state | int | Accepted request state, typically TS_OPEN_REQUEST |
Response Example¶
{
"accepted": true,
"order": 1001234,
"login": 123456,
"symbol": "EURUSD",
"cmd": 2,
"state": 1
}
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.