krx — list services
Show what the KRX Open API offers and how to call it, in the same readable names the
Python client uses. krx list prints the accessor tree: every group and the methods
under it, one group name per line -- index kospi, stock daily, bond treasury,
... exactly the words the fetch skill (and the Python client) take. It reads a
catalog bundled in the krx-openapi package, so it runs offline and needs no API
key. There are no raw api_ids to memorize; the group name pair is the whole address.
Prerequisite
This plugin calls the krx CLI, so the package must be installed:
pipx install krx-openapi # or: pip install krx-openapi
That puts the krx command on PATH. krx list needs no KRX_API_KEY (it is
offline) -- only the fetch skill does.
Running
krx list [GROUP] # all groups and their methods, or one group's methods
krx listprints every group (index,stock,etp,bond,derivatives,commodity,esg) and the methods under it.krx list stocknarrows to one group.--jsonemits JSON instead of the text view.
Procedure
- From a concept, find the
group name. Runkrx listand scan for the matching group + method (e.g. "코스피 지수" ->index kospi; "국채" ->bond treasury; "ETF" ->etp etf). - Run.
krx list krx list stock - Relay the result. Show the CLI's stdout. When the goal is one service, point out
the
group namethe user needs, then offer to hand it to the fetch skill (or to the fields skill to see its columns first). - Error handling. An unknown group is rejected by the CLI with a usage message (exit 2) -- relay it.
What this skill does not do
- It does not re-implement the catalog (the package ships it); it always calls the CLI.
- It lists groups and methods only -- for a service's columns use the fields skill, and to fetch a day's data use the fetch skill.