aipa-data

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

aipa-data

aipa-data

Developed by AIPriceAction. More data and documentation at https://aipriceaction.com
由AIPriceAction开发。更多数据和文档请访问https://aipriceaction.com

What is aipa

什么是aipa

aipa
is an AI-powered financial analysis CLI for Vietnamese stocks, cryptocurrencies, and global assets. The
get-ohlcv-data
command fetches raw OHLCV price data — no AI, no API key required.
aipa
是一款面向越南股票、加密货币及全球资产的AI驱动型金融分析CLI工具。
get-ohlcv-data
命令可获取原始OHLCV价格数据——无需AI,也无需API密钥。

Installation

安装

Use
uvx
— it always pulls the latest version from PyPI automatically. No install step needed.
bash
undefined
推荐使用
uvx
——它会自动从PyPI拉取最新版本,无需安装步骤。
bash
undefined

Preferred: uvx (always up-to-date, no install needed)

推荐方式:uvx(始终保持最新,无需安装)

uvx aipa-cli get-ohlcv-data VCB
uvx aipa-cli get-ohlcv-data VCB

Fallback: pip (if uv is not available)

备选方式:pip(若uv不可用)

pip install aipa-cli aipa get-ohlcv-data VCB
pip install aipa-cli aipa get-ohlcv-data VCB

Last fallback: system pip (if pip fails due to PEP 668)

最后备选:系统pip(若pip因PEP 668安装失败)

python3 -m pip install aipa-cli --break-system-packages aipa get-ohlcv-data VCB

All command examples in this skill use `aipa` for brevity. Replace `aipa` with `uvx aipa-cli` if not installed globally.
python3 -m pip install aipa-cli --break-system-packages aipa get-ohlcv-data VCB

本技能中的所有命令示例为简洁起见均使用`aipa`。若未全局安装,请将`aipa`替换为`uvx aipa-cli`。

Keeping the CLI Updated

保持CLI更新

The aipa CLI is actively developed with frequent improvements. Always prefer
uvx aipa-cli
over
aipa
. When using
uvx
:
  1. Use plain
    uvx
    for fast cached execution:
    uvx aipa-cli get-ohlcv-data VCB
  2. Fallback on failure — if a command fails with a schema or missing argument error, retry with
    @latest
    :
    uvx aipa-cli@latest get-ohlcv-data VCB
If
aipa
is installed globally via
pip
, update before each session:
bash
pip install --upgrade aipa-cli
The agent should prefer
uvx aipa-cli
for all commands. Only fall back to
aipa
if
uvx
is unavailable.
aipa CLI处于活跃开发状态,会频繁迭代优化。优先使用
uvx aipa-cli
而非
aipa
。使用
uvx
时:
  1. 使用纯
    uvx
    实现快速缓存执行:
    uvx aipa-cli get-ohlcv-data VCB
  2. 执行失败时的备选方案——若命令因架构或参数缺失报错,添加
    @latest
    重试:
    uvx aipa-cli@latest get-ohlcv-data VCB
若通过
pip
全局安装了
aipa
,请在每次使用前更新:
bash
pip install --upgrade aipa-cli
Agent应优先为所有命令使用
uvx aipa-cli
。仅当
uvx
不可用时,才使用
aipa
作为备选。

Environment Variables

环境变量

None required.
get-ohlcv-data
fetches data from public S3 archives — no backend API or API key needed.
无需配置环境变量。
get-ohlcv-data
从公开S3归档获取数据——无需后端API或API密钥。

Available Data Sources

可用数据源

  • Vietnamese stocks (
    source: vn
    ): VIC, VCB, FPT, HPG, VNM, MBB, TCB, CTG, VPB, HDB, etc.
  • Cryptocurrencies (
    source: crypto
    ): BTCUSDT, ETHUSDT, BNBUSDT, SOLUSDT, etc.
  • Global/Yahoo (
    source: global/yahoo
    ): AAPL, TSLA, NVDA, SPY, etc.
  • SJC Gold (
    source: sjc
    ): SJC gold prices
  • 越南股票
    source: vn
    ):VIC、VCB、FPT、HPG、VNM、MBB、TCB、CTG、VPB、HDB等
  • 加密货币
    source: crypto
    ):BTCUSDT、ETHUSDT、BNBUSDT、SOLUSDT等
  • 全球/Yahoo
    source: global/yahoo
    ):AAPL、TSLA、NVDA、SPY等
  • SJC黄金
    source: sjc
    ):SJC黄金价格

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".
NameTickersCount
VN30ACB, 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, VPL30
VINGROUPVIC, VHM, VRE, VPL4
TMGEX, GEE, VIX, EIB, VGC, IDC6
MASANMSN, MCH, MSR, MML, VCF, VSN, NET7
INDEXVNINDEX, VN30, VN30F1M, VN100, VNMIDCAP, VNSMALLCAP, VNALLSHARE, VNXALLSHARE, VNFIN, HNX30, VNREAL, VNENE, VNMITECH, VNUTI, VNCONS, VNCOND, VNHEAL, VNIND, VNFINLEAD, VNFINSELECT, VNDIAMOND, VNDIVIDEND22
CROSSVNINDEX, ^GSPC, GC=F, SJC-GOLD, KC=F, BZ=F, BTCUSDT7
Note: VN30 was updated on 2026-05-13 — DGC removed (placed under controlled status), BSR added as replacement.
bash
undefined
CLI内置了针对常见标的组的观察列表。使用
aipa watchlist get <NAME>
获取组内标的,或当用户询问如"VN30股票"、"Vingroup生态链"等组时直接引用。
名称标的数量
VN30ACB, 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, VPL30
VINGROUPVIC, VHM, VRE, VPL4
TMGEX, GEE, VIX, EIB, VGC, IDC6
MASANMSN, MCH, MSR, MML, VCF, VSN, NET7
INDEXVNINDEX, VN30, VN30F1M, VN100, VNMIDCAP, VNSMALLCAP, VNALLSHARE, VNXALLSHARE, VNFIN, HNX30, VNREAL, VNENE, VNMITECH, VNUTI, VNCONS, VNCOND, VNHEAL, VNIND, VNFINLEAD, VNFINSELECT, VNDIAMOND, VNDIVIDEND22
CROSSVNINDEX, ^GSPC, GC=F, SJC-GOLD, KC=F, BZ=F, BTCUSDT7
注:VN30于2026-05-13更新——移除DGC(进入管控状态),新增BSR作为替代。
bash
undefined

List all watchlists (predefined + custom)

列出所有观察列表(预设+自定义)

aipa watchlist ls
aipa watchlist ls

Get tickers for a specific watchlist

获取特定观察列表的标的

aipa watchlist get VN30 aipa watchlist get VINGROUP
aipa watchlist get VN30 aipa watchlist get VINGROUP

Create a custom watchlist

创建自定义观察列表

aipa watchlist set MYWATCHLIST FPT VCB HPG VIC
aipa watchlist set MYWATCHLIST FPT VCB HPG VIC

