WebSocket API
query.maxBuySell
Lấy khối lượng mua/bán tối đa theo tài khoản, mã và giá. Không yêu cầu chữ ký.
Scope bắt buộc: tradingws:maxBuySell:get.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
bodyobjectrequired
idstringrequired
methodstringrequired
paramsobjectrequired
accountNostringrequired
Tài khoản giao dịch cần kiểm tra khối lượng mua/bán tối đa.
symbolstringrequired
Mã chứng khoán cần kiểm tra khối lượng mua/bán tối đa.
pricenumber | nulloptional
Giá cần kiểm tra khối lượng mua/bán tối đa.
timestampintegerrequired
Response Body
application/json
application/json
Sample Request
wscat -c wss://api.ssi.com.vn/ws/v3/trading -x '{
"id": "req-0010",
"method": "query.maxBuySell",
"params": {
"accountNo": "0901351",
"symbol": "SSI",
"price": 45.5
},
"timestamp": 1755000009000
}'Sample Response
{
"id": "req-0010",
"method": "query.maxBuySell",
"status": 200,
"result": {
"accountNo": "0901351",
"maxBuyQty": 5000,
"marginRatio": "50%",
"purchasingPower": 227500,
"maxSellQty": 1000
},
"rateLimit": {
"limit": 100,
"remaining": 95,
"resetMs": 820
}
}query.positionWS
Lấy thông tin vị thế cho tài khoản. Tài khoản cổ phiếu trả về `equity`, tài khoản phái sinh trả về `derivative`. Không yêu cầu chữ ký. Scope bắt buộc: `tradingws:position:get`.
query.accountBalanceWS
Lấy số dư tài khoản giao dịch. Không yêu cầu chữ ký. Scope bắt buộc: `tradingws:accountBalance:get`.