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.1.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.1-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: agentic_vnstock-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 97c0536bf6ca737380f990eb98ff46bf401d851e8d33d2a330b77e0b79bd1fae
MD5 d217a9bf66791c1fcbf6e95c3a2e6ab7
BLAKE2b-256 6c2e4b3a846b731a9799db69070a96cc222c28d998864b38a6eac6d4ae816ea5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for agentic_vnstock-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f961e1955e42cb5781f9ca1d7b4cddda0f45048d5c610ebaa866217841cc4548
MD5 e90391cebfa4abf8b0e2e5445c4fc681
BLAKE2b-256 bb1a8f753092246894ae10df3431100edf573e3f3b6982f36beeb0b903f6f92c

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