← 返回 Skills 市场
chloepark85

KRX Stock CLI

作者 Chloe Park · GitHub ↗ · v0.1.0 · MIT-0
cross-platform ✓ 安全检测通过
134
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install krx-stock-cli
功能描述
Korean Exchange (KRX) stock market data CLI. Fetch daily OHLCV, latest-close snapshots, market-cap rankings, index histories (KOSPI/KOSDAQ/KOSPI200/KRX100),...
使用说明 (SKILL.md)

KRX Stock CLI

Zero-config CLI for Korean Exchange (KRX) market data: daily OHLCV, latest-close snapshots, market-cap rankings, index histories, and ticker lookups for KOSPI / KOSDAQ / KONEX / ETF tickers.

Backed by FinanceDataReader, which aggregates KRX, Naver Finance, and related public sources. No API key required.

When to use

Trigger on:

  • Korean stock price / OHLCV requests ("삼성전자 주가", "005930 price history")
  • Market-cap ranking / latest close snapshots
  • Index series (KOSPI, KOSDAQ, KOSPI 200, KRX 100)
  • Ticker ↔ company-name resolution
  • Company name substring search
  • Global-index tagalong queries (S&P 500, Nasdaq, Nikkei, Shanghai)

Do not use for:

  • Corporate filings / disclosures → use opendart-cli
  • Fundamentals per day (PER/PBR/EPS) — not exposed; use DART financial statements instead
  • Real-time ticks / order book (data is EOD; today's bar is available after market close)

Install

pip install -r scripts/requirements.txt

Dependencies: finance-datareader, pandas.

Usage

All commands are sub-commands of scripts/krx.py. JSON by default; pass --csv for CSV to stdout.

Dates accept either YYYYMMDD or YYYY-MM-DD.

Ticker lookup

python scripts/krx.py ticker 005930            # → 삼성전자
python scripts/krx.py ticker "SK하이닉스"       # → 000660
python scripts/krx.py search 카카오 --top 5     # substring search

OHLCV

python scripts/krx.py ohlcv 005930 --days 30
python scripts/krx.py ohlcv 005930 --start 20260101 --end 20260420 --csv

Latest-close snapshot

python scripts/krx.py snapshot 005930

Market-cap ranking

python scripts/krx.py marketcap --market KRX --top 50
python scripts/krx.py marketcap --market KOSDAQ --top 20 --csv

--market accepts KRX, KOSPI, KOSDAQ, KONEX, ETF/KR.

List all tickers in a market

python scripts/krx.py list --market KOSPI --top 100

Index

python scripts/krx.py index KS11 --days 90       # KOSPI
python scripts/krx.py index KS200 --days 30      # KOSPI 200
python scripts/krx.py index IXIC --days 30       # NASDAQ Composite
python scripts/krx.py index-list                 # common codes

Common codes: KS11 KOSPI · KQ11 KOSDAQ · KS200 KOSPI 200 · KRX100 KRX 100 · DJI Dow · IXIC Nasdaq · US500 S&P 500 · N225 Nikkei 225 · SSEC Shanghai.

Output format

  • JSON (default): array of records, UTF-8, Korean preserved, dates as YYYY-MM-DD.
  • CSV (--csv): Pandas-compatible; date is the first column on time-series output.

Error handling

  • Invalid ticker → exit code 2, {"error":"ticker_not_found","input":"…"} on stderr.
  • Upstream error (network, schema drift) → exit code 3, {"error":"upstream_error",…} on stderr.
  • Empty date range (weekend / holiday) → empty array, exit code 0.

Rate limits

Public endpoints — keep multi-ticker jobs to ~1 req/sec and back off on 403.

See also

  • opendart-cli — DART filings & financial statements
  • toss-payments-cli — Toss Payments API
  • naver-papago-translate — translate Korean disclosures

License

MIT. No warranty on data accuracy — always verify against the official KRX disclosure before trading.

安全使用建议
This skill appears coherent and implements exactly what it advertises: a Python CLI that uses FinanceDataReader and pandas to fetch public KRX and related market data. Before installing, consider: (1) run pip install inside a virtual environment; (2) FinanceDataReader will make HTTP requests to public data sources (Naver Finance, KRX, etc.), so if you need strict data provenance verify those upstream sources yourself; (3) the package metadata lists no homepage/source in the registry, but the repository URL appears in README—if provenance matters, review the upstream GitHub repo and its release history; (4) no secrets are required by this skill, so it does not attempt to access credentials or system files.
功能分析
Type: OpenClaw Skill Name: krx-stock-cli Version: 0.1.0 The skill is a legitimate CLI wrapper for the FinanceDataReader library, providing access to Korean Exchange (KRX) stock data. The Python script (scripts/krx.py) implements standard data fetching, processing with pandas, and outputting in JSON/CSV formats without any evidence of malicious behavior, data exfiltration, or prompt injection. All operations are aligned with the stated purpose in SKILL.md and README.md.
能力标签
cryptocan-make-purchasesrequires-sensitive-credentials
能力评估
Purpose & Capability
Name/description match the provided code and SKILL.md. The CLI wraps FinanceDataReader and pandas to provide ticker lookups, OHLCV, market-cap rankings and index histories — all consistent with the stated purpose.
Instruction Scope
SKILL.md only instructs running the included Python CLI and installing its Python deps. The runtime code accesses network data only via FinanceDataReader (expected) and does not read environment variables, unrelated files, or exfiltrate data to unexpected endpoints.
Install Mechanism
No automated install spec is embedded; installation is a standard pip install -r scripts/requirements.txt. Dependencies are public Python packages (finance-datareader, pandas). No downloads from untrusted URLs or archive extraction are present in the skill bundle.
Credentials
The skill declares no required env vars, no primary credential, and the code does not reference secrets or other credentials. Requested resources are proportional to the functionality.
Persistence & Privilege
always:false and no code to modify other skills or system-wide settings. The skill runs as a normal CLI and does not request elevated persistence or privileges.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install krx-stock-cli
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /krx-stock-cli 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v0.1.0
Initial release: ticker lookup, OHLCV, snapshot, market-cap, index, search.
元数据
Slug krx-stock-cli
版本 0.1.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

KRX Stock CLI 是什么?

Korean Exchange (KRX) stock market data CLI. Fetch daily OHLCV, latest-close snapshots, market-cap rankings, index histories (KOSPI/KOSDAQ/KOSPI200/KRX100),... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 134 次。

如何安装 KRX Stock CLI?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install krx-stock-cli」即可一键安装,无需额外配置。

KRX Stock CLI 是免费的吗?

是的,KRX Stock CLI 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

KRX Stock CLI 支持哪些平台?

KRX Stock CLI 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 KRX Stock CLI?

由 Chloe Park(@chloepark85)开发并维护,当前版本 v0.1.0。

💬 留言讨论