For the complete documentation index, see llms.txt. This page is also available as Markdown.

1.8. Lấy dữ liệu giao dịch theo nhà đầu tư

Mô tả cách sử dụng thư viện sau khi người dùng đã đăng nhập. Chi tiết được nêu ra ở cuối chương này.

Mô tả cách sử dụng thư viện sau khi người dùng đã đăng nhập. Các ví dụ chi tiết được nêu ra ở cuối chương này.

data = client.PriceStatistics().get_value_by_investor(
    tickers=tickers,
    from_date=from_date,
    to_date=to_date
)

Tham số:

Tên tham số
Mô tả
Kiểu dữ liệu
Mặc định
Bắt buộc

tickers

Danh sách mã được viết in hoa.

str hoặc list

from_date

Mốc thời gian lấy dữ liệu xa nhất.

str

to_date

Mốc thời gian lấy dữ liệu gần nhất.

str

datetime.now()

Không

Class nhận dữ liệu là PriceStatistics và có phương thức nhận dữ liệu là get_value_by_investor()

data = client.PriceStatistics().get_value_by_investor(
    tickers=tickers,
    from_date="2025-10-01",
    to_date="2025-10-08"
)

print(data)

Dữ liệu có các thuộc tính:

Tên thuộc tính
Mô tả
Kiểu dữ liệu

ticker

Tên mã.

str

timestamp

Thời gian giao dịch

str

totalTrade

Tổng số lệnh giao dịch

int

totalBuyTrade

Tổng số lệnh mua

int

totalSellTrade

Tổng số lệnh bán

int

totalBuyTradeVolume

Tổng khối lượng mua

int

totalSellTradeVolume

Tổng khối lượng bán

int

foreignBuyVolumeMatched

KL mua khớp lệnh của NĐT nước ngoài

int

foreignBuyValueMatched

Giá trị mua khớp lệnh của NĐT nước ngoài

int

foreignSellVolumeMatched

KL bán khớp lệnh của NĐT nước ngoài

int

foreignSellValueMatched

Giá trị bán khớp lệnh của NĐT nước ngoài

int

foreignBuyVolumeDeal

KL mua thỏa thuận của NĐT nước ngoài

int

foreignBuyValueDeal

Giá trị mua thỏa thuận của NĐT nước ngoài

int

foreignSellVolumeDeal

KL bán thỏa thuận của NĐT nước ngoài

int

foreignSellValueDeal

Giá trị bán thỏa thuận của NĐT nước ngoài

int

foreignIndividualBuyTradingMatchValue

Giá trị mua khớp lệnh của cá nhân nước ngoài

int

foreignInstitutionalBuyTradingMatchValue

Giá trị mua khớp lệnh của tổ chức nước ngoài

int

foreignIndividualSellTradingMatchValue

Giá trị bán khớp lệnh của cá nhân nước ngoài

int

foreignInstitutionalSellTradingMatchValue

Giá trị bán khớp lệnh của tổ chức nước ngoài

int

foreignIndividualBuyTradingMatchVolume

KL mua khớp lệnh của cá nhân nước ngoài

int

foreignInstitutionalBuyTradingMatchVolume

KL mua khớp lệnh của tổ chức nước ngoài

int

foreignIndividualSellTradingMatchVolume

KL bán khớp lệnh của cá nhân nước ngoài

int

foreignInstitutionalSellTradingMatchVolume

KL bán khớp lệnh của tổ chức nước ngoài

int

localIndividualBuyValue

Giá trị mua của cá nhân trong nước

int

localIndividualBuyVolume

KL mua của cá nhân trong nước

int

localIndividualSellVolume

KL bán của cá nhân trong nước

int

localIndividualSellValue

Giá trị bán của cá nhân trong nước

int

localInstitutionalBuyVolume

KL mua của tổ chức trong nước

int

localInstitutionalBuyValue

Giá trị mua của tổ chức trong nước

int

localInstitutionalSellVolume

KL bán của tổ chức trong nước

int

localInstitutionalSellValue

Giá trị bán của tổ chức trong nước

int

localIndividualBuyMatchVolume

KL mua khớp lệnh của cá nhân trong nước

int

localIndividualBuyMatchValue

Giá trị mua khớp lệnh của cá nhân trong nước

int

localIndividualSellMatchVolume

KL bán khớp lệnh của cá nhân trong nước

int

localIndividualSellMatchValue

Giá trị bán khớp lệnh của cá nhân trong nước

int

localIndividualSellMatchValue

Giá trị bán khớp lệnh của cá nhân trong nước

int

localInstitutionalBuyMatchVolume

KL mua khớp lệnh của tổ chức trong nước

int

localInstitutionalBuyMatchValue

Giá trị mua khớp lệnh của tổ chức trong nước

int

localInstitutionalSellMatchVolume

KL bán khớp lệnh của tổ chức trong nước

int

localInstitutionalSellMatchValue

Giá trị bán khớp lệnh của tổ chức trong nước

int

proprietaryTotalMatchBuyTradeVolume

KL mua khớp lệnh của tự doanh

int

proprietaryTotalMatchBuyTradeValue

Giá trị mua khớp lệnh của tự doanh

int

proprietaryTotalMatchSellTradeValue

Giá trị bán khớp lệnh của tự doanh

int

proprietaryTotalMatchSellTradeVolume

KL bán khớp lệnh của tự doanh

int

proprietaryTotalBuyTradeVolume

Tổng KL mua của tự doanh

int

proprietaryTotalBuyTradeValue

Tổng giá trị mua của tự doanh

int

proprietaryTotalSellTradeValue

Tổng giá trị bán của tự doanh

int

proprietaryTotalSellTradeVolume

Tổng KL bán của tự doanh

int

proprietaryTotalDealBuyTradeVolume

KL mua thỏa thuận của tự doanh

int

proprietaryTotalDealBuyTradeValue

Giá trị mua thỏa thuận của tự doanh

int

proprietaryTotalDealSellTradeValue

Giá trị bán thỏa thuận của tự doanh

int

proprietaryTotalDealSellTradeVolume

KL bán thỏa thuận của tự doanh

int

openInterest

Số hợp đồng mở

int

Ví dụ:

Last updated