WebSocket API

order.place

Place a new order. The system responds immediately (orderStatus: "PD") to confirm the order was accepted — the real fill status arrives later via the order.{accountNo} notification channel (see "Place/amend/cancel orders: fast acknowledgment, result arrives later" at the top of this document). Requires a signature (RSA+SHA256) per UBCKNN's data-integrity regulation for trading operations.

Required scope: tradingws:order:post.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

bodyobjectrequired
idstringrequired

Client-generated identifier used to correlate the response.

methodstringrequired
paramsobjectrequired
symbolstringrequired

Trading symbol.

sidestringrequired

Order side. (B - Buy, S - Sell)

orderTypestringoptional

Order type. Defaults to `LO` when omitted.

accountNostringrequired

Trading account number.

pricestring | nulloptional

Order price. Required and must be > 0 when `orderType` is `LO`; optional for other order types.

quantitynumberrequired

Order quantity.

clientRequestIdstring | nulloptional

Client-generated order identifier, used to correlate the response and later event push. When omitted, the system auto-generates a `clientRequestId`.

deviceIdstringrequired

Identifier of the device submitting the order (MAC address or IMEI).

userAgentstring | nulloptional

Information about the browser/application sending the request.

isReturnOrderIdboolean | nulloptional

Optional. Defaults by account type (equity `true`, derivatives `false`). The WebSocket `PD` ack never includes `orderId` regardless of this value — `orderId` arrives on the `order.{accountNo}` channel.

signaturestringrequired

RSA+SHA256 signature (base64) over the `params` content, using the API Key's SecretKey. Required.

timestampintegerrequired

Unix timestamp (milliseconds) at the time the request was sent, used as signing input.

Response Body

application/json

application/json

Sample Request

wscat -c wss://api.ssi.com.vn/ws/v3/trading -x '{
  "id": "req-0001",
  "method": "order.place",
  "params": {
    "symbol": "SSI",
    "side": "B",
    "orderType": "LO",
    "price": "45.50",
    "quantity": 1000,
    "accountNo": "0901351",
    "deviceId": "MAC-AABBCCDDEEFF"
  },
  "signature": "base64(RSA-SHA256(...))",
  "timestamp": 1755000000000
}'

Sample Response

{
  "id": "req-0001",
  "method": "order.place",
  "status": 200,
  "result": {
    "clientRequestId": "req-0001",
    "orderStatus": "PD"
  },
  "rateLimit": {
    "limit": 50,
    "remaining": 47,
    "resetMs": 900
  }
}