agentic-vnstock
A lightweight, zero-bloat library to fetch Vietnam stock market data, perfectly designed for AI Agents, LLMs, and Data Analysts.
Features (Phase 1)
- Fetch historical stock prices (OHLCV) for any ticker on HOSE, HNX, and UPCOM.
- Output clean, ready-to-use Pandas DataFrames or CSV files.
- Zero dependencies on bloated third-party charting libraries; uses only
requestsandpandas. - Built-in CLI for instant data extraction without writing Python code.
Installation
pip install agentic-vnstock
Quick CLI Usage
You can use the built-in command-line interface to quickly download stock data to a CSV file. The basic syntax is:
agentic-vnstock stock <TICKER> <START_DATE> <END_DATE>
Example: Fetch FPT stock data for the first half of 2026:
agentic-vnstock stock FPT 2026-01-01 2026-06-30
This will create a file named FPT_data.csv in your current directory containing Date, Open, High, Low, Close, and Volume.
(Note: If you are on Windows and get a "command not found" error because your Python Scripts folder isn't in your PATH, you can always run it via Python directly:)
python -m agentic_vnstock.cli stock FPT 2026-01-01 2026-06-30
Python Usage
Use it directly in your Python scripts, Jupyter Notebooks, or AI Agent tools.
from agentic_vnstock import AgenticVNStock
client = AgenticVNStock()
# Fetch historical price data for HPG from Jan 1, 2026 to Apr 21, 2026
df = client.get_historical_price("HPG", "2026-01-01", "2026-04-21")
print(df.head())
Architecture Roadmap
- Phase 1 (Current): Blazing fast data fetching from TCBS APIs (
client.py) and easy CLI export. - Phase 2 (Upcoming): Built-in AI Agents (
agents/) and Tools (tools/) optimized for LLM integrations (LangChain, LlamaIndex, OpenAI function calling).
Release files for agentic-vnstock 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| agentic_vnstock-0.1.2.tar.gz | 6.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| agentic_vnstock-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 13.8 kB
Release files / agentic_vnstock-0.1.2.tar.gz
| Download URL | agentic_vnstock-0.1.2.tar.gz |
|---|---|
| Size | 6.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
57a4228f62c3397998a05ec0226c57931f4416c41ba3dd5a23d3b894b1ff5a0c
|
|
BLAKE2b-256 checksum How to use checksums |
2760f66f4881e596a88244fd6aea5cedf1503c8b2956b28e95bcfcaa6dff5080
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Release files / agentic_vnstock-0.1.2-py3-none-any.whl
| Download URL | agentic_vnstock-0.1.2-py3-none-any.whl |
|---|---|
| Size | 7.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
53ec82786e4000c48e8d44df7c5ed8092d55f679c6ab688a9b39c531f1398069
|
|
BLAKE2b-256 checksum How to use checksums |
b171e0f7a22c396ffcba5742b67f2e72e2e37cdef27ea063171d03159f932ae9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|