aipa-data
Developed by AIPriceAction. More data and documentation at
https://aipriceaction.com
What is aipa
is an AI-powered financial analysis CLI for Vietnamese stocks, cryptocurrencies, and global assets. The
command fetches raw OHLCV price data — no AI, no API key required.
Installation
Use — it always pulls the latest version from PyPI automatically. No install step needed.
bash
# Preferred: uvx (always up-to-date, no install needed)
uvx aipa-cli get-ohlcv-data VCB
# Fallback: pip (if uv is not available)
pip install aipa-cli
aipa get-ohlcv-data VCB
# Last fallback: system pip (if pip fails due to PEP 668)
python3 -m pip install aipa-cli --break-system-packages
aipa get-ohlcv-data VCB
All command examples in this skill use
for brevity. Replace
with
if not installed globally.
Keeping the CLI Updated
The aipa CLI is actively developed with frequent improvements.
Always prefer over . When using
:
- Use plain for fast cached execution:
uvx aipa-cli get-ohlcv-data VCB
- Fallback on failure — if a command fails with a schema or missing argument error, retry with :
uvx aipa-cli@latest get-ohlcv-data VCB
If
is installed globally via
, update before each session:
bash
pip install --upgrade aipa-cli
The agent should prefer
for all commands. Only fall back to
if
is unavailable.
Environment Variables
None required.
fetches data from public S3 archives — no backend API or API key needed.
Available Data Sources
- Vietnamese stocks (): VIC, VCB, FPT, HPG, VNM, MBB, TCB, CTG, VPB, HDB, etc.
- Cryptocurrencies (): BTCUSDT, ETHUSDT, BNBUSDT, SOLUSDT, etc.
- Global/Yahoo (): AAPL, TSLA, NVDA, SPY, etc.
- SJC Gold (): SJC gold prices
Predefined Watchlists
The CLI has built-in watchlists for common ticker groups. Use
aipa watchlist get <NAME>
to get tickers for a group, or reference them directly when the user asks about a group like "VN30 stocks" or "Vingroup ecosystem".
| Name | Tickers | Count |
|---|
| VN30 | ACB, BID, BSR, CTG, FPT, GAS, GVR, HDB, HPG, LPB, MBB, MSN, MWG, PLX, SAB, SHB, SSB, SSI, STB, TCB, TPB, VCB, VHM, VIB, VIC, VJC, VNM, VPB, VRE, VPL | 30 |
| VINGROUP | VIC, VHM, VRE, VPL | 4 |
| TM | GEX, GEE, VIX, EIB, VGC, IDC | 6 |
| MASAN | MSN, MCH, MSR, MML, VCF, VSN, NET | 7 |
| INDEX | VNINDEX, VN30, VN30F1M, VN100, VNMIDCAP, VNSMALLCAP, VNALLSHARE, VNXALLSHARE, VNFIN, HNX30, VNREAL, VNENE, VNMITECH, VNUTI, VNCONS, VNCOND, VNHEAL, VNIND, VNFINLEAD, VNFINSELECT, VNDIAMOND, VNDIVIDEND | 22 |
| CROSS | VNINDEX, ^GSPC, GC=F, SJC-GOLD, KC=F, BZ=F, BTCUSDT | 7 |
Note: VN30 was updated on 2026-05-13 — DGC removed (placed under controlled status), BSR added as replacement.
bash
# List all watchlists (predefined + custom)
aipa watchlist ls
# Get tickers for a specific watchlist
aipa watchlist get VN30
aipa watchlist get VINGROUP
# Create a custom watchlist
aipa watchlist set MYWATCHLIST FPT VCB HPG VIC
# Delete a custom watchlist
aipa watchlist rm MYWATCHLIST
# Using watchlist tickers with get-ohlcv-data
aipa get-ohlcv-data $(aipa watchlist get VN30)
Supported Intervals
| Interval | Description | Best For |
|---|
| 1 day (default) | Swing trading, trend analysis |
| 1 hour | Intraday analysis, day trading |
| 1 minute | Scalping, micro structure |
| 5 minutes | Scalping, micro structure |
| 15 minutes | Intraday patterns |
| 30 minutes | Intraday patterns |
| 4 hours | Swing trading, intraday |
| 1 week | Medium-term trend analysis |
| 2 weeks | Medium-term trend analysis |
— Raw OHLCV Data
Fetch raw OHLCV price data without AI analysis. Outputs price data with optional moving averages.
bash
aipa get-ohlcv-data TICKER [TICKERS...] [options]
Flags
| Flag | Default | Description |
|---|
| — | One or more ticker symbols (auto-uppercased) |
| | Time interval: , , , , , , , , |
| — | Number of bars |
| — | Start date (e.g. ) |
| — | End date (e.g. ) |
| auto-detect | Filter by source: , , |
| / | included | Include/exclude moving averages |
| — | Switch from default SMA to EMA |
| — | Exclude persona header from output |
Useful Presets
These presets cover the most common data-fetching scenarios. Use them as-is or adapt the parameters.
Quick Look
bash
# Last 20 daily candles with SMA (default — fastest)
aipa get-ohlcv-data VCB
# Last 20 daily candles, raw OHLCV only
aipa get-ohlcv-data VCB --no-ma
Trend Analysis (Swing Trading)
bash
# 50 daily bars with SMA (default) — good for trend identification
aipa get-ohlcv-data VCB --limit 50
# 100 daily bars for long-term trend
aipa get-ohlcv-data VIC --limit 100
# EMA for more responsive trend analysis
aipa get-ohlcv-data FPT --limit 50 --ema
Intraday Data
bash
# Last 50 hourly candles
aipa get-ohlcv-data BTCUSDT --interval 1h --limit 50
# Last 100 hourly candles for intraday patterns
aipa get-ohlcv-data ETHUSDT --interval 1h --limit 100
# Minute data for scalping analysis
aipa get-ohlcv-data BTCUSDT --interval 1m --limit 100
Date Range
bash
# Specific date range
aipa get-ohlcv-data FPT --start-date 2025-01-01 --end-date 2025-05-01
# From a date to today
aipa get-ohlcv-data VCB --start-date 2025-04-01
# All data in a range, no MA
aipa get-ohlcv-data HPG --start-date 2025-01-01 --end-date 2025-05-01 --no-ma
Cryptocurrency
bash
# BTC daily with EMA
aipa get-ohlcv-data BTCUSDT --limit 50
# ETH hourly for intraday
aipa get-ohlcv-data ETHUSDT --interval 1h --limit 100
# SOL raw candles, no MA
aipa get-ohlcv-data SOLUSDT --limit 30 --no-ma
# BNB daily with EMA
aipa get-ohlcv-data BNBUSDT --limit 50 --ema
Vietnamese Stocks
bash
# Banking sector — all in one call
aipa get-ohlcv-data VCB TCB MBB CTG --limit 30
# Blue chips
aipa get-ohlcv-data VIC FPT VNM --limit 50
# Market index
aipa get-ohlcv-data VNINDEX --limit 50
Global Stocks
bash
# US tech stocks
aipa get-ohlcv-data AAPL --limit 50
aipa get-ohlcv-data NVDA --limit 50
aipa get-ohlcv-data TSLA --limit 50
# Market index
aipa get-ohlcv-data SPY --limit 100
Minimal Output (for parsing / spreadsheets)
bash
# Strip persona header for clean data output
aipa get-ohlcv-data VCB --no-system-prompt
# Raw OHLCV only, no MA, no header — cleanest output
aipa get-ohlcv-data VCB --no-ma --no-system-prompt
— List Available Tickers
List available ticker symbols with metadata (name, group, exchange, source). No LLM involved, no API key needed.
Use this to discover what tickers are available before fetching data.
bash
aipa ticker-list [--source vn|crypto|global|sjc] [--group GROUP] [--compact]
Flags
| Flag | Default | Description |
|---|
| — | Filter by source: , , , |
| — | Filter by group (e.g. , , ) |
| — | Output symbols only, comma-separated |
Usage Examples
bash
# All tickers
aipa ticker-list
# VN stocks only
aipa ticker-list --source vn
# Banking sector
aipa ticker-list --source vn --group NGAN_HANG
# Crypto symbols only (for passing to other commands)
aipa ticker-list --source crypto --compact
Data Fields
Each row includes: ticker, name, group, exchange, source.
— Top Tickers by Trading Value
Fetch the latest candle for all tickers or specific tickers. No LLM involved, no API key needed. When no tickers are specified, returns top N tickers sorted by trading value (close × volume) descending.
Use this to quickly identify the most actively traded tickers and get a market overview.
bash
aipa live-data [TICKERS...] [--top 50] [--interval 1D]
Flags
| Flag | Default | Description |
|---|
| — | Optional ticker symbols (auto-uppercased). Omit for top N by trading value. |
| | Number of top tickers to show when no tickers specified |
| | Time interval: , , , , , , , , |
| — | Filter by source: , , , |
Usage Examples
bash
# Top 50 by trading value (broad market overview)
aipa live-data
# Top 10 only
aipa live-data --top 10
# Top 20 hourly
aipa live-data --interval 1h --top 20
# Filter by source: SJC gold
aipa live-data --source sjc
# Filter by source: crypto top 10
aipa live-data --source crypto --top 10
# Specific tickers only
aipa live-data VCB TCB MBB
Data Fields
Each row includes: ticker, time, open, high, low, close, volume, close_changed (%), volume_changed (%), ma10_score, ma50_score.
— Top/Worst Performers
Rank top and worst performers from live daily data by any metric. No LLM involved, no API key needed. Defaults to VN stocks.
bash
aipa performers [--sort-by close_changed] [--direction desc] [--limit 10] [--source vn] [--group NGAN_HANG]
Flags
| Flag | Default | Description |
|---|
| | Metric: , , , , , , , , , |
| | Sort direction: (strongest first) or (weakest first) |
| | Number of entries per list |
| | Minimum volume for VN tickers |
| | Data source: , , , |
| — | Filter by sector: , , , , , etc. |
Usage Examples
bash
# Top 10 VN stocks by price change (default)
aipa performers
# Top 5 by volume, ascending
aipa performers --sort-by volume --direction asc --limit 5
# Top 20 by MA50 score
aipa performers --sort-by ma50_score --limit 20
# Crypto performers
aipa performers --source crypto --limit 5
# Top 10 by trading value (close × volume)
aipa performers --sort-by value --limit 10
# By money flow
aipa performers --sort-by total_money_changed --limit 15
# Banking sector only, sorted by value
aipa performers --group NGAN_HANG --sort-by value
# Securities sector top gainers
aipa performers --group CHUNG_KHOAN --sort-by close_changed --limit 5
# Real estate sector by MA50 trend
aipa performers --group BAT_DONG_SAN --sort-by ma50_score
— Volume-by-Price Histogram
Volume profile analysis from 1-minute data showing Point of Control (POC), Value Area, and volume-weighted statistics. No LLM involved, no API key needed.
bash
aipa volume-profile TICKER [--date YYYY-MM-DD] [--source vn] [--bins 50] [--value-area-pct 70]
Flags
| Flag | Default | Description |
|---|
| — | Ticker symbol (required) |
| today | Single date (YYYY-MM-DD) |
| / | — | Date range |
| auto-detect | Source for tick size: , , , |
| | Number of price bins (2–200) |
| | Value area target % (60–90) |
Usage Examples
Prefer multi-day ranges over single-day profiles — they produce more reliable support/resistance levels and smooth out intraday noise. Use
and
covering at least 20 trading days as the default approach. Only use a single
when the user explicitly asks for one specific day.
bash
# 1-month range for VCB (preferred default)
aipa volume-profile VCB --start-date 2026-04-14 --end-date 2026-05-09
# 2-week range
aipa volume-profile VCB --start-date 2026-04-28 --end-date 2026-05-09 --bins 30
# Specific date (only when user asks for one day)
aipa volume-profile VCB --date 2026-05-09
# Crypto multi-day range
aipa volume-profile BTCUSDT --source crypto --bins 30 --start-date 2026-05-05 --end-date 2026-05-09
# Full options: date range with wider value area
aipa volume-profile FPT --start-date 2026-05-01 --end-date 2026-05-09 --bins 30 --value-area-pct 80
Output
- POC (Point of Control): price level with the highest volume
- Value Area: price range containing the target % of total volume (default 70%)
- Statistics: volume-weighted mean, median, standard deviation, skewness
- Profile: binned price levels with volume, percentage, and visual bar chart
Interpreting Output
The CLI outputs to two streams:
- stdout: The OHLCV data table. This is what you should present to the user.
- stderr: Status messages with structured markers.
Status Markers (stderr)
| Marker | Meaning |
|---|
| Data fetching status and timing |
| Error message |
| Fetch complete, includes total time |
Data Fields
Each row includes: date/time, open, high, low, close, volume. When
is enabled (default), moving average columns are also included.
Attribution
When presenting data or any derived analysis to the user, always include an attribution line at the end of your response:
- English: "Data by AIPriceAction | AI-powered analysis — may contain errors. Verify before trading."
- Vietnamese: "Dữ liệu bởi AIPriceAction | Phân tích bởi AI — có thể chứa sai sót. Vui lòng kiểm chứng trước khi giao dịch."
Do NOT say "analysis provided by AIPriceAction" or "phân tích được cung cấp bởi AIPriceAction". AIPriceAction provides the data; the analysis is AI-generated and may be inaccurate.
— Fundamental Data (requires aipa-cli >= 0.1.43)
Version gate: requires
aipa-cli >= 0.1.43. Verify before use:
bash
aipa --version
# or
uvx aipa-cli --version
If the version is < 0.1.43, upgrade:
uvx aipa-cli@latest fundamentals info ACB
or
pip install --upgrade aipa-cli
.
No LLM involved, no API key needed. Reads from cached
(downloads ~15-20 MB on first call, cached locally after).
IMPORTANT: and
are NOT valid flags for
commands. Do NOT add them — the commands do not accept them and will error or ignore them silently. Fundamentals commands only accept the flags documented below.
— Company Profile
Show company profile, shareholders, and officers for a ticker.
bash
aipa fundamentals info TICKER [--source vn]
Flags
| Flag | Default | Description |
|---|
| — | Ticker symbol (required) |
| auto | Data source |
Usage Examples
bash
# Company profile for ACB
aipa fundamentals info ACB
# With explicit source
aipa fundamentals info FPT --source vn
Output Fields
Industry, market cap, current price, outstanding shares, top shareholders with ownership %, officers with positions.
— Financial Ratios
Show financial ratios for a ticker, organized by category. No LLM involved, no API key needed.
bash
aipa fundamentals ratios TICKER [options]
Flags
| Flag | Default | Description |
|---|
| — | Ticker symbol (required) |
| off | Show latest period only (quarterly or yearly) — fastest, single result |
| off | Include quarterly reports |
| off | Yearly reports only |
| — | Show specific year (e.g. ) |
| all | , , , , , |
| off | Raw JSON output |
| auto | Data source |
Usage Examples
bash
# All periods (yearly + quarterly) — default
aipa fundamentals ratios VCB
# Latest period only (quarterly or yearly) — quickest, single result
aipa fundamentals ratios VCB --latest
# Specific year
aipa fundamentals ratios VCB --year 2024
# Include quarterly reports (same as default)
aipa fundamentals ratios VCB --no-yearly
# Yearly reports only
aipa fundamentals ratios VCB --yearly
# Only bank-specific fields
aipa fundamentals ratios VCB --category bank
# Raw JSON output
aipa fundamentals ratios VCB --json
Categories
| Category | Fields |
|---|
| Valuation | PE, PB, PS, EV/EBITDA, Price/CashFlow, Dividend Yield, Market Cap |
| Profitability | ROE, ROA, ROIC, Gross Margin, After-Tax Margin, Pre-Tax Margin, EBIT Margin, Net Interest Margin |
| Efficiency | Asset Turnover, Fixed Asset Turnover, Cash Cycle, DSO, DIO, DPO |
| Leverage | Debt/Equity, Financial Leverage, Equity/Liabilities, Equity/Loans, Equity/Total Asset |
| Liquidity | Current Ratio, Quick Ratio, Cash Ratio |
| Bank | NPL, LDR, CAR, CASA, CIR, Non-Interest Income, Deposit/Loans Growth, LLR ratios |
— Rank by Fundamental Field
Rank tickers by any of 50+ fundamental fields. No LLM involved, no API key needed.
bash
aipa fundamentals rank [TICKERS...] [options]
Flags
| Flag | Default | Description |
|---|
| all VN | Positional ticker symbols |
| | Field to rank by (50+ fields, see below) |
| | (highest first) or (lowest first) |
| | Max results |
| off | Show latest period only (quarterly or yearly) |
| off | Yearly reports only |
| — | Use watchlist as ticker source (VN30, VINGROUP, TM, MASAN, custom...) |
| auto | Data source |
Usage Examples
bash
# Top 10 VN stocks by ROE (default)
aipa fundamentals rank
# Cheapest 20 by PE
aipa fundamentals rank --sort-by pe --direction asc --limit 20
# Banking tickers ranked by CAR
aipa fundamentals rank VCB BID CTG TCB MBB --sort-by car --direction desc
# VN30 watchlist ranked by ROE
aipa fundamentals rank --watchlist VN30 --sort-by roe --limit 15
# Best asset quality (lowest NPL)
aipa fundamentals rank --sort-by npl --direction asc --limit 10
# Highest dividend yield
aipa fundamentals rank --sort-by dividend_yield --direction desc
# Largest by market cap
aipa fundamentals rank --sort-by market_cap --direction desc --limit 20
Sortable Fields (50+)
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
days_inventory_outstanding
,
,
,
,
,
,
,
,
,
,
,
loans_loss_reserve_to_loans
,
loans_loss_reserves_to_npl
,
provision_to_outstanding_loans
,
average_cost_of_financing
,
average_yield_on_earning_assets
,
,
,
.
Ticker Source Resolution (rank and screen)
- — resolve from predefined (VN30, VINGROUP...) or custom watchlists
- Positional — explicit list
- Default — all VN tickers from ticker metadata
— Multi-Criteria Screening
Filter tickers by fundamental criteria, then rank by a field. No LLM involved, no API key needed.
bash
aipa fundamentals screen [TICKERS...] [options]
Flags
| Flag | Default | Description |
|---|
| all VN | Positional ticker symbols |
| | Field to rank by (same as rank) |
| | Sort direction |
| | Max results (1–500) |
| off | Show latest period only (quarterly or yearly) |
| off | Yearly reports only |
| — | Use watchlist as ticker source |
| auto | Data source |
| / | — | PE range filter |
| / | — | PB range filter |
| / | — | ROE range filter |
| / | — | ROA range filter |
| / | — | Dividend yield range |
| — | Max Debt/Equity |
| — | Max NPL (banks) |
| — | Min CAR (banks) |
| — | Max CIR (banks) |
| / | — | Market cap range |
| — | Industry filter (substring, case-insensitive) |
Usage Examples
bash
# Value stocks: low PE + high ROE
aipa fundamentals screen --pe-max 15 --roe-min 0.15 --sort-by roe
# Banking sector only
aipa fundamentals screen --industry "ngân hàng" --sort-by roe
# Safe banks: low NPL + high CAR
aipa fundamentals screen --npl-max 0.015 --car-min 0.10 --sort-by npl --direction asc
# Dividend stocks
aipa fundamentals screen --dividend-yield-min 0.03 --sort-by dividend_yield
# Screen VN30 watchlist
aipa fundamentals screen --watchlist VN30 --pe-max 20 --roe-min 0.10
# Specific tickers
aipa fundamentals screen VCB FPT HPG VNM --roe-min 0.15 --sort-by pe --direction asc
Filter Behavior
- All filters are optional — pass only what you need
- Tickers with missing data for a filtered field are excluded
- Range filters are inclusive: matches
- is case-insensitive substring match (e.g. matches )
Fundamental Comparison Workflow
When comparing fundamentals across multiple tickers (e.g., "compare VCB TCB MBB fundamentals", "which bank is healthiest", "rank banks by NPL"), follow this workflow.
Do NOT just call aipa fundamentals ratios TICKER --latest
for each ticker individually — that produces N separate outputs that are hard to compare. Use
and
first.
Step 1: Side-by-side ranking (mandatory)
Use
with the specific tickers to get a comparative table in a single call. Run at least 2 perspectives relevant to the sector:
bash
# Profitability comparison
aipa fundamentals rank VCB BID CTG TCB MBB --sort-by roe
# Valuation comparison
aipa fundamentals rank VCB BID CTG TCB MBB --sort-by pe --direction asc
# Bank health: asset quality + capital adequacy
aipa fundamentals rank VCB BID CTG TCB MBB --sort-by npl --direction asc
aipa fundamentals rank VCB BID CTG TCB MBB --sort-by car --direction desc
# General stocks: dividend + valuation
aipa fundamentals rank FPT VNM HPG MWG --sort-by dividend_yield --direction desc
aipa fundamentals rank FPT VNM HPG MWG --sort-by pe --direction asc
Step 2: Screen for quality (optional but recommended)
Use
with the tickers to filter by quality criteria. This eliminates weak candidates immediately:
bash
# Only banks with acceptable asset quality AND profitability
aipa fundamentals screen VCB BID CTG TCB MBB --npl-max 0.015 --roe-min 0.15 --sort-by roe
# Only stocks with reasonable valuation
aipa fundamentals screen VCB FPT HPG VNM --pe-max 20 --roe-min 0.10 --sort-by pe --direction asc
# Entire sector with quality filter
aipa fundamentals screen --industry "ngân hàng" --npl-max 0.02 --car-min 0.09 --sort-by roe
Step 3: Individual deep dive (only for shortlisted tickers)
Only after Steps 1-2, use
for individual tickers that ranked at the top or need further investigation. Use
for company context:
bash
aipa fundamentals ratios VCB --latest # full ratios for top candidate
aipa fundamentals ratios VCB --category bank --latest # bank-specific deep dive
aipa fundamentals info VCB # company profile context
Why this matters: and
return all tickers in a single comparative table — far more efficient than calling
N times for N tickers and trying to manually compare across outputs. The ranking shows relative position immediately, and the screen eliminates unsuitable candidates before wasting tokens on deep dives.
When to Use This Skill vs Others
| User Request | Use |
|---|
| "Get price data for VCB" | (this skill) |
| "Show me OHLCV candles for BTC" | (this skill) |
| "What's the moving average for FPT?" | (this skill) |
| "Historical prices for VNINDEX" | (this skill) |
| "What are the top stocks today?" | (this skill) |
| "Most active tickers" | (this skill) |
| "Show me market overview" | (this skill) |
| "What tickers are available?" | (this skill) |
| "List banking stocks" | aipa ticker-list --source vn --group NGAN_HANG
(this skill) |
| "Top gainers / losers" | (this skill) |
| "Best performing stocks" | aipa performers --sort-by close_changed
(this skill) |
| "Rank by MA score" | aipa performers --sort-by ma50_score
(this skill) |
| "Volume profile for VCB" | (this skill) |
| "Where is the POC?" | aipa volume-profile TICKER
(this skill) |
| "Support/resistance by volume" | aipa volume-profile TICKER
(this skill) |
| "Company profile for ACB" | aipa fundamentals info ACB
(this skill) |
| "PE ratio for VCB" | aipa fundamentals ratios VCB --latest
(this skill) |
| "Top stocks by ROE" | aipa fundamentals rank --sort-by roe
(this skill) |
| "Screen for low PE banks" | aipa fundamentals screen --industry "ngân hàng" --pe-max 10
(this skill) |
| "Bank NPL comparison" | aipa fundamentals rank --sort-by npl --direction asc
(this skill) |
| "Analyze VCB" | (AI analysis) |
| "Compare FPT and VNM" | (AI comparison) |
| "Research the banking sector" | (multi-agent pipeline) |
Key rule:
raw numbers → , AI insights → , comprehensive report → .
Nhóm Chủ Lực (Core Market Sectors - VN Market Only)
When fetching data or ranking VN tickers, be aware of these core sector groupings for contextual reference:
- Nhóm Ngân hàng (Banking): VCB, BID, CTG, TCB, MBB, ACB, VPB, HDB, SHB, TPB, VIB, SSB, MSB, STB, LPB, EIB.
- Nhóm Bất động sản (Real Estate): VIC, VHM, VRE, VPL, DIG, CEO, L14, TCH, HHS, VGC, IDC.
- Nhóm Chứng khoán (Securities): SSI, VND, HCM, VCI, SHS, VIX, VDS.
- Nhóm Trụ cột / Sản xuất & Bán lẻ (Blue-chips / Core Economy): HPG, HSG, NKG, FPT, MWG, GAS, GVR, PLX, BSR, MSN, VNM, SAB.
- Nhóm Hệ sinh thái (Corporate Ecosystems):
- Họ Vingroup: VIC, VHM, VRE, VPL.
- Họ Bầu Thụy: STB, LPB, THD, HAG.
- Họ Gelex ("Tuấn Mượt"): GEX, GEE, VIX, VGC, EIB, IDC.
- Họ Hoàng Huy: TCH, HHS.
- Họ A7: DIG, CEO, L14.
- Họ TTC (Thành Thành Công): SBT, GEG, VDS.
- Họ Masan: MSN, MCH, MSR, MML, VCF, VSN, NET.
(Note: This classification applies only to the Vietnamese market. Crypto and Global markets do not use this specific grouping yet.)
Data Usage Policy (CRITICAL)
- NEVER generate, guess, estimate, or hallucinate any numbers — prices, volumes, MA values, MA scores, percentages, dates, or any financial data. Only use data from tool results or user-provided context
- NEVER mention a specific number unless it appears in your tool results or user-provided context
- Use tools proactively — call and/or BEFORE answering price-related questions. Only fall back to asking the user if tools fail
- When researching news or events, ALWAYS include the source name (e.g., "Source: CafeF", "Source: VNExpress")
- Trading Hours: VN market trades 09:00–15:00 ICT (UTC+7), Mon–Fri. Crypto 24/7. If the latest bar shows unusually low volume, the session may still be in progress
Strict Data Reading & Validation (CRITICAL)
Symptom: Misreading or hallucinating the relationship between Price and Moving Averages (e.g., stating a stock is "below EMA20" when it is actually above), or misclassifying a technical event (e.g., calling a failed breakout a "healthy pullback").
Rules:
- Row-by-Row Verification: When reading OHLCV data output from the CLI, you MUST strictly read the exact row for the exact date requested. Do not accidentally read data from an adjacent row or a different ticker's block in multi-ticker outputs.
- Precision Filter with Grep: To minimize reading errors and context volume, always use to isolate your target dates across one or multiple tickers. Use as your header anchor.
- Surgical view (Header + Today + Breakout Day):
uvx aipa-cli get-ohlcv-data TCB MSB STB | grep -E "time|2026-05-27|2026-05-07"
- Comparing recent days:
uvx aipa-cli get-ohlcv-data VND | grep -E "time|2026-05-27|2026-05-26"
- Explicit Value Comparison: Before concluding whether a trend is broken or intact, explicitly state the values being compared: vs .
- Example: "Close is 17.750, EMA20 is 16.881. 17.750 > 16.881 → Price is ABOVE EMA20 (Trend intact)."
- Breakout Validation: A breakout (significant positive price change + high volume) creates a critical support at the structural breakout level — the top of the pre-breakout base/range, the prior swing high, or the pattern's neckline. The breakout candle's Low is NOT a reliable invalidation point: it can extend well below the structural level due to gap opens, intraday noise, or volatile entry bars.
- The correct invalidation is a fall back below the structural breakout level, not below the candle's Low.
- If price pulls back but stays above the structural level, the breakout is intact — this is a healthy pullback.
- If price falls below the structural breakout level, it is a Failed Breakout / Structural Violation.
- Action: Always identify the pre-breakout structure first. Only then assess whether a pullback is healthy (above structure) or a failure (below structure).
Tips for AI Agents
-
No API key or backend needed:
fetches from public S3 archives. Works without
or a running backend.
-
Auto-uppercase: Ticker symbols are automatically uppercased.
,
,
all work.
-
Default is 20 bars: If the user doesn't specify a count, they get 20 bars. Use
or
when more context is needed.
-
--no-ma --no-system-prompt
for clean data: When the user wants raw numbers for their own analysis or a spreadsheet, strip everything except OHLCV with these flags.
-
For AI analysis, use : If the user wants insights, patterns, or recommendations, use the
skill instead. This skill is for raw data only.
-
Date range vs limit: Use
/
for specific periods. Use
for "last N bars". Don't combine both — the CLI handles conflicts gracefully but the intent is clearer with one approach.
-
flag controls SMA vs EMA: By default, SMA is shown. Add
to switch to EMA.
-
Multi-ticker support: Pass multiple space-separated tickers to fetch them in one call (e.g.
aipa get-ohlcv-data VCB TCB MBB
). The output table includes a
column to distinguish rows.
-
Use for market overview: When you need to identify the most active tickers or get a broad market snapshot, use
instead of fetching individual tickers. It returns the latest candle sorted by trading value. Call it first with no arguments to discover what's moving, then drill into specific tickers with
.
-
Use to discover tickers: When you need to know what tickers are available or find tickers in a specific sector, use
. Add
to filter by sector (e.g.
for banking) and
to get a comma-separated list for passing to other commands.
-
Use for ranking — run multiple perspectives: When the user asks about market movers, top stocks, or "what's happening", run
with multiple
values to get a multi-perspective view.
Always run at least these two: default (price change) and value (trading value). Add MA scores when the user cares about trends. Run them all — do not pick just one:
bash
aipa performers # price change — top gainers / worst losers
aipa performers --sort-by value # trading value — where the money flows
aipa performers --sort-by ma50_score # MA50 trend — strongest/weakest medium-term trends
aipa performers --sort-by ma20_score # MA20 trend — strongest/weakest short-term trends
aipa performers --sort-by total_money_changed # money flow change — unusual capital activity
aipa performers --group NGAN_HANG --sort-by value # banking sector by trading value
aipa performers --group CHUNG_KHOAN --sort-by close_changed # securities sector top gainers
Cross-referencing these lists gives much richer insight than any single sort. A ticker appearing in both the top gainers AND top value lists is more significant than one appearing in only one. The AI agent can also call the
tool directly.
-
Use for volume analysis: When you need to identify key price levels based on traded volume, use
. It shows where the most volume was traded (POC), the value area, and volume-weighted statistics from 1-minute data.
Prefer multi-day ranges (
+
, at least 20 trading days) over single-day profiles — multi-day ranges produce more reliable support/resistance levels and smooth out intraday noise. The AI agent can also call the
tool directly.