Research & Science v0.1.0

bank-of-korea-ecos-cli

Minimal command-line client for the Bank of Korea Economic Statistics System (ECOS) Open API.

chloepark85 更新于 2026-04-22 1 浏览
下载 SKILL

技能说明

Minimal command-line client for the Bank of Korea Economic Statistics System (ECOS) Open API.

使用场景

Minimal command-line client for the Bank of Korea Economic Statistics System (ECOS) Open API.

直接复制以下提示词,发送给你的 AI 助手即可完成安装。

帮我下载并安装这个SKILL:https://skillhub.cstcloud.cn/download/bank-of-korea-ecos-cli
  1. 点击上方「下载 SKILL」按钮,获取技能压缩包。
  2. 将压缩包解压到你的 Agent 技能目录。
  3. 重启客户端后即可在技能列表中选择该技能。

技能文件内容

4 个文件 · 20 kB
SKILL.md text/markdown
---
name: Bank of Korea ECOS CLI
slug: bank-of-korea-ecos-cli
version: 0.1.0
summary: CLI for Bank of Korea ECOS Open API — list statistic tables and fetch time series (A/S/Q/M/D)
license: MIT
tags: [latest]
metadata:
  openclaw:
    requires:
      env:
        - BOK_API_KEY
    primaryEnv: BOK_API_KEY
---

# Bank of Korea ECOS CLI

Minimal command-line client for the Bank of Korea Economic Statistics System (ECOS) Open API.

- List available statistic tables
- Fetch time series by statistic code and frequency (A,S,Q,M,D)
- JSON output, suitable for piping to jq or saving to files

## Installation

Clone and run in a virtualenv (or install once on your host/agent image):

```bash
python -m venv .venv && source .venv/bin/activate
pip install -e .
```

## Usage

Environment variables:
- BOK_API_KEY (required) — your ECOS API key
- BOK_LANG (optional) — `kr` or `en` (default: `kr`)

Examples:

```bash
# Help
ecos-cli -h

# List statistic tables (first 1000)
ecos-cli table-list | jq '.[] | .[]? // .'

# Fetch a monthly time series for a statistic code between start/end dates
ecos-cli series 722Y001 M 202001 202412 | jq .
```

Notes:
- Date formats depend on the cycle: `YYYY` for A/S, `YYYYQQ` for Q (ECOS accepts `YYYYQ#` in some cases), `YYYYMM` for M, `YYYYMMDD` for D.
- Output structure is a direct passthrough of the ECOS JSON response.

## API references
- ECOS API portal: https://ecos.bok.or.kr/api/
- StatisticTableList: `/StatisticTableList/{API_KEY}/json/{lang}/{start}/{end}/`
- StatisticSearch: `/StatisticSearch/{API_KEY}/json/{lang}/{start}/{end}/{STAT_CODE}/{CYCLE}/{START}/{END}/`

文件内容直接读取自技能仓库,仅供安装前审阅;以实际下载的压缩包为准。