Delete a custom watchlist

删除自定义观察列表

aipa watchlist rm MYWATCHLIST
aipa watchlist rm MYWATCHLIST

Using watchlist tickers with get-ohlcv-data

将观察列表标的用于get-ohlcv-data

aipa get-ohlcv-data $(aipa watchlist get VN30)
undefined
aipa get-ohlcv-data $(aipa watchlist get VN30)
undefined

Supported Intervals

支持的时间周期

IntervalDescriptionBest For
1D
1 day (default)Swing trading, trend analysis
1h
1 hourIntraday analysis, day trading
1m
1 minuteScalping, micro structure
5m
5 minutesScalping, micro structure
15m
15 minutesIntraday patterns
30m
30 minutesIntraday patterns
4h
4 hoursSwing trading, intraday
1W
1 weekMedium-term trend analysis
2W
2 weeksMedium-term trend analysis

周期说明适用场景
1D
1天(默认)波段交易、趋势分析
1h
1小时日内分析、日内交易
1m
1分钟scalp交易、微观结构分析
5m
5分钟scalp交易、微观结构分析
15m
15分钟日内形态分析
30m
30分钟日内形态分析
4h
4小时波段交易、日内交易
1W
1周中期趋势分析
2W
2周中期趋势分析

aipa get-ohlcv-data
— Raw OHLCV Data

aipa get-ohlcv-data
—— 原始OHLCV数据

Fetch raw OHLCV price data without AI analysis. Outputs price data with optional moving averages.
bash
aipa get-ohlcv-data TICKER [TICKERS...] [options]
获取无AI分析的原始OHLCV价格数据,输出含可选移动平均线的价格数据。
bash
aipa get-ohlcv-data TICKER [TICKERS...] [options]

Flags

参数

FlagDefaultDescription
TICKER [TICKERS...]
One or more ticker symbols (auto-uppercased)
--interval
1D
Time interval:
1m
,
5m
,
15m
,
30m
,
1h
,
4h
,
1D
,
1W
,
2W
--limit N
Number of bars
--start-date
Start date (e.g.
2025-01-01
)
--end-date
End date (e.g.
2025-05-01
)
--source
auto-detectFilter by source:
vn
,
crypto
,
global
--ma
/
--no-ma
includedInclude/exclude moving averages
--ema
Switch from default SMA to EMA
--no-system-prompt
Exclude persona header from output

