Trading
trade-position
Lấy thông tin vị thế cho tài khoản.
Authorization
Bearer AuthorizationBearer <token>
Nhập JWT token theo định dạng Bearer <token>.
In: header
Header Parameters
Content-Typestringrequired
Định dạng nội dung request body. Chủ yếu là application/json.
User-Agentstringoptional
Thông tin client gửi request.
Accept-Languagestringoptional
Ngôn ngữ phản hồi mong muốn. Nếu không có header này, hệ thống sẽ mặc định là en
Query Parameters
clientIdstringrequired
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
accountNostringoptional
Tài khoản giao dịch cần lấy thông tin vị thế, các tài khoản đuôi 1, 6, 8 tương ứng (CASH, MARGIN, DERIVATIVE) sẽ có thông tin vị thế khác nhau.
Response Headers
X-RATELIMIT-LIMITstringoptional
Giới hạn số request trong chu kỳ.
X-RATELIMIT-REMAININGstringoptional
Số request còn lại trong chu kỳ hiện tại.
X-RATELIMIT-RESETstringoptional
Thời điểm reset giới hạn request.
Response Body
application/json
application/json
curl -X GET "https://api.ssi.com.vn/api/v3/trading/position?clientId=string" \ -H "Content-Type: application/json"Success
{
"data": {
"equityPositions": [
{
"accountNo": "string",
"symbol": "string",
"quantity": 0.1,
"blockQuantity": 0.1,
"dividendQuantity": 0.1,
"buyingQuantity": 0.1,
"boughtQuantity": 0.1,
"sellingQuantity": 0.1,
"soldQuantity": 0.1,
"t1SellQuantity": 0.1,
"t2SellQuantity": 0.1,
"costPrice": 0.1,
"mortgageQuantity": 0.1,
"sellableQuantity": 0.1,
"restrictedQuantity": 0.1
}
],
"derOpenPositions": [
{
"accountNo": "string",
"symbol": "string",
"fee": "string",
"commission": "string",
"interest": "string",
"extInterest": "string",
"loan": "string",
"deliveryAmount": "string",
"floatingPL": "string",
"tradingPL": "string",
"totalPL": "string",
"withdrawable": "string",
"cashSSI": "string",
"validNonCashSSI": "string",
"withdrawableSSI": "string",
"cashVSDC": "string",
"validNonCashVSDC": "string",
"withdrawableVSDC": "string"
}
],
"derClosePositions": [
{
"accountNo": "string",
"symbol": "string",
"fee": "string",
"commission": "string",
"interest": "string",
"extInterest": "string",
"loan": "string",
"deliveryAmount": "string",
"floatingPL": "string",
"tradingPL": "string",
"totalPL": "string",
"withdrawable": "string",
"cashSSI": "string",
"validNonCashSSI": "string",
"withdrawableSSI": "string",
"cashVSDC": "string",
"validNonCashVSDC": "string",
"withdrawableVSDC": "string"
}
]
}
}Yêu cầu không hợp lệ.
{
"code": "400",
"msg": "Invalid request"
}