WebSocket API
query.accountBalance
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.
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 lấy số dư.
clientIdstring | nulloptional
Tài khoản 6 số định danh khách hàng tại SSI. Nếu số tài khoản là 003C123888 thì clientId = 123888.
timestampintegerrequired
Response Body
application/json
application/json
Sample Request
wscat -c wss://api.ssi.com.vn/ws/v3/trading -x '{
"id": "req-0011",
"method": "query.accountBalance",
"params": {
"accountNo": "0901351"
},
"timestamp": 1755000010000
}'Sample Response
{
"id": "req-0011",
"method": "query.accountBalance",
"status": 200,
"result": {
"equity": {
"accountNo": "0901351",
"accountBalance": "50000000",
"withdrawable": "45000000"
},
"derivative": null
},
"rateLimit": {
"limit": 100,
"remaining": 94,
"resetMs": 800
}
}query.maxBuySellWS
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`.
query.ppmmrAccountWS
Lấy thông tin PP/MMR (Purchasing Power/Maintenance Margin Ratio) của tài khoản. Không yêu cầu chữ ký. Scope bắt buộc: `tradingws:ppmmrAccount:get`.