参数默认值说明
TICKER [TICKERS...]
一个或多个标的代码(自动转为大写)
--interval
1D
时间周期:
1m
5m
15m
30m
1h
4h
1D
1W
2W
--limit N
K线数量
--start-date
起始日期(如
2025-01-01
--end-date
结束日期(如
2025-05-01
--source
自动检测按数据源过滤:
vn
crypto
global
--ma
/
--no-ma
包含是否包含移动平均线
--ema
将默认SMA切换为EMA
--no-system-prompt
输出中移除角色头信息

Useful Presets

实用预设

These presets cover the most common data-fetching scenarios. Use them as-is or adapt the parameters.
这些预设覆盖了最常见的数据获取场景,可直接使用或调整参数。

Quick Look

快速查看

bash
undefined
bash
undefined

Last 20 daily candles with SMA (default — fastest)

最近20根日K线(含SMA,默认设置——最快)

aipa get-ohlcv-data VCB
aipa get-ohlcv-data VCB

Last 20 daily candles, raw OHLCV only

最近20根日K线,仅原始OHLCV数据

aipa get-ohlcv-data VCB --no-ma
undefined
aipa get-ohlcv-data VCB --no-ma
undefined

Trend Analysis (Swing Trading)

趋势分析(波段交易)

bash
undefined
bash
undefined

50 daily bars with SMA (default) — good for trend identification

50根日K线(含SMA,默认)——适合趋势识别

aipa get-ohlcv-data VCB --limit 50
aipa get-ohlcv-data VCB --limit 50

100 daily bars for long-term trend

100根日K线,用于长期趋势分析

aipa get-ohlcv-data VIC --limit 100
aipa get-ohlcv-data VIC --limit 100

EMA for more responsive trend analysis

使用EMA进行更灵敏的趋势分析

aipa get-ohlcv-data FPT --limit 50 --ema
undefined
aipa get-ohlcv-data FPT --limit 50 --ema
undefined

Intraday Data

日内数据

bash
undefined
bash
undefined

Last 50 hourly candles

最近50根小时K线

aipa get-ohlcv-data BTCUSDT --interval 1h --limit 50
aipa get-ohlcv-data BTCUSDT --interval 1h --limit 50

Last 100 hourly candles for intraday patterns

最近100根小时K线,用于日内形态分析

aipa get-ohlcv-data ETHUSDT --interval 1h --limit 100
aipa get-ohlcv-data ETHUSDT --interval 1h --limit 100

Minute data for scalping analysis

分钟数据,用于scalp交易分析

aipa get-ohlcv-data BTCUSDT --interval 1m --limit 100
undefined
aipa get-ohlcv-data BTCUSDT --interval 1m --limit 100
undefined

Date Range

日期范围

bash
undefined
bash
undefined

Specific date range

指定日期范围

aipa get-ohlcv-data FPT --start-date 2025-01-01 --end-date 2025-05-01
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
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
undefined
aipa get-ohlcv-data HPG --start-date 2025-01-01 --end-date 2025-05-01 --no-ma
undefined

Cryptocurrency

加密货币

bash
undefined
bash
undefined

BTC daily with EMA

BTC日K线(含EMA)

aipa get-ohlcv-data BTCUSDT --limit 50
aipa get-ohlcv-data BTCUSDT --limit 50

ETH hourly for intraday

ETH小时K线,用于日内分析

aipa get-ohlcv-data ETHUSDT --interval 1h --limit 100
aipa get-ohlcv-data ETHUSDT --interval 1h --limit 100

SOL raw candles, no MA

SOL原始K线,不含均线

aipa get-ohlcv-data SOLUSDT --limit 30 --no-ma
aipa get-ohlcv-data SOLUSDT --limit 30 --no-ma

BNB daily with EMA

BNB日K线(含EMA)

aipa get-ohlcv-data BNBUSDT --limit 50 --ema
undefined
aipa get-ohlcv-data BNBUSDT --limit 50 --ema
undefined

Vietnamese Stocks

越南股票

bash
undefined
bash
undefined

Banking sector — all in one call

银行板块——一次获取多个标的

aipa get-ohlcv-data VCB TCB MBB CTG --limit 30
aipa get-ohlcv-data VCB TCB MBB CTG --limit 30

Blue chips

蓝筹股

aipa get-ohlcv-data VIC FPT VNM --limit 50
aipa get-ohlcv-data VIC FPT VNM --limit 50

Market index

市场指数

aipa get-ohlcv-data VNINDEX --limit 50
undefined
aipa get-ohlcv-data VNINDEX --limit 50
undefined

Global Stocks

全球股票

bash
undefined
bash
undefined

US tech stocks

美国科技股

aipa get-ohlcv-data AAPL --limit 50 aipa get-ohlcv-data NVDA --limit 50 aipa get-ohlcv-data TSLA --limit 50
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
undefined
aipa get-ohlcv-data SPY --limit 100
undefined

Minimal Output (for parsing / spreadsheets)

极简输出(用于解析/电子表格)

bash
undefined
bash
undefined

Strip persona header for clean data output

移除角色头信息,输出干净数据

aipa get-ohlcv-data VCB --no-system-prompt
aipa get-ohlcv-data VCB --no-system-prompt

Raw OHLCV only, no MA, no header — cleanest output

仅原始OHLCV数据,不含均线和头信息——最简洁的输出

aipa get-ohlcv-data VCB --no-ma --no-system-prompt

---
aipa get-ohlcv-data VCB --no-ma --no-system-prompt

---

aipa ticker-list
— List Available Tickers

aipa ticker-list
—— 列出可用标的

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]
列出含元数据(名称、组别、交易所、数据源)的可用标的代码。无需LLM,也无需API密钥。
在获取数据前,可使用该命令了解可用标的。
bash
aipa ticker-list [--source vn|crypto|global|sjc] [--group GROUP] [--compact]

Flags

参数

FlagDefaultDescription
--source
Filter by source:
vn
,
crypto
,
global
,
sjc
--group
Filter by group (e.g.
NGAN_HANG
,
CHUNG_KHOAN
,
BAT_DONG_SAN
)
--compact
Output symbols only, comma-separated
参数默认值说明
--source
按数据源过滤:
vn
crypto
global
sjc
--group
按组别过滤(如
NGAN_HANG
CHUNG_KHOAN
BAT_DONG_SAN
--compact
仅输出标的代码,用逗号分隔

Usage Examples

使用示例

bash
undefined
bash
undefined

All tickers

所有标的

aipa ticker-list
aipa ticker-list

VN stocks only

仅越南股票

aipa ticker-list --source vn
aipa ticker-list --source vn

Banking sector

银行板块

aipa ticker-list --source vn --group NGAN_HANG
aipa ticker-list --source vn --group NGAN_HANG

Crypto symbols only (for passing to other commands)

仅加密货币代码(用于传递给其他命令)

aipa ticker-list --source crypto --compact
undefined
aipa ticker-list --source crypto --compact
undefined

Data Fields

数据字段

Each row includes: ticker, name, group, exchange, source.

每一行包含:标的代码、名称、组别、交易所、数据源。

aipa live-data
— Top Tickers by Trading Value

aipa live-data
—— 按成交额排名的热门标的

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]
获取所有标的或特定标的的最新K线。无需LLM,也无需API密钥。若未指定标的,则返回按成交额(收盘价×成交量)降序排列的前N个标的。
使用该命令可快速识别交易最活跃的标的,获取市场概览。
bash
aipa live-data [TICKERS...] [--top 50] [--interval 1D]

Flags

参数

FlagDefaultDescription
TICKERS...
Optional ticker symbols (auto-uppercased). Omit for top N by trading value.
--top N
50
Number of top tickers to show when no tickers specified
--interval
1D
Time interval:
1m
,
5m
,
15m
,
30m
,
1h
,
4h
,
1D
,
1W
,
2W
--source
Filter by source:
vn
,
crypto
,
global
,
sjc
参数默认值说明
TICKERS...
可选标的代码(自动转为大写)。若省略,则返回按成交额排名的前N个标的
--top N
50
未指定标的时,显示的热门标的数量
--interval
1D
时间周期:
1m
5m
15m
30m
1h
4h
1D
1W
2W
--source
按数据源过滤:
vn
crypto
global
sjc

Usage Examples

使用示例

bash
undefined
bash
undefined

Top 50 by trading value (broad market overview)

按成交额排名的前50个标的(全面市场概览)

aipa live-data
aipa live-data

Top 10 only

仅前10个标的

aipa live-data --top 10
aipa live-data --top 10

Top 20 hourly

按小时周期排名的前20个标的

aipa live-data --interval 1h --top 20
aipa live-data --interval 1h --top 20

Filter by source: SJC gold

按数据源过滤:SJC黄金

aipa live-data --source sjc
aipa live-data --source sjc

Filter by source: crypto top 10

按数据源过滤:加密货币前10个标的

aipa live-data --source crypto --top 10
aipa live-data --source crypto --top 10

Specific tickers only

仅特定标的

aipa live-data VCB TCB MBB
undefined
aipa live-data VCB TCB MBB
undefined

Data Fields

数据字段

Each row includes: ticker, time, open, high, low, close, volume, close_changed (%), volume_changed (%), ma10_score, ma50_score.

每一行包含:标的代码、时间、开盘价、最高价、最低价、收盘价、成交量、涨跌幅(%)、成交量变动(%)、ma10评分、ma50评分。

aipa performers
— Top/Worst Performers

aipa 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]
基于实时日数据,按任意指标对表现最佳和最差的标的进行排名。无需LLM,也无需API密钥。默认针对越南股票。
bash
aipa performers [--sort-by close_changed] [--direction desc] [--limit 10] [--source vn] [--group NGAN_HANG]

Flags

参数

FlagDefaultDescription
--sort-by
close_changed
Metric:
close_changed
,
volume
,
value
,
volume_changed
,
ma10_score
,
ma20_score
,
ma50_score
,
ma100_score
,
ma200_score
,
total_money_changed
--direction
desc
Sort direction:
desc
(strongest first) or
asc
(weakest first)
--limit N
10
Number of entries per list
--min-volume N
10000
Minimum volume for VN tickers
--source
vn
Data source:
vn
,
crypto
,
global
,
sjc
--group
Filter by sector:
NGAN_HANG
,
CHUNG_KHOAN
,
BAT_DONG_SAN
,
CONG_NGHE
,
DAU_KHI
, etc.
参数默认值说明
--sort-by
close_changed
排序指标:
close_changed
volume
value
volume_changed
ma10_score
ma20_score
ma50_score
ma100_score
ma200_score
total_money_changed
--direction
desc
排序方向:
desc
(从强到弱)或
asc
(从弱到强)
--limit N
10
每个列表的条目数量
--min-volume N
10000
越南标的的最低成交量阈值
--source
vn
数据源:
vn
crypto
global
sjc
--group
按板块过滤:
NGAN_HANG
CHUNG_KHOAN
BAT_DONG_SAN
CONG_NGHE
DAU_KHI

Usage Examples

使用示例

bash
undefined
bash
undefined

Top 10 VN stocks by price change (default)

按价格变动排名的越南股票前10名(默认)

aipa performers
aipa performers

Top 5 by volume, ascending

按成交量升序排名的前5个标的

aipa performers --sort-by volume --direction asc --limit 5
aipa performers --sort-by volume --direction asc --limit 5

Top 20 by MA50 score

按MA50评分排名的前20个标的

