Chuyển tới nội dung chính

Lịch sử giao dịch cổ phiếu

API lấy danh sách lịch sử giao dịch mua/bán cổ phiếu của danh mục đầu tư.

HTTP request

  • URL: /api/personalize/v1/partner/portfolio/stock-transactions
  • Method: POST
  • Content Type: application/json
  • Response Type: application/json

Tham số header

HeaderMô tảKiểu dữ liệuBắt buộc
X-Api-KeyKhóa duy nhất.string

Tham Số Truy Vấn (Query Parameters)

Tên Tham SốKiểu Dữ LiệuBắt buộcMô Tả
externalUserIdstringID người dùng duy nhất từ hệ thống của đối tác.
recvWindowstringkhôngThời gian chấp nhận (ms), default: 5000
timestampstringUnix timestamp (milliseconds).
signaturestringHMAC-SHA256 signature.

Yêu Cầu (Request)

Request Mẫu

{
"ticker": null,
"transactionTypes": null,
"fromDate": "28/01/2023",
"toDate": "28/01/2026",
"page": 0,
"size": 15,
"portfolioId": 862
}

Chi Tiết Tham Số Request Body

Tên Thuộc TínhKiểu Dữ LiệuMô Tả
tickerstringMã cổ phiếu cần lọc (null = tất cả).
transactionTypesarrayDanh sách loại giao dịch cần lọc (null = tất cả).
fromDatestringNgày bắt đầu (dd/MM/yyyy).
toDatestringNgày kết thúc (dd/MM/yyyy).
pagenumberSố trang (bắt đầu từ 0).
sizenumberSố lượng bản ghi mỗi trang.
portfolioIdnumberID danh mục đầu tư.

Phản Hồi (Response)

Response Mẫu

