Messages
{
"action": "subscribe",
"channels": [
{
"name": "position.STOCK.json"
}
]
}{
"T": "dp",
"action": "position_update",
"event": "pendingcancel",
"position": {
"id": 8426,
"accountNo": "0001179019",
"symbol": "ACB",
"status": "OPEN",
"loanPackageId": 5757,
"side": "NB",
"accumulateQuantity": 2400,
"tradeQuantity": 2100,
"closedQuantity": 300,
"costPrice": 23125.21,
"marketPrice": 23100,
"breakEvenPrice": 23251.3689,
"openQuantity": 2000,
"overNightQuantity": null,
"averageClosePrice": 23816.6667,
"marketType": "STOCK",
"createdDate": "2025-07-28T06:20:21.655809Z",
"modifiedDate": "2026-05-07T11:10:08.787906Z"
},
"sequence": 1,
"timestamp": 1776054245274
}Websockets
Vị thế
Dữ liệu vị thế thời gian thực (Position Event)
Cung cấp thông tin chi tiết về vị thế giao dịch trên tài khoản người dùng theo thời gian thực. Hệ thống sẽ đẩy dữ liệu ngay khi có sự thay đổi liên quan đến: mở vị thế, đóng vị thế, thay đổi khối lượng, giá vốn, giá đóng, giá thị trường hoặc trạng thái vị thế.
WSS
/
v1
/
stream
Messages
{
"action": "subscribe",
"channels": [
{
"name": "position.STOCK.json"
}
]
}{
"T": "dp",
"action": "position_update",
"event": "pendingcancel",
"position": {
"id": 8426,
"accountNo": "0001179019",
"symbol": "ACB",
"status": "OPEN",
"loanPackageId": 5757,
"side": "NB",
"accumulateQuantity": 2400,
"tradeQuantity": 2100,
"closedQuantity": 300,
"costPrice": 23125.21,
"marketPrice": 23100,
"breakEvenPrice": 23251.3689,
"openQuantity": 2000,
"overNightQuantity": null,
"averageClosePrice": 23816.6667,
"marketType": "STOCK",
"createdDate": "2025-07-28T06:20:21.655809Z",
"modifiedDate": "2026-05-07T11:10:08.787906Z"
},
"sequence": 1,
"timestamp": 1776054245274
}method
type:string
GET
query
type:object
encoding
type:string
bắt buộc
Định dạng mã hóa dữ liệu WebSocket (json, msgpack).
Đăng ký luồng vị thế của nhà đầu tư
type:object
Đăng ký topic position.{market_type}.{encoding}.
Cập nhật vị thế của nhà đầu tư
type:object
Bản cập nhật vị thế của nhà đầu tư hiện tại.