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

Chi tiết giao dịch

API này trả về lịch sử giao dịch chi tiết cho một mã cổ phiếu cụ thể trong danh mục Nebula.

HTTP request

  • URL: /api/personalize/v1/partner/nebula-ultra/profiles/portfolio/transaction
  • Method: GET
  • Content Type: None
  • 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ả
externalUserIdstringUserId của đối tác.
typestringkhôngLoại portfolio:
- backtest: Hiệu suất quá khứ (default)
- paper: Giao dịch giả lập
- live: Dành cho bạn
tickerstringMã cổ phiếu cần xem chi tiết.
- ticker lấy từ transactionTickers của API Thông tin Nebula.
recvWindowstringkhôngThời gian chấp nhận (ms), default: 5000.
timestampstringUnix timestamp (milliseconds).
signaturestringHMAC-SHA256 signature.

Phản Hồi (Response)

Response Mẫu

{
"status": 200,
"message": "Success",
"data": [
{
"ticker": "BVH",
"action": "BUY",
"price": 38686.93,
"priceClose": 38552.68325,
"quantity": 39800,
"timestamp": "2020-04-06T00:00:00.000Z"
},
{
"ticker": "BVH",
"action": "BUY",
"price": 40867.54,
"priceClose": 40725.2654,
"quantity": 37200,
"timestamp": "2020-04-07T00:00:00.000Z"
},
{
"ticker": "BVH",
"action": "BUY",
"price": 40867.54,
"priceClose": 40725.2654,
"quantity": 35300,
"timestamp": "2020-04-08T00:00:00.000Z"
},
{
"ticker": "BVH",
"action": "BUY",
"price": 40354.75,
"priceClose": 40214.0696,
"quantity": 35400,
"timestamp": "2020-04-09T00:00:00.000Z"
},
{
"ticker": "BVH",
"action": "BUY",
"price": 39328.17,
"priceClose": 39191.678,
"quantity": 9600,
"timestamp": "2020-04-10T00:00:00.000Z"
},
{
"ticker": "BVH",
"action": "BUY",
"price": 39541.91,
"priceClose": 39404.67625,
"quantity": 3200,
"timestamp": "2020-04-13T00:00:00.000Z"
},
{
"priceClose": 39362.0766,
"timestamp": "2020-04-14T00:00:00.000Z"
}
]
}

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ả xử lý.
dataarray (Xem chi tiết)Dữ liệu danh sách các giao dịch.

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

Quay lại

Tên Thuộc TínhKiểu Dữ LiệuMô Tả
tickerstringMã cổ phiếu.
actionstringLoại lệnh:
- BUY: mua
- SELL: bán
pricenumberGiá thực hiện.
priceClosenumberGiá đóng cửa cổ phiếu tại mỗi ngày giao dịch.
quantitynumberSố lượng.
timestampstringNgày thực hiện (Định dạng: yyyy-MM-dd'T'HH:mm:ss.SSS'Z').

CREDENTIALS

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

RESPONSE200

{
"status": 200,
"message": "Success",
"total": 593,
"data": [
{
"ticker": "BVH",
"action": "BUY",
"price": 38686.93,
"priceClose": 38552.68325,
"quantity": 39800,
"timestamp": "2020-04-06T00:00:00.000Z"
},
{
"ticker": "BVH",
"action": "BUY",
"price": 40867.54,
"priceClose": 40725.2654,
"quantity": 37200,
"timestamp": "2020-04-07T00:00:00.000Z"
},
{
"ticker": "BVH",
"action": "BUY",
"price": 40867.54,
"priceClose": 40725.2654,
"quantity": 35300,
"timestamp": "2020-04-08T00:00:00.000Z"
},
{
"ticker": "BVH",
"action": "BUY",
"price": 40354.75,
"priceClose": 40214.0696,
"quantity": 35400,
"timestamp": "2020-04-09T00:00:00.000Z"
},
{
"ticker": "BVH",
"action": "BUY",
"price": 39328.17,
"priceClose": 39191.678,
"quantity": 9600,
"timestamp": "2020-04-10T00:00:00.000Z"
},
{
"ticker": "BVH",
"action": "BUY",
"price": 39541.91,
"priceClose": 39404.67625,
"quantity": 3200,
"timestamp": "2020-04-13T00:00:00.000Z"
},
{
"priceClose": 39362.0766,
"timestamp": "2020-04-14T00:00:00.000Z"
}
]
}