A beginner-friendly Python toolkit for financial analysis and automation, targeting the Vietnamese stock market. Version 4.0.2 (as of 2026-05-09) supports Python >=3.10. Released approximately every 2-4 weeks.
pip install vnstockNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Initialize Vnstock, login, fetch historical prices for a symbol.
Change imports from `vnstock.vnstock` to `vnstock` (e.g., `from vnstock import Vnstock`).
Use `stock.login(username=..., password=...)`. Remove broker argument.
Update any code that references `df['ticker']` or `df['date']` to use `df['time']`.
Use top-level imports: `from vnstock import Analysis`.
Use `time.sleep(6)` between requests to stay under limit.
Set credentials via `os.environ` or call `login()` before accessing protected methods.
Change import to `from vnstock import Vnstock`.
Use `historical_price(symbol='ACB')` instead of `ticker='ACB'`.
Import `Analysis` directly: `from vnstock import Analysis`.
Add a delay: `time.sleep(6)` between API calls.