← Back to Skills Marketplace
chloepark85

KRX Stock CLI

by Chloe Park · GitHub ↗ · v0.1.0 · MIT-0
cross-platform ✓ Security Clean
134
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install krx-stock-cli
Description
Korean Exchange (KRX) stock market data CLI. Fetch daily OHLCV, latest-close snapshots, market-cap rankings, index histories (KOSPI/KOSDAQ/KOSPI200/KRX100),...
README (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.

Usage Guidance
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.
Capability Analysis
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.
Capability Tags
cryptocan-make-purchasesrequires-sensitive-credentials
Capability Assessment
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.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install krx-stock-cli
  3. After installation, invoke the skill by name or use /krx-stock-cli
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v0.1.0
Initial release: ticker lookup, OHLCV, snapshot, market-cap, index, search.
Metadata
Slug krx-stock-cli
Version 0.1.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is 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),... It is an AI Agent Skill for Claude Code / OpenClaw, with 134 downloads so far.

How do I install KRX Stock CLI?

Run "/install krx-stock-cli" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is KRX Stock CLI free?

Yes, KRX Stock CLI is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does KRX Stock CLI support?

KRX Stock CLI is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created KRX Stock CLI?

It is built and maintained by Chloe Park (@chloepark85); the current version is v0.1.0.

💬 Comments