Skip to main content

Thư viện cung cấp các công cụ mạnh mẽ và dữ liệu chi tiết hỗ trợ phân tích tài chính, thị trường chứng khoán

Project description

VNSFintech

VNSFintech là thư viện Python cung cấp dữ liệu và công cụ hỗ trợ tài chính cho các nhà đầu tư và phân tích thị trường chứng khoán.

Cài đặt

pip install VNSFintech

Cập nhật phiên bản mới:

pip install --upgrade VNSFintech

Sử dụng

from VNSFintech import *

Hướng dẫn sử dụng


Class stock

Cổ phiếu Việt Nam

1. Thông tin mã cổ phiếu:

stock_info(symbol)

df = stock.stock_info('HPG')

2. Lịch sử ohlcv:

history(symbol, start, end, time='days')

df = stock.history('HPG', '2020-01-01', '2023-01-01')

time:

  • 'minutes'
  • 'hours'
  • 'days'
  • 'months'

3. Lịch sử khớp lệnh:

intraday(symbol)

df = stock.intraday('HPG')

4. Phân loại nhà đầu tư:

intraday_order(symbol)

df = stock.intraday_order('HPG')

5. Thông tin giá cổ phiếu:

Lịch sử giá cổ phiếu: price_history(symbol, time, start, end)

df = stock.price_history('HPG', time='days', start='2020-01-01', end='2023-01-01')

time:

  • 'days'
  • 'months'
  • 'quarters'
  • 'years'

Tổng hợp giá cổ phiếu: tổng và trung bình ngày price_history_summary(symbol)

df = stock.price_history_summary('HPG')

7. Nước ngoài:

Lịch sử giao dịch nước ngoài: foreign_history(symbol, time, start, end)

df = stock.foreign_history('HPG', time='days', start='2020-01-01', end='2023-01-01')

time:

  • 'days'
  • 'months'
  • 'quarters'
  • 'years'

Tổng hợp giao dịch nước ngoài: tổng và trung bình ngày foreign_history_summary(symbol)

df = stock.foreign_history_summary('HPG')

8. Tự doanh

Lịch sử giao dịch tự doanh: proprietary_history(symbol, time, start, end)

df = stock.proprietary_history('HPG', time='days', start='2020-01-01', end='2023-01-01')

Tổng hợp giao dịch nước ngoài:tổng và trung bình theo ngày, tháng, quý, năm. proprietary_history_summary(symbol, time)

df = stock.proprietary_history_summary('HPG', time='days')

time:

  • 'days'
  • 'months'
  • 'quarters'
  • 'years'

9. Cung cầu

demand_history(symbol, time, start, end)

time:

  • 'days'
  • 'months'
  • 'quarters'
  • 'years'
df = stock.demand_history('HPG', time='days', start='2020-01-01', end='2023-01-01')

10. Tin tức & sự kiện

Tin tức: news(symbol)

df = stock.news('HPG')

Cổ tức: dividend(symbol)

df = stock.dividend('HPG')

Họp HDQT: general_meeting(symbol)

df = stock.general_meeting('HPG')

Sự kiện khác: other_event(symbol)

df = stock.other_event('HPG')

11. Tài chính

Chỉ số tài chính: finance_ratio(symbol, time)

df = stock.finance_ratio('HPG', time='years')

Bảng cân đối kế toán: balance_sheet(symbol, time)

df = stock.balance_sheet('HPG', time='years')

Kết quả kinh doanh: income_statement(symbol, time)

df = stock.income_statement('HPG', time='years')

Báo cáo lưu chuyển tiền tệ: cash_flow(symbol, time)

df = stock.cash_flow('HPG', time='years')

time:

  • 'years'
  • 'quarters'

12. Cổ đông

Thông tin cổ đông: shareholders_info(symbol)

df = stock.shareholders_info('HPG')

Cấu trúc cổ đông: shareholders_structure(symbol)

df = stock.shareholders_structure('HPG')