{
"status": 200,
"message": "Success",
"total": 24,
"data": [
{
"portfolioId": 862,
"id": 969078,
"ticker": "HPG",
"transactionTypeName": "Mua",
"transactionType": "BUY",
"volume": 4432,
"price": 2311,
"value": 10242352,
"transactionFee": 0,
"transactionFeeValue": 0,
"totalValue": 10242352,
"createdDate": "09/01/2026 11:37",
"date": "09/01/2026 10:00",
"note": "Chuyển kho 1000 HPG từ VPS về",
"dividendCash": 0,
"dividendStock": 0
},
{
"portfolioId": 862,
"id": 969068,
"ticker": "HPG",
"transactionTypeName": "Bán",
"transactionType": "SELL",
"volume": 100,
"price": 26133.412800000006,
"value": 2613341.28,
"transactionFee": 0,
"transactionFeeValue": 0,
"totalValue": 2613341.2800000007,
"createdDate": "09/01/2026 09:42",
"date": "30/12/2025 15:00",
"note": "Transfer to SSI Securities",
"dividendCash": 0,
"dividendStock": 0
},
{
"portfolioId": 862,
"id": 969062,
"ticker": "HPG",
"transactionTypeName": "Bán",
"transactionType": "SELL",
"volume": 100,
"price": 26133.412800000006,
"value": 2613341.28,
"transactionFee": 0.1,
"transactionFeeValue": 2613.34,
"totalValue": 2613341.0800000005,
"createdDate": "08/01/2026 17:29",
"date": "30/12/2025 15:00",
"note": "Transfer to SSI Securities",
"dividendCash": 0,
"dividendStock": 0
},
{
"portfolioId": 862,
"id": 969067,
"ticker": "HPG",
"transactionTypeName": "Mua",
"transactionType": "BUY",
"volume": 200,
"price": 26500,
"value": 5300000,
"transactionFee": 0,
"transactionFeeValue": 0,
"totalValue": 5300000,
"createdDate": "09/01/2026 09:29",
"date": "30/12/2025 14:00",
"note": "Transfer from VPS Securities - cost price 26,500",
"dividendCash": 0,
"dividendStock": 0
},
{
"portfolioId": 862,
"id": 969061,
"ticker": "HPG",
"transactionTypeName": "Mua",
"transactionType": "BUY",
"volume": 200,
"price": 26500,
"value": 5300000,
"transactionFee": 0.1,
"transactionFeeValue": 5300,
"totalValue": 5300000.2,
"createdDate": "08/01/2026 17:29",
"date": "30/12/2025 14:00",
"note": "Transfer from VPS Securities - cost price 26,500",
"dividendCash": 0,
"dividendStock": 0
},
{
"portfolioId": 862,
"id": 969060,
"ticker": "HPG",
"transactionTypeName": "Mua",
"transactionType": "BUY",
"volume": 200,
"price": 26500,
"value": 5300000,
"transactionFee": 0.1,
"transactionFeeValue": 5300,
"totalValue": 5300000.2,
"createdDate": "08/01/2026 17:29",
"date": "30/12/2025 14:00",
"note": "Transfer from VPS Securities - cost price 26,500",
"dividendCash": 0,
"dividendStock": 0
},
{
"portfolioId": 862,
"id": 969057,
"ticker": "HPG",
"transactionTypeName": "Mua",
"transactionType": "BUY",
"volume": 200,
"price": 26500,
"value": 5300000,
"transactionFee": 0.1,
"transactionFeeValue": 5300,
"totalValue": 5300000.2,
"createdDate": "08/01/2026 17:08",
"date": "30/12/2025 14:00",
"note": "Transfer from VPS Securities - cost price 26,500",
"dividendCash": 0,
"dividendStock": 0
},
{
"portfolioId": 862,
"id": 969080,
"ticker": "VCB",
"transactionTypeName": "Mua",
"transactionType": "BUY",
"volume": 100,
"price": 85000,
"value": 8500000,
"transactionFee": 0,
"transactionFeeValue": 0,
"totalValue": 8500000,
"createdDate": "09/01/2026 14:50",
"date": "30/12/2025 11:00",
"note": "Exercise VCB rights - ratio 5:1",
"dividendCash": 0,
"dividendStock": 0
},
{
"portfolioId": 862,
"id": 969073,
"ticker": "VCB",
"transactionTypeName": "Mua",
"transactionType": "BUY",
"volume": 333,
"price": 85000,
"value": 28305000,
"transactionFee": 0,
"transactionFeeValue": 0,
"totalValue": 28305000,
"createdDate": "09/01/2026 09:56",
"date": "30/12/2025 11:00",
"note": "Exercise VCB rights - ratio 5:1",
"dividendCash": 0,
"dividendStock": 0
},
{
"portfolioId": 862,
"id": 969065,
"ticker": "VCB",
"transactionTypeName": "Mua",
"transactionType": "BUY",
"volume": 100,
"price": 85000,
"value": 8500000,
"transactionFee": 0.1,
"transactionFeeValue": 8500,
"totalValue": 8500000.2,
"createdDate": "08/01/2026 17:29",
"date": "30/12/2025 11:00",
"note": "Exercise VCB rights - ratio 5:1",
"dividendCash": 0,
"dividendStock": 0
},
{
"portfolioId": 862,
"id": 969056,
"ticker": "VNM",
"transactionTypeName": "Mua",
"transactionType": "BUY",
"volume": -60,
"price": 77000,
"value": -4620000,
"transactionFee": 9625,
"transactionFeeValue": -444675000,
"totalValue": -4609412,
"createdDate": "08/01/2026 15:41",
"date": "30/12/2025 10:30",
"note": "Sell order #123457",
"dividendCash": 0,
"dividendStock": 0
},
{
"portfolioId": 862,
"id": 969055,
"ticker": "VNM",
"transactionTypeName": "Mua",
"transactionType": "BUY",
"volume": 100,
"price": 77000,
"value": 7700000,
"transactionFee": 9625,
"transactionFeeValue": 741125000,
"totalValue": 7710588,
"createdDate": "08/01/2026 15:39",
"date": "30/12/2025 10:30",
"note": "Sell order #123457",
"dividendCash": 0,
"dividendStock": 0
},
{
"portfolioId": 862,
"id": 969053,
"ticker": "VNM",
"transactionTypeName": "Bán",
"transactionType": "SELL",
"volume": 50,
"price": 805.8938667944418,
"value": 40294.69,
"transactionFee": 9625,
"transactionFeeValue": 3878364.23,
"totalValue": 32102.47676090082,
"createdDate": "08/01/2026 13:56",
"date": "30/12/2025 10:30",
"note": "Sell order #123457",
"dividendCash": 2396,
"dividendStock": 0
},
{
"portfolioId": 862,
"id": 969052,
"ticker": "HAG",
"transactionTypeName": "Mua",
"transactionType": "BUY",
"volume": 110,
"price": 2000,
"value": 220000,
"transactionFee": 10,
"transactionFeeValue": 22000,
"totalValue": 220018,
"createdDate": "08/01/2026 13:56",
"date": "30/12/2025 09:15",
"note": "Buy order #12456",
"dividendCash": 0,
"dividendStock": 0
},
{
"portfolioId": 862,
"id": 969051,
"ticker": "VNM",
"transactionTypeName": "Mua",
"transactionType": "BUY",
"volume": 11,
"price": 22000,
"value": 242000,
"transactionFee": 18750,
"transactionFeeValue": 45375000,
"totalValue": 262625,
"createdDate": "08/01/2026 11:32",
"date": "30/12/2025 09:15",
"note": "Buy order #12456",
"dividendCash": 0,
"dividendStock": 0
}
]
}

