Skip to main content

A lightweight, agentic-ready library to fetch Vietnam stock market data.

Project description

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 requests and pandas.
  • 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).

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

agentic_vnstock-0.1.2.tar.gz (6.8 kB view details)

Uploaded Source

Built Distribution

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

agentic_vnstock-0.1.2-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

Details for the file agentic_vnstock-0.1.2.tar.gz.

File metadata

  • Download URL: agentic_vnstock-0.1.2.tar.gz
  • Upload date:
  • Size: 6.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for agentic_vnstock-0.1.2.tar.gz
Algorithm Hash digest
SHA256 57a4228f62c3397998a05ec0226c57931f4416c41ba3dd5a23d3b894b1ff5a0c
MD5 d5f83712aef8c5e912f88bef3454b857
BLAKE2b-256 2760f66f4881e596a88244fd6aea5cedf1503c8b2956b28e95bcfcaa6dff5080

See more details on using hashes here.

File details

Details for the file agentic_vnstock-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for agentic_vnstock-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 53ec82786e4000c48e8d44df7c5ed8092d55f679c6ab688a9b39c531f1398069
MD5 68809179d947ea0fd164bd065e420c2c
BLAKE2b-256 b171e0f7a22c396ffcba5742b67f2e72e2e37cdef27ea063171d03159f932ae9

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