WebSocket API

order.amend

Amend an existing order. Identify the order to amend via orderId OR clientRequestId (exactly one must be supplied — supplying both or neither is rejected). Same fast-ack PD flow as order.place. Requires a signature.

Required scope: tradingws:order:put.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

bodyobjectrequired
idstringrequired
methodstringrequired
paramsobjectrequired

Exactly one of `orderId`/`clientRequestId` must be supplied to identify the order to amend.

clientModifyIdstring | nulloptional

Client-generated amend identifier. Auto-generated by the system when omitted.

clientRequestIdstring | nulloptional

The original order's client-generated identifier from when it was placed. Used XOR with `orderId`.

orderIdstring | nulloptional

The original order's identifier generated by the SSI system. Used XOR with `clientRequestId`.

accountNostringrequired

Trading account number.

symbolstring | nulloptional

Trading symbol.

sidestring | nulloptional

Order side.

orderTypestring | nulloptional

Order type.

pricestring | nulloptional

The order's amended price.

quantitynumber | nulloptional

The order's amended quantity.

deviceIdstringrequired

Identifier of the device submitting the amend request.

userAgentstring | nulloptional

Information about the browser/application sending the request.

signaturestringrequired

RSA+SHA256 signature (base64). Required.

timestampintegerrequired

Response Body

application/json

application/json

Sample Request

wscat -c wss://api.ssi.com.vn/ws/v3/trading -x '{
  "id": "req-0002",
  "method": "order.amend",
  "params": {
    "orderId": "ORD123456",
    "accountNo": "0901351",
    "price": "46.00",
    "quantity": 500,
    "deviceId": "MAC-AABBCCDDEEFF"
  },
  "signature": "base64(RSA-SHA256(...))",
  "timestamp": 1755000001000
}'

Sample Response

{
  "id": "req-0002",
  "method": "order.amend",
  "status": 200,
  "result": {
    "clientRequestId": "req-0001",
    "orderId": "ORD123456",
    "orderStatus": "PD",
    "clientModifyId": "req-0002"
  },
  "rateLimit": {
    "limit": 50,
    "remaining": 46,
    "resetMs": 880
  }
}