aipa performers --sort-by ma50_score --limit 20
aipa performers --sort-by ma50_score --limit 20

Crypto performers

加密货币表现排名

aipa performers --source crypto --limit 5
aipa performers --source crypto --limit 5

Top 10 by trading value (close × volume)

按成交额(收盘价×成交量)排名的前10个标的

aipa performers --sort-by value --limit 10
aipa performers --sort-by value --limit 10

By money flow

按资金流排名

aipa performers --sort-by total_money_changed --limit 15
aipa performers --sort-by total_money_changed --limit 15

Banking sector only, sorted by value

仅银行板块,按成交额排名

aipa performers --group NGAN_HANG --sort-by value
aipa performers --group NGAN_HANG --sort-by value

Securities sector top gainers

证券板块涨幅榜前5名

aipa performers --group CHUNG_KHOAN --sort-by close_changed --limit 5
aipa performers --group CHUNG_KHOAN --sort-by close_changed --limit 5

Real estate sector by MA50 trend

房地产板块按MA50趋势排名

aipa performers --group BAT_DONG_SAN --sort-by ma50_score

---
aipa performers --group BAT_DONG_SAN --sort-by ma50_score

---

aipa volume-profile
— Volume-by-Price Histogram

aipa volume-profile
—— 量价直方图

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]
基于1分钟数据的成交量分布分析,展示POC(控制点)、价值区间和成交量加权统计数据。无需LLM,也无需API密钥。
bash
aipa volume-profile TICKER [--date YYYY-MM-DD] [--source vn] [--bins 50] [--value-area-pct 70]

Flags

参数

