WebSocket API
fco.orderbook
Lấy danh sách lệnh thường được sinh ra từ một lệnh điều kiện (fcoId), có phân trang. Không yêu
cầu chữ ký.
Scope bắt buộc: tradingws:fco:get.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
bodyobjectrequired
idstringrequired
methodstringrequired
paramsobjectrequired
fcoIdstringrequired
Định danh lệnh điều kiện.
pageIndexintegeroptional
Chỉ số trang, bắt đầu từ 1.
pageSizeintegeroptional
Số lượng bản ghi trên mỗi trang.
timestampintegerrequired
Response Body
application/json
application/json
Sample Request
wscat -c wss://api.ssi.com.vn/ws/v3/trading -x '{
"id": "req-0006",
"method": "fco.orderbook",
"params": {
"fcoId": "7528ac20-a340-4233-8bb7-a2379fc3c638",
"pageIndex": 1,
"pageSize": 10
},
"timestamp": 1755000005000
}'Sample Response
{
"id": "req-0006",
"method": "fco.orderbook",
"status": 200,
"result": {
"data": [
{
"fcoId": "7528ac20-a340-4233-8bb7-a2379fc3c638",
"accountNo": "1231496",
"quantity": 4000,
"price": "45.00",
"symbol": "SSI",
"side": "B",
"orderType": "LO",
"isMainOrder": true,
"isAttachedOrder": false,
"createdTime": "2026/07/29 09:15:32",
"updatedTime": "2026/07/29 09:15:32",
"uniqueId": "UQ-001",
"orderId": "ORD654321",
"matchedQuantity": 0,
"osQuantity": 4000,
"avgPrice": 0,
"status": "PD",
"detail": "",
"type": "TS"
}
],
"pageSize": 10,
"pageIndex": 1,
"itemsCount": 1,
"pagesCount": 1
},
"rateLimit": {
"limit": 100,
"remaining": 99,
"resetMs": 900
}
}fco.cancelWS
Hủy lệnh điều kiện theo `fcoId`. Nếu bị từ chối, response trả về `error.code: "FCO_ERROR"`. Yêu cầu chữ ký `signature`. Scope bắt buộc: `tradingws:fco:delete`.
fco.listWS
Lấy danh sách lệnh điều kiện theo tài khoản và bộ lọc, có phân trang. Không yêu cầu chữ ký. Scope bắt buộc: `tradingws:fco:get`.