Trade
PUTModify pending order (TRADE)
API Description
Changes a resting pending order. Cannot modify a market order (there is nothing to modify) or a
position (use PUT /v1/position).
HTTP Request
PUT /v1/orderRequest Weight
1 (1 against ORDERS)
Request Parameters
| Name | Type | Mandatory | Description |
|---|---|---|---|
login |
LONG | YES | |
orderId |
LONG | conditional | The pending order ticket. Send this or origClientOrderId. Any pending order on the login can be addressed by ticket, including one this API did not place. |
origClientOrderId |
STRING | conditional | The newClientOrderId the order was placed with. See Known limitations. |
price |
DECIMAL | NO | New trigger price. |
stopLimitPrice |
DECIMAL | NO | New limit price. Stop-limit orders only — -1106 on any other order. |
sl |
DECIMAL | NO | New stop loss. 0 clears. |
tp |
DECIMAL | NO | New take profit. 0 clears. |
timeInForce |
ENUM | conditional | New expiration mode. Mandatory when the service cannot determine the order's current one — see below. |
expiration |
LONG | conditional | New expiration, Unix ms. Mandatory if timeInForce is or becomes GTD or GTD_DAY and the current value is not determinable. |
newClientOrderId |
STRING | NO | Idempotency key for this modification. Must differ from the original order's id. |
recvWindow, timestamp, signature |
Exactly one of orderId / origClientOrderId (-1128 if both or neither). An identifier that does
not resolve to an order currently resting on this login is -2013. At least one field to change
(-5005 if the request contains no changes).
On a stop-limit order the service cannot always read back both current prices; if either is
undeterminable and you did not send it, the request is -1102 — send both price and
stopLimitPrice when modifying a stop-limit order.
Response Example
{
"login": 100123,
"clientOrderId": "bot-002-mod-1",
"origClientOrderId": "bot-002",
"orderId": 44412350,
"symbol": "XAUUSD",
"side": "BUY",
"type": "BUY_LIMIT",
"volume": "0.10",
"status": "NEW",
"price": "2323.00",
"sl": "2315.00",
"timeInForce": "GTC",
"mt5RetCode": 10009,
"transactTime": 1789012400112
}The fields are those of POST /v1/order plus origClientOrderId, the id the order was
placed with (absent for an order this API did not place). clientOrderId is this modification's own
id — yours, or a generated one. status stays NEW while the order rests.
An order inside freezeLevel of the market cannot be modified (-4021). Prices must be multiples of
tickSize (-4008).