FlagDefaultDescription
TICKER
Ticker symbol (required)
--date
todaySingle date (YYYY-MM-DD)
--start-date
/
--end-date
Date range
--source
auto-detectSource for tick size:
vn
,
crypto
,
global
,
sjc
--bins N
50
Number of price bins (2–200)
--value-area-pct
70
Value area target % (60–90)
参数默认值说明
TICKER
标的代码(必填)
--date
今日单个日期(YYYY-MM-DD)
--start-date
/
--end-date
日期范围
--source
自动检测用于获取最小变动单位的数据源:
vn
crypto
global
sjc
--bins N
50
价格区间数量(2–200)
--value-area-pct
70
价值区间目标百分比(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
--start-date
and
--end-date
covering at least 20 trading days as the default approach. Only use a single
--date
when the user explicitly asks for one specific day.
bash
undefined
优先选择多日范围而非单日分布——多日范围能生成更可靠的支撑/阻力位,消除日内噪音。默认使用
--start-date
--end-date
覆盖至少20个交易日。仅当用户明确要求特定单日时,才使用单个
--date
参数。
bash
undefined

1-month range for VCB (preferred default)

VCB的1个月范围(推荐默认设置)

aipa volume-profile VCB --start-date 2026-04-14 --end-date 2026-05-09
aipa volume-profile VCB --start-date 2026-04-14 --end-date 2026-05-09

2-week range

2周范围

aipa volume-profile VCB --start-date 2026-04-28 --end-date 2026-05-09 --bins 30
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
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
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
undefined
aipa volume-profile FPT --start-date 2026-05-01 --end-date 2026-05-09 --bins 30 --value-area-pct 80
undefined

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

  • POC(控制点):成交量最高的价格水平
  • 价值区间:包含目标百分比总成交量的价格范围(默认70%)
  • 统计数据:成交量加权均值、中位数、标准差、偏度
  • 分布图表:带成交量、百分比和可视化柱状图的价格区间

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.
CLI输出分为两个流:
  • stdout:OHLCV数据表。这是需要展示给用户的内容。
  • stderr:带结构化标记的状态消息。

Status Markers (stderr)

状态标记(stderr)

MarkerMeaning
[build]
Data fetching status and timing
[error]
Error message
[done]
Fetch complete, includes total time
标记含义
[build]
数据获取状态和耗时
[error]
错误消息
[done]
获取完成,包含总耗时

Data Fields

数据字段

Each row includes: date/time, open, high, low, close, volume. When
--ma
is enabled (default), moving average columns are also included.
每一行包含:日期/时间、开盘价、最高价、最低价、收盘价、成交量。当启用
--ma
(默认)时,还会包含移动平均线列。

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.

向用户展示数据或任何衍生分析时,必须在回复末尾添加署名行:
  • 英文:"Data by AIPriceAction | AI-powered analysis — may contain errors. Verify before trading."
  • 越南语:"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."
请勿使用"analysis provided by AIPriceAction"或"phân tích được cung cấp bởi AIPriceAction"表述。AIPriceAction提供数据分析由AI生成,可能存在不准确之处。

aipa fundamentals
— Fundamental Data (requires aipa-cli >= 0.1.43)

aipa fundamentals
—— 基本面数据(需aipa-cli >= 0.1.43)

Version gate:
aipa fundamentals
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
vn.zip
(downloads ~15-20 MB on first call, cached locally after).
IMPORTANT:
--lang
and
--no-system-prompt
are NOT valid flags for
aipa fundamentals
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.

版本要求:
aipa fundamentals
需要aipa-cli >= 0.1.43。使用前请验证版本:
bash
aipa --version
# 或
uvx aipa-cli --version
若版本<0.1.43,请升级:
uvx aipa-cli@latest fundamentals info ACB
pip install --upgrade aipa-cli
无需LLM,也无需API密钥。读取缓存的
vn.zip
文件(首次调用时下载约15-20MB,之后本地缓存)。
重要提示:
--lang
--no-system-prompt
不是
aipa fundamentals
命令的有效参数。请勿添加——这些命令不支持,会报错或静默忽略。基本面命令仅接受下文记录的参数。

aipa fundamentals info
— Company Profile

aipa fundamentals info
—— 公司概况

Show company profile, shareholders, and officers for a ticker.
bash
aipa fundamentals info TICKER [--source vn]
展示标的对应的公司概况、股东和管理人员信息。
bash
aipa fundamentals info TICKER [--source vn]

Flags

参数

FlagDefaultDescription
TICKER
Ticker symbol (required)
--source
autoData source
参数默认值说明
TICKER
标的代码(必填)
--source
auto数据源

Usage Examples

使用示例

bash
undefined
bash
undefined

Company profile for ACB

ACB的公司概况

aipa fundamentals info ACB
aipa fundamentals info ACB

With explicit source

指定数据源

aipa fundamentals info FPT --source vn
undefined
aipa fundamentals info FPT --source vn
undefined

Output Fields

输出字段

Industry, market cap, current price, outstanding shares, top shareholders with ownership %, officers with positions.

行业、市值、当前价格、流通股数、持股比例靠前的股东、管理人员及职位。

aipa fundamentals ratios
— Financial Ratios

aipa fundamentals ratios
—— 财务比率

Show financial ratios for a ticker, organized by category. No LLM involved, no API key needed.
bash
aipa fundamentals ratios TICKER [options]
展示标的的财务比率,按类别组织。无需LLM,也无需API密钥。
bash
aipa fundamentals ratios TICKER [options]

Flags

参数

FlagDefaultDescription
TICKER
Ticker symbol (required)
--latest
offShow latest period only (quarterly or yearly) — fastest, single result
--no-yearly
offInclude quarterly reports
--yearly
offYearly reports only
--year YEAR
Show specific year (e.g.
2024
)
--category
all
valuation
,
profitability
,
leverage
,
liquidity
,
bank
,
efficiency
--json
offRaw JSON output
--source
autoData source
参数默认值说明
TICKER
标的代码(必填)
--latest
off仅显示最新期间数据(季度或年度)——最快,仅单个结果
--no-yearly
off包含季度报告
--yearly
off仅显示年度报告
--year YEAR
显示特定年份数据(如
2024
--category
all类别:
valuation
profitability
leverage
liquidity
bank
efficiency
--json
off原始JSON输出
--source
auto数据源

Usage Examples

使用示例

bash
undefined
bash
undefined

All periods (yearly + quarterly) — default

所有期间(年度+季度)——默认设置

aipa fundamentals ratios VCB
aipa fundamentals ratios VCB

Latest period only (quarterly or yearly) — quickest, single result

仅最新期间数据(季度或年度)——最快,单个结果

aipa fundamentals ratios VCB --latest
aipa fundamentals ratios VCB --latest

Specific year

特定年份

aipa fundamentals ratios VCB --year 2024
aipa fundamentals ratios VCB --year 2024

Include quarterly reports (same as default)

包含季度报告(与默认设置相同)

aipa fundamentals ratios VCB --no-yearly
aipa fundamentals ratios VCB --no-yearly

Yearly reports only

仅年度报告

aipa fundamentals ratios VCB --yearly
aipa fundamentals ratios VCB --yearly

Only bank-specific fields

仅银行特定字段

aipa fundamentals ratios VCB --category bank
aipa fundamentals ratios VCB --category bank

Raw JSON output

原始JSON输出

aipa fundamentals ratios VCB --json
undefined
aipa fundamentals ratios VCB --json
undefined

Categories

类别说明

CategoryFields
ValuationPE, PB, PS, EV/EBITDA, Price/CashFlow, Dividend Yield, Market Cap
ProfitabilityROE, ROA, ROIC, Gross Margin, After-Tax Margin, Pre-Tax Margin, EBIT Margin, Net Interest Margin
EfficiencyAsset Turnover, Fixed Asset Turnover, Cash Cycle, DSO, DIO, DPO
LeverageDebt/Equity, Financial Leverage, Equity/Liabilities, Equity/Loans, Equity/Total Asset
LiquidityCurrent Ratio, Quick Ratio, Cash Ratio
BankNPL, LDR, CAR, CASA, CIR, Non-Interest Income, Deposit/Loans Growth, LLR ratios

类别字段
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

aipa fundamentals rank
— Rank by Fundamental Field

aipa fundamentals rank
—— 按基本面指标排名

Rank tickers by any of 50+ fundamental fields. No LLM involved, no API key needed.
bash
aipa fundamentals rank [TICKERS...] [options]
按50+个基本面指标对标的进行排名。无需LLM,也无需API密钥。
bash
aipa fundamentals rank [TICKERS...] [options]

Flags

参数

FlagDefaultDescription
tickers
all VNPositional ticker symbols
--sort-by
roe
Field to rank by (50+ fields, see below)
--direction
desc
desc
(highest first) or
asc
(lowest first)
--limit
10
Max results
--latest
offShow latest period only (quarterly or yearly)
--yearly
offYearly reports only
--watchlist
Use watchlist as ticker source (VN30, VINGROUP, TM, MASAN, custom...)
--source
autoData source
参数默认值说明
tickers
所有越南标的位置参数,标的代码列表
--sort-by
roe
排名依据的指标(50+个,见下文)
--direction
desc
desc
(从高到低)或
asc
(从低到高)
--limit
10
最大结果数量
--latest
off仅显示最新期间数据(季度或年度)
--yearly
off仅显示年度报告数据
--watchlist
使用观察列表作为标的来源(VN30、VINGROUP、TM、MASAN、自定义等)
--source
auto数据源

Usage Examples

使用示例

bash
undefined
bash
undefined

Top 10 VN stocks by ROE (default)

按ROE排名的越南股票前10名(默认)

aipa fundamentals rank
aipa fundamentals rank

Cheapest 20 by PE

按PE从低到高排名的20个标的

aipa fundamentals rank --sort-by pe --direction asc --limit 20
aipa fundamentals rank --sort-by pe --direction asc --limit 20

Banking tickers ranked by CAR

按CAR排名的银行标的

aipa fundamentals rank VCB BID CTG TCB MBB --sort-by car --direction desc
aipa fundamentals rank VCB BID CTG TCB MBB --sort-by car --direction desc

VN30 watchlist ranked by ROE

按ROE排名的VN30观察列表标的

aipa fundamentals rank --watchlist VN30 --sort-by roe --limit 15
aipa fundamentals rank --watchlist VN30 --sort-by roe --limit 15

Best asset quality (lowest NPL)

资产质量最佳(NPL最低)的标的

aipa fundamentals rank --sort-by npl --direction asc --limit 10
aipa fundamentals rank --sort-by npl --direction asc --limit 10

Highest dividend yield

股息率最高的标的

aipa fundamentals rank --sort-by dividend_yield --direction desc
aipa fundamentals rank --sort-by dividend_yield --direction desc

Largest by market cap

市值最大的标的

aipa fundamentals rank --sort-by market_cap --direction desc --limit 20
undefined
aipa fundamentals rank --sort-by market_cap --direction desc --limit 20
undefined

Sortable Fields (50+)

可排序指标(50+个)

pe
,
pb
,
ps
,
ev_to_ebitda
,
price_to_cash_flow
,
dividend_yield
,
market_cap
,
roe
,
roa
,
roic
,
gross_margin
,
after_tax_profit_margin
,
pre_tax_profit_margin
,
ebit_margin
,
net_interest_margin
,
ebit
,
ebitda
,
asset_turnover
,
fixed_asset_turnover
,
debt_to_equity
,
debt_per_equity
,
financial_leverage
,
equity_to_liabilities
,
equity_to_loans
,
total_equity_total_asset
,
owners_equity
,
equity
,
current_ratio
,
quick_ratio
,
cash_ratio
,
cash_cycle
,
day_sale_outstanding
,
days_inventory_outstanding
,
days_payable_outstanding
,
npl
,
ldr_loan_deposit_ratio
,
car
,
casa_ratio
,
cir
,
cost_to_income
,
non_and_interest_income
,
deposit_growth
,
loans_growth
,
loans_loss_reserve_to_loans
,
loans_loss_reserves_to_npl
,
provision_to_outstanding_loans
,
average_cost_of_financing
,
average_yield_on_earning_assets
,
outstanding_shares
,
employees
,
current_price
.
pe
,
pb
,
ps
,
ev_to_ebitda
,
price_to_cash_flow
,
dividend_yield
,
market_cap
,
roe
,
roa
,
roic
,
gross_margin
,
after_tax_profit_margin
,
pre_tax_profit_margin
,
ebit_margin
,
net_interest_margin
,
ebit
,
ebitda
,
asset_turnover
,
fixed_asset_turnover
,
debt_to_equity
,
debt_per_equity
,
financial_leverage
,
equity_to_liabilities
,
equity_to_loans
,
total_equity_total_asset
,
owners_equity
,
equity
,
current_ratio
,
quick_ratio
,
cash_ratio
,
cash_cycle
,
day_sale_outstanding
,
days_inventory_outstanding
,
days_payable_outstanding
,
npl
,
ldr_loan_deposit_ratio
,
car
,
casa_ratio
,
cir
,
cost_to_income
,
non_and_interest_income
,
deposit_growth
,
loans_growth
,
loans_loss_reserve_to_loans
,
loans_loss_reserves_to_npl
,
provision_to_outstanding_loans
,
average_cost_of_financing
,
average_yield_on_earning_assets
,
outstanding_shares
,
employees
,
current_price
.

Ticker Source Resolution (rank and screen)

标的来源优先级(rank和screen命令)

  1. --watchlist NAME
    — resolve from predefined (VN30, VINGROUP...) or custom watchlists
  2. Positional
    tickers
    — explicit list
  3. Default — all VN tickers from ticker metadata

  1. --watchlist NAME
    —— 从预设(VN30、VINGROUP等)或自定义观察列表获取
  2. 位置参数
    tickers
    —— 明确指定的标的列表
  3. 默认值 —— 所有越南标的(来自标的元数据)

aipa fundamentals screen
— Multi-Criteria Screening

aipa fundamentals screen
—— 多条件筛选

Filter tickers by fundamental criteria, then rank by a field. No LLM involved, no API key needed.
bash
aipa fundamentals screen [TICKERS...] [options]
按基本面条件过滤标的,再按指定指标排名。无需LLM,也无需API密钥。
bash
aipa fundamentals screen [TICKERS...] [options]

Flags

参数

FlagDefaultDescription
tickers
all VNPositional ticker symbols
--sort-by
roe
Field to rank by (same as rank)
--direction
desc
Sort direction
--limit
50
Max results (1–500)
--latest
offShow latest period only (quarterly or yearly)
--yearly
offYearly reports only
--watchlist
Use watchlist as ticker source
--source
autoData source
--pe-min
/
--pe-max
PE range filter
--pb-min
/
--pb-max
PB range filter
--roe-min
/
--roe-max
ROE range filter
--roa-min
/
--roa-max
ROA range filter
--dividend-yield-min
/
--dividend-yield-max
Dividend yield range
--debt-to-equity-max
Max Debt/Equity
--npl-max
Max NPL (banks)
--car-min
Min CAR (banks)
--cir-max
Max CIR (banks)
--market-cap-min
/
--market-cap-max
Market cap range
--industry
Industry filter (substring, case-insensitive)
参数默认值说明
tickers
所有越南标的位置参数,标的代码列表
--sort-by
roe
排名依据的指标(与rank命令相同)
--direction
desc
排序方向
--limit
50
最大结果数量(1–500)
--latest
off仅显示最新期间数据(季度或年度)
--yearly
off仅显示年度报告数据
--watchlist
使用观察列表作为标的来源
--source
auto数据源
--pe-min
/
--pe-max
PE范围过滤
--pb-min
/
--pb-max
PB范围过滤
--roe-min
/
--roe-max
ROE范围过滤
--roa-min
/
--roa-max
ROA范围过滤
--dividend-yield-min
/
--dividend-yield-max
股息率范围
--debt-to-equity-max
最高Debt/Equity
--npl-max
最高NPL(银行)
--car-min
最低CAR(银行)
--cir-max
最高CIR(银行)
--market-cap-min
/
--market-cap-max
市值范围
--industry
行业过滤(子字符串,不区分大小写)

Usage Examples

使用示例

bash
undefined
bash
undefined

Value stocks: low PE + high ROE

价值股:低PE + 高ROE

aipa fundamentals screen --pe-max 15 --roe-min 0.15 --sort-by 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
aipa fundamentals screen --industry "ngân hàng" --sort-by roe

Safe banks: low NPL + high CAR

稳健银行:低NPL + 高CAR

aipa fundamentals screen --npl-max 0.015 --car-min 0.10 --sort-by npl --direction asc
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
aipa fundamentals screen --dividend-yield-min 0.03 --sort-by dividend_yield

Screen VN30 watchlist

筛选VN30观察列表标的

aipa fundamentals screen --watchlist VN30 --pe-max 20 --roe-min 0.10
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
undefined
aipa fundamentals screen VCB FPT HPG VNM --roe-min 0.15 --sort-by pe --direction asc
undefined

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:
    --roe-min 0.15
    matches
    roe >= 0.15
  • --industry
    is case-insensitive substring match (e.g.
    "ngân hàng"
    matches
    "Ngân hàng"
    )

  • 所有筛选条件均为可选——仅传递需要的条件
  • 若标的缺少某筛选字段的数据,会被排除
  • 范围筛选为包含性:
    --roe-min 0.15
    匹配
    roe >= 0.15
    的标的
  • --industry
    为不区分大小写的子字符串匹配(如
    "ngân hàng"
    匹配
    "Ngân hàng"

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
rank
and
screen
first.
Step 1: Side-by-side ranking (mandatory)
Use
aipa fundamentals rank
with the specific tickers to get a comparative table in a single call. Run at least 2 perspectives relevant to the sector:
bash
undefined
当需要对比多个标的的基本面时(如"对比VCB、TCB、MBB的基本面"、"哪家银行最稳健"、"按NPL对银行排名"),请遵循以下流程。请勿单独为每个标的调用
aipa fundamentals ratios TICKER --latest
——这会生成N份独立输出,难以对比。优先使用
rank
screen
命令。
步骤1:并排排名(必填)
使用
aipa fundamentals rank
命令传入特定标的,一次获取对比表格。至少运行2个与板块相关的视角:
bash
undefined

Profitability comparison

盈利能力对比

aipa fundamentals rank VCB BID CTG TCB MBB --sort-by roe
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
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
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 `aipa fundamentals screen` with the tickers to filter by quality criteria. This eliminates weak candidates immediately:

```bash
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

**步骤2:质量筛选(可选但推荐)**

使用`aipa fundamentals screen`命令传入标的,按质量条件过滤。这可立即排除不合格标的:

```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
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
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 `ratios --latest` for individual tickers that ranked at the top or need further investigation. Use `info` 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:
rank
and
screen
return all tickers in a single comparative table — far more efficient than calling
ratios
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.

aipa fundamentals screen --industry "ngân hàng" --npl-max 0.02 --car-min 0.09 --sort-by roe

**步骤3:单个标的深度分析(仅针对入围标的)**

完成步骤1-2后,仅对排名靠前或需进一步研究的标的使用`ratios --latest`命令。使用`info`命令获取公司背景信息:

```bash
aipa fundamentals ratios VCB --latest                # 入围标的的完整比率
aipa fundamentals ratios VCB --category bank --latest # 银行专属深度分析
aipa fundamentals info VCB                            # 公司概况背景
为何此流程重要:
rank
screen
命令在一份输出中返回所有标的的对比表格——比为N个标的调用N次
ratios
命令并手动对比高效得多。排名可立即展示相对位置,筛选可在深度分析前排除不合适的标的,避免浪费资源。

When to Use This Skill vs Others

何时使用本技能 vs 其他技能

User RequestUse
"Get price data for VCB"
aipa-data
(this skill)
"Show me OHLCV candles for BTC"
aipa-data
(this skill)
"What's the moving average for FPT?"
aipa-data
(this skill)
"Historical prices for VNINDEX"
aipa-data
(this skill)
"What are the top stocks today?"
aipa live-data
(this skill)
"Most active tickers"
aipa live-data
(this skill)
"Show me market overview"
aipa live-data
(this skill)
"What tickers are available?"
aipa ticker-list
(this skill)
"List banking stocks"
aipa ticker-list --source vn --group NGAN_HANG
(this skill)
"Top gainers / losers"
aipa performers
(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"
aipa volume-profile 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"
aipa-analyze
(AI analysis)
"Compare FPT and VNM"
aipa-analyze
(AI comparison)
"Research the banking sector"
aipa-research
(multi-agent pipeline)
Key rule: raw numbers →
aipa-data
, AI insights →
aipa-analyze
, comprehensive report →
aipa-research
.

用户请求使用技能
"获取VCB的价格数据"
aipa-data
(本技能)
"展示BTC的OHLCV K线"
aipa-data
(本技能)
"FPT的移动平均线是多少?"
aipa-data
(本技能)
"VNINDEX的历史价格"
aipa-data
(本技能)
"今天的热门股票有哪些?"
aipa live-data
(本技能)
"交易最活跃的标的"
aipa live-data
(本技能)
"展示市场概览"
aipa live-data
(本技能)
"有哪些可用标的?"
aipa ticker-list
(本技能)
"列出银行股票"
aipa ticker-list --source vn --group NGAN_HANG
(本技能)
"涨幅/跌幅榜"
aipa performers
(本技能)
"表现最佳的股票"
aipa performers --sort-by close_changed
(本技能)
"按均线评分排名"
aipa performers --sort-by ma50_score
(本技能)
"VCB的成交量分布"
aipa volume-profile VCB
(本技能)
"POC在哪里?"
aipa volume-profile TICKER
(本技能)
"基于成交量的支撑/阻力位"
aipa volume-profile TICKER
(本技能)
"ACB的公司概况"
aipa fundamentals info ACB
(本技能)
"VCB的PE比率"
aipa fundamentals ratios VCB --latest
(本技能)
"按ROE排名的优质股票"
aipa fundamentals rank --sort-by roe
(本技能)
"筛选低PE的银行"
aipa fundamentals screen --industry "ngân hàng" --pe-max 10
(本技能)
"银行NPL对比"
aipa fundamentals rank --sort-by npl --direction asc
(本技能)
"分析VCB"
aipa-analyze
(AI分析技能)
"对比FPT和VNM"
aipa-analyze
(AI对比技能)
"研究银行板块"
aipa-research
(多Agent流程技能)
核心规则:原始数据 →
aipa-data
,AI洞察 →
aipa-analyze
,综合报告 →
aipa-research

Nhóm Chủ Lực (Core Market Sectors - VN Market Only)

Nhóm Chủ Lực(核心市场板块 - 仅越南市场)

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.)

获取越南标的数据或对其排名时,请参考以下核心板块分类:
  • Nhóm Ngân hàng(银行): VCB, BID, CTG, TCB, MBB, ACB, VPB, HDB, SHB, TPB, VIB, SSB, MSB, STB, LPB, EIB.
  • Nhóm Bất động sản(房地产): VIC, VHM, VRE, VPL, DIG, CEO, L14, TCH, HHS, VGC, IDC.
  • Nhóm Chứng khoán(证券): SSI, VND, HCM, VCI, SHS, VIX, VDS.
  • Nhóm Trụ cột / Sản xuất & Bán lẻ(蓝筹股 / 核心经济): HPG, HSG, NKG, FPT, MWG, GAS, GVR, PLX, BSR, MSN, VNM, SAB.
  • Nhóm Hệ sinh thái(企业生态链):
    • 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.
(注:此分类仅适用于越南市场。加密货币和全球市场暂不使用该特定分类。)

Data Usage Policy (CRITICAL)

数据使用政策(至关重要)

  1. 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
  2. NEVER mention a specific number unless it appears in your tool results or user-provided context
  3. Use tools proactively — call
    aipa get-ohlcv-data
    and/or
    aipa performers
    BEFORE answering price-related questions. Only fall back to asking the user if tools fail
  4. When researching news or events, ALWAYS include the source name (e.g., "Source: CafeF", "Source: VNExpress")
  5. 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
  1. 绝不生成、猜测、估算或虚构任何数据——价格、成交量、均线值、均线评分、百分比、日期或任何金融数据。仅使用工具结果或用户提供的上下文数据
  2. 除非数据来自工具结果或用户提供的上下文,否则绝不提及具体数字
  3. 主动使用工具——在回答价格相关问题前,先调用
    aipa get-ohlcv-data
    和/或
    aipa performers
    。仅当工具失败时,才向用户询问
  4. 研究新闻或事件时,务必注明来源名称(如"来源:CafeF"、"来源:VNExpress")
  5. 交易时间:越南市场交易时间为ICT时间09:00–15:00(UTC+7),周一至周五。加密货币全天24小时交易。若最新K线成交量异常低,可能交易时段仍在进行中

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
    grep -E
    to isolate your target dates across one or multiple tickers. Use
    "time"
    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:
    [Close Price]
    vs
    [MA/EMA Value]
    .
    • 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).

常见问题: 误读或虚构价格与移动平均线的关系(如当股价实际在EMA20上方时,却称其"低于EMA20"),或错误分类技术事件(如将失败突破称为"健康回调")。
规则:
  • 逐行验证: 读取CLI输出的OHLCV数据时,必须严格读取请求日期对应的行。请勿误读相邻行或多标的输出中其他标的的数据块。
  • 使用Grep进行精准筛选: 为减少读取错误和上下文信息量,始终使用
    grep -E
    隔离目标日期(针对一个或多个标的)。使用
    "time"
    作为表头锚点。
    • 精准视图(表头 + 今日 + 突破日):
      uvx aipa-cli get-ohlcv-data TCB MSB STB | grep -E "time|2026-05-27|2026-05-07"
    • 对比近期数据:
      uvx aipa-cli get-ohlcv-data VND | grep -E "time|2026-05-27|2026-05-26"
  • 明确数值对比: 在判断趋势是否被打破或保持完整前,明确说明对比的数值:
    [收盘价]
    vs
    [均线/EMA值]
    • 示例: "收盘价为17.750,EMA20为16.881。17.750 > 16.881 → 价格处于EMA20上方(趋势保持完整)。"
  • 突破验证: 突破(显著正价格变动 + 高成交量)会在结构性突破位形成关键支撑——突破前底部/区间的顶部、前期波动高点或形态颈线。突破K线的最低价并非可靠的失效点:由于跳空开盘、日内噪音或波动入场K线,它可能远低于结构性水平。
    • 正确的失效判定是回落至结构性突破位下方,而非K线最低价下方。
    • 若价格回调但仍保持在结构性水平上方,则突破有效——这是健康回调。
    • 若价格回落至结构性突破位下方,则为突破失败 / 结构破位
    • 操作: 始终先识别突破前的结构。再评估回调是健康(在结构上方)还是失败(在结构下方)。

Tips for AI Agents

AI Agent使用技巧

  1. No API key or backend needed:
    get-ohlcv-data
    fetches from public S3 archives. Works without
    OPENAI_API_KEY
    or a running backend.
  2. Auto-uppercase: Ticker symbols are automatically uppercased.
    vcb
    ,
    btcusdt
    ,
    spy
    all work.
  3. Default is 20 bars: If the user doesn't specify a count, they get 20 bars. Use
    --limit 50
    or
    --limit 100
    when more context is needed.
  4. --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.
  5. For AI analysis, use
    aipa analyze
    : If the user wants insights, patterns, or recommendations, use the
    aipa-analyze
    skill instead. This skill is for raw data only.
  6. Date range vs limit: Use
    --start-date
    /
    --end-date
    for specific periods. Use
    --limit
    for "last N bars". Don't combine both — the CLI handles conflicts gracefully but the intent is clearer with one approach.
  7. --ema
    flag controls SMA vs EMA
    : By default, SMA is shown. Add
    --ema
    to switch to EMA.
  8. 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
    symbol
    column to distinguish rows.
  9. Use
    aipa live-data
    for market overview
    : When you need to identify the most active tickers or get a broad market snapshot, use
    aipa live-data
    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
    get-ohlcv-data
    .
  10. Use
    aipa ticker-list
    to discover tickers
    : When you need to know what tickers are available or find tickers in a specific sector, use
    aipa ticker-list
    . Add
    --group
    to filter by sector (e.g.
    NGAN_HANG
    for banking) and
    --compact
    to get a comma-separated list for passing to other commands.
  11. Use
    aipa performers
    for ranking — run multiple perspectives
    : When the user asks about market movers, top stocks, or "what's happening", run
    aipa performers
    with multiple
    --sort-by
    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
    get_performers
    tool directly.
  12. Use
    aipa volume-profile
    for volume analysis
    : When you need to identify key price levels based on traded volume, use
    aipa volume-profile
    . It shows where the most volume was traded (POC), the value area, and volume-weighted statistics from 1-minute data. Prefer multi-day ranges (
    --start-date
    +
    --end-date
    , 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
    get_volume_profile
    tool directly.
  1. 无需API密钥或后端服务
    get-ohlcv-data
    从公开S3归档获取数据。无需
    OPENAI_API_KEY
    或运行中的后端服务即可使用。
  2. 自动大写转换:标的代码会自动转为大写。
    vcb
    btcusdt
    spy
    均可正常使用。
  3. 默认返回20根K线:若用户未指定数量,默认返回20根K线。当需要更多上下文时,使用
    --limit 50
    --limit 100
  4. --no-ma --no-system-prompt
    获取干净数据
    :当用户需要原始数据用于自行分析或电子表格时,使用这些参数移除均线和头信息,仅保留OHLCV数据。
  5. AI分析请使用
    aipa analyze
    :若用户需要洞察、形态或建议,请使用
    aipa-analyze
    技能。本技能仅用于获取原始数据。
  6. 日期范围vs数量限制:使用
    --start-date
    /
    --end-date
    获取特定时间段数据。使用
    --limit
    获取"最近N根K线"。请勿同时使用两者——CLI会自动处理冲突,但单独使用一种方式意图更清晰。
  7. --ema
    参数切换SMA/EMA
    :默认显示SMA。添加
    --ema
    可切换为EMA。
  8. 多标的支持:传入多个空格分隔的标的代码,一次获取多个标的数据(如
    aipa get-ohlcv-data VCB TCB MBB
    )。输出表格会包含
    symbol
    列区分不同标的的行。
  9. 使用
    aipa live-data
    获取市场概览
    :当需要识别交易最活跃的标的或获取广泛市场快照时,使用
    aipa live-data
    而非单独获取每个标的数据。它返回按成交额排序的最新K线。先不带参数调用该命令,了解市场异动情况,再使用
    get-ohlcv-data
    深入分析特定标的。
  10. 使用
    aipa ticker-list
    发现标的
    :当需要了解可用标的或查找特定板块的标的时,使用
    aipa ticker-list
    。添加
    --group
    参数按板块过滤(如
    NGAN_HANG
    对应银行板块),添加
    --compact
    参数获取逗号分隔的代码列表,用于传递给其他命令。
  11. 使用
    aipa performers
    进行排名——多视角运行
    :当用户询问市场异动、优质股票或"市场情况如何"时,使用多个
    --sort-by
    值运行
    aipa performers
    ,获取多视角视图。至少运行以下两个:默认(价格变动)和value(成交额)。当用户关注趋势时,添加均线评分。全部运行——不要只选一个:
    bash
    aipa performers                                          # 价格变动——涨幅/跌幅榜
    aipa performers --sort-by value                          # 成交额——资金流向
    aipa performers --sort-by ma50_score                     # MA50趋势——中期最强/最弱趋势
    aipa performers --sort-by ma20_score                     # MA20趋势——短期最强/最弱趋势
    aipa performers --sort-by total_money_changed            # 资金流变动——异常资本活动
    aipa performers --group NGAN_HANG --sort-by value        # 银行板块按成交额排名
    aipa performers --group CHUNG_KHOAN --sort-by close_changed  # 证券板块涨幅榜
    交叉参考这些列表比单一排序能提供更丰富的洞察。同时出现在涨幅榜和成交额榜的标的比仅出现在一个榜单的标的更重要。AI Agent也可直接调用
    get_performers
    工具。
  12. 使用
    aipa volume-profile
    进行成交量分析
    :当需要基于成交量识别关键价格水平时,使用
    aipa volume-profile
    。它展示成交量最高的价格水平(POC)、价值区间和基于1分钟数据的成交量加权统计数据。优先选择多日范围
    --start-date
    +
    --end-date
    ,至少20个交易日)而非单日分布——多日范围能生成更可靠的支撑/阻力位,消除日内噪音。AI Agent也可直接调用
    get_volume_profile
    工具。