Chi Tiết Tham Số Response

Tên Thuộc TínhKiểu Dữ LiệuMô Tả
statusnumberMã trạng thái HTTP.
messagestringThông báo kết quả.
totalnumberTổng số bản ghi.
dataarray (Xem chi tiết)Danh sách giao dịch cổ phiếu.

Cấu trúc thuộc tính data

Quay lại
Tên Thuộc TínhKiểu Dữ LiệuMô Tả
portfolioIdnumberID danh mục đầu tư.
idnumberID giao dịch.
tickerstringMã cổ phiếu.
transactionTypeNamestringTên loại giao dịch (Mua/Bán).
transactionTypestringMã loại giao dịch (BUY/SELL).
volumenumberKhối lượng giao dịch.
pricenumberGiá giao dịch.
valuenumberGiá trị giao dịch (chưa bao gồm thuế, phí)
transactionFeenumberPhí giao dịch (%).
transactionFeeValuenumberGiá trị phí giao dịch.
totalValuenumberTổng giá trị giao dịch (đã bao gồm thuế, phí).
createdDatestringNgày tạo bản ghi.
datestringNgày giao dịch (Định dạng: yyyy-MM-dd'T'HH:mm:ss.SSS'Z').
notestringDiễn giải giao dịch (text)
dividendCashnumberCổ tức tiền mặt.
dividendStocknumberCổ tức cổ phiếu.

CREDENTIALS

* Timestamp và Signature sẽ được tự động tạo khi gọi API

RESPONSE200

{
"status": 200,
"message": "Success",
"total": 24,
"data": [
{
"portfolioId": 862,
"id": 969078,
"ticker": "HPG",
"transactionTypeName": "Mua",
"transactionType": "BUY",
"volume": 4432,
"price": 2311,
"value": 10242352,
"transactionFee": 0,
"transactionFeeValue": 0,
"totalValue": 10242352,
"createdDate": "2026-01-09T04:37:32.982Z",
"date": "2026-01-09T03:00:00.000Z",
"note": "Chuyển kho 1000 HPG từ VPS về",
"dividendCash": 0,
"dividendStock": 0
},
{
"portfolioId": 862,
"id": 969068,
"ticker": "HPG",
"transactionTypeName": "Bán",
"transactionType": "SELL",
"volume": 100,
"price": 26133.412800000006,
"value": 2613341.28,
"transactionFee": 0,
"transactionFeeValue": 0,
"totalValue": 2613341.2800000007,
"createdDate": "2026-01-09T02:42:52.793Z",
"date": "2025-12-30T08:00:00.000Z",
"note": "Transfer to SSI Securities",
"dividendCash": 0,
"dividendStock": 0
}
]
}