Các công ty liên quan: shareholders_relationship(symbol)

df = stock.shareholders_relationship('HPG')

Giao dịch nội bộ: insider_trans(symbol)

df = stock.insider_trans('HPG')

Class exchange

Sàn chứng khoán Việt Nam Danh sách cổ phiếu tăng/giảm:

get_top_stock(exchange, up_down)

exchange:

  • 'HOSE'
  • 'HNX'
  • 'UPCOM'

up_down:

  • 'up'
  • 'down'
df = exchange.get_top_stock('HOSE', 'up')

Class indice

Chỉ số chứng khoán Việt Nam:

get_overview_market(indice, start, end)

indice:

  • 'VNINDEX'
  • 'VN30'
  • 'HNXINDEX'
  • 'UPINDEX'
df = indice.get_overview_market('VNINDEX', '2024-01-01', '2025-01-01')

Class other

Các chỉ số khác:

exchange_other()

df = other.exchange_other()

Class fund

Chứng chỉ quỹ đầu tư

Tổng quan danh sách các chứng chỉ quỹ: fund_market()

df = fund.fund_market()

Tăng trưởng tài sản ròng (NAV) của quỹ: get_nav_history(fund, start, end)

df = fund.get_nav_history('BMFF', '2020-01-01', '2023-01-01')

fund:

  • 'BMFF'
  • '87'

Danh mục đầu tư lớn: get_top_holding(fund)

df = fund.get_top_holding('BMFF')

Phân bổ quỹ theo tài sản nắm giữ: get_asset_holding(fund)

df = fund.get_asset_holding('BMFF')

Phân bổ quỹ theo ngành: get_industries_holding(fund)

df = fund.get_industries_holding('BMFF')

Xem ở fund_market()


Class macro_eco

Chỉ số kinh tế vĩ mô

get(indicator, time, start, end)

indicator:

  • 'GDP', 'CPI', ...
  • hoặc id: 43, 52, ...

time:

  • 'days'
  • 'months'
  • 'quarters'
  • 'years'
df = macro_eco.get('GDP', 'years', '2021', '2024')
df = macro_eco.get(43, 'quarters', '2020', '2023')

Danh sách chỉ số vĩ mô

ID Chỉ số
43 GDP
52 CPI
46 Sản xuất công nghiệp
47 Bán lẻ
48 Xuất nhập khẩu
50 FDI
51 Tín dụng
53 Lãi suất
55 Dân số và lao động

Giấy phép

Thư viện này được phát hành theo giấy phép MIT. Vui lòng xem tệp LICENSE để biết thêm chi tiết.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vnsfintech-0.0.26.tar.gz (34.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vnsfintech-0.0.26-py3-none-any.whl (32.2 kB view details)

Uploaded Python 3

File details

Details for the file vnsfintech-0.0.26.tar.gz.

File metadata

  • Download URL: vnsfintech-0.0.26.tar.gz
  • Upload date:
  • Size: 34.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for vnsfintech-0.0.26.tar.gz
Algorithm Hash digest
SHA256 4a248fedc72958f014657ad8e5c69ed723779c1862f795939122a0ae90b5d100
MD5 9feedfd6bda51db3fa1f467e1eaa7b5e
BLAKE2b-256 1c6ea8befef6a577deba81a6cc2cb24684c57c631a46ad2d20de3780effc0678

See more details on using hashes here.

File details

Details for the file vnsfintech-0.0.26-py3-none-any.whl.

File metadata

  • Download URL: vnsfintech-0.0.26-py3-none-any.whl
  • Upload date:
  • Size: 32.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for vnsfintech-0.0.26-py3-none-any.whl
Algorithm Hash digest
SHA256 38b4861d60f0d6b6485236beecd84696eeefae5e3dfadea70fe5bd81757ec630
MD5 29a2f9cb96272d856618617a8fdc633c
BLAKE2b-256 45da978058bb2de2777d88f0361817996ddffd0a9dcd1a35accaadf23872ad91

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page