Registry / analytics / vnai
library2.4.8pypypiunverified

vnai (Vnstock Analytics Interface) is a Python library for Vietnamese stock market data analysis. It provides tools to fetch stock prices, financial statements, and market indices, targeting quantitative analysis and automated trading. Current version 2.4.8, release cadence monthly. Requires Python 3.10+.

pip install vnai
INSTALL
IMPORT
SIG · VNAI
V
vnai
analyticspythonv2.4.8
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Vnstock
import vnai
from vnai import Vnstock

Initialize Vnstock, fetch stock data for VNM (Vinamilk) using an API token.

from vnai import Vnstock import os stock = Vnstock() # Use API token from environment variable token = os.environ.get('VNSTOCK_API_TOKEN', 'demo_token') data = stock.fetch_stock_data('VNM', token=token) print(data.head())
Debug
Known issues
breakingVersion 2.x changed import paths. `vnai.Vnstock` replaces `vnstock.Vnstock` (v1.x).
fix
Use `from vnai import Vnstock` instead of `import vnstock`.
affects: >=2.0.0
gotchaThe library requires an API token (Vnstock API key). If omitted, many methods fail with 401.
fix
Set the token via environment variable `VNSTOCK_API_TOKEN` or pass it directly to method calls.
affects: all
deprecatedMethod `fetch_all` is deprecated since 2.3.0, will be removed in 3.0.
fix
Use `fetch_stock_data` or `fetch_market_data` with appropriate parameters.
affects: 2.3.0+
Upgrade
Version history
2.4.8latest on PyPI · released Apr 27, 2026
Audit
Dependencies
pandasrequiredData manipulation
numpyrequiredNumerical computation
requestsrequiredHTTP requests to Vnstock's API
Agent activity
33 hits · last 30 days
node
28
OpenAI (training)
1
Resources

No resource links recorded.

vnai — pip install vnai · libregistry