fetchlisted
Install: claude install-skill seokhoonj/krx-openapi
# krx — fetch one day of a service
Take a KRX service (a `group name` pair, e.g. `index kospi`, `stock daily`) and a
trade date, and print that day's rows. The command mirrors the Python call:
`krx.index.kospi("20200414")` is `krx fetch index kospi 20200414`. The request, the
KRX status contract, and parsing live in the krx-openapi package (on PyPI); this
skill is a thin wrapper that calls its CLI and relays the result. A rejected key, an
un-applied service, or a quota error comes back as a one-line `krx: <message>` --
relay it as-is rather than throwing a stack trace.
**One date, not a range.** Every KRX endpoint is a per-date snapshot: one call
returns that whole market on that one day (all stocks, all bonds, ...), not a time
series. For a range, call once per trading day.
## Prerequisite
This plugin calls the `krx` CLI, so the package must be installed and an API key set:
```
pipx install krx-openapi # or: pip install krx-openapi
export KRX_API_KEY=... # a free key from https://openapi.krx.co.kr
```
The key can also be stored in `~/.config/krx-openapi/credentials.json` as
`{"KRX_API_KEY": "..."}`. **A key alone is not enough** -- each service must also be
applied for and approved under "서비스 이용" on the KRX account, or the call returns 401.
(The **list** and **fields** skills need no key at all -- they are offline.)
## Running
```
krx fetch <GROUP> <NAME> <YYYYMMDD> [--market M] [--json]
```
- `GROUP NAME` is the readable service pair -- `index kospi`,