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.
Client-generated identifier used to correlate the response.
Trading symbol.
Order side. (B - Buy, S - Sell)
Order type. Defaults to `LO` when omitted.
Trading account number.
Order price. Required and must be > 0 when `orderType` is `LO`; optional for other order types.
Order quantity.
Client-generated order identifier, used to correlate the response and later event push. When omitted, the system auto-generates a `clientRequestId`.
Identifier of the device submitting the order (MAC address or IMEI).
Information about the browser/application sending the request.
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.
RSA+SHA256 signature (base64) over the `params` content, using the API Key's SecretKey. Required.
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
}
}ping_pongWS
Clients may send `method: "ping_pong"` (or `"ping_only"`) at any time to check the connection is alive; the server acks immediately on channel `HEARTBEAT`. This message requires no signature and carries no `id`. **Client sends ping:** ```json { "method": "ping_pong" } ``` **Server replies pong:** ```json { "method": "ping_pong", "channel": "HEARTBEAT", "status": "ok", "message": "pong" } ``` The server also periodically broadcasts a heartbeat message (every 30 seconds) to every open connection — clients aren't required to send their own ping, but doing so is still recommended to detect a half-open connection early.
order.amendWS
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`.