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)
df = stock.demand_history('HPG', time='days', start='2020-01-01', end='2023-01-01')
time:
'days''months''quarters''years'
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)
df = exchange.get_top_stock('HOSE', 'up')
exchange:
'HOSE''HNX''UPCOM'
up_down:
'up''down'
Class indice
Chỉ số chứng khoán Việt Nam
get_overview_market(indice, start, end)
df = indice.get_overview_market('VNINDEX', '2024-01-01', '2025-01-01')
indice:
'VNINDEX''VN30''HNXINDEX''UPINDEX'
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')
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')
fund:
'BMFF''87'Xem ở fund_market()
Class macro_eco
Chỉ số kinh tế vĩ mô
get(indicator, time, start, end)
df = macro_eco.get('GDP', 'years', '2021', '2024')
df = macro_eco.get(43, 'quarters', '2020', '2023')
indicator:
'GDP','CPI', ...- hoặc id:
43,52, ...
time:
'days''months''quarters''years'
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vnsfintech-0.0.25.tar.gz.
File metadata
- Download URL: vnsfintech-0.0.25.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
88a37a15036afd2c7a6868863a8043d63654fb23c2ac6bcef4a24d72b49c0744
|
|
| MD5 |
8a90a5a30638a3a48809f7efca4913e8
|
|
| BLAKE2b-256 |
80c806a945d658ad26b61717ac3037a7d92f8ee3e0724fa530291589966d76f3
|
File details
Details for the file vnsfintech-0.0.25-py3-none-any.whl.
File metadata
- Download URL: vnsfintech-0.0.25-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c9ce662e76fc98b3737b1af3210e7663d26f395c70f0c4fdd8898305df2f6091
|
|
| MD5 |
f7ab6448b7be1d3467c60924268b6bad
|
|
| BLAKE2b-256 |
ce897e95154a3914720e3b829fc3e63bde943f4d99f3eb268e3d60df190d240f
|