← Back to Skills Marketplace
91
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install datayes-macro
Description
查询 Datayes/通联的宏观与行业指标数据。用户询问 GDP、CPI、PPI、PMI、M2、社融、利率、就业、贸易、产量、价格等宏观或行业时间序列时使用。优先通过仓库内 Python 脚本搜索候选指标并拉取明细,不要手写 HTTP 请求。
README (SKILL.md)
Datayes 宏观指标
前提条件
1. 获取 Datayes Token
访问 https://r.datayes.com/auth/login 登录 Datayes 账号,并在 Datayes 控制台获取可撤销的 API token。
2. 配置 Token
macOS / Linux:
export DATAYES_TOKEN='your-token'
Windows PowerShell:
$env:DATAYES_TOKEN = "your-token"
Windows CMD:
set DATAYES_TOKEN=your-token
直接使用
- 只用
python3 scripts/datayes_macro.py发请求。 - 只用 Python 标准库;不要额外安装依赖。
- 从环境变量
DATAYES_TOKEN读取 token。脚本会自动带上Authorization: Bearer \x3Ctoken>。 - 真实业务接口的
httpUrl会先校验主机名,只允许 Datayes 受信任域名,避免把 token 发送到非 Datayes 地址。
最小流程
- 先搜候选指标。
python3 scripts/datayes_macro.py search "M2同比" --top 5 --json
- 结果明确时,直接一步查数据。
python3 scripts/datayes_macro.py query "M2同比" --begin-date 20240101 --limit 12 --json
- 需要精确控制时,按 id 查明细。
python3 scripts/datayes_macro.py detail 1070000009 --begin-date 20240101 --limit 12 --json
选择规则
- 优先名称与用户问题最贴近的指标。
- 用户没说地区时,优先中国或全国口径。
- 用户没说频率时,优先月度,其次季度,再次年度。
- 搜索结果噪声大时,先缩短关键词再重试,例如去掉地区词或
同比/环比修饰词。
输出要求
- 明确写出指标名称、频率、单位、来源、最新值和最近若干期数据。
- 命中多个合理口径时,先列候选再确认,不要混合不同指标。
Usage Guidance
This skill appears to do what it says: run the included Python script which uses DATAYES_TOKEN to call Datayes APIs. Before installing, confirm that you are comfortable providing DATAYES_TOKEN to this code and that the token is revocable/limited in scope. Review the allowed host list in scripts/datayes_macro.py — it includes api.wmcloud.com in addition to Datayes domains; if you only want Datayes domains to ever receive the token, ask the author to remove or justify that host. Run the bundled tests locally and use a scoped or revocable token (not a long-lived high-privilege credential). If you share your environment or CI with others, avoid placing the token in a globally persistent env variable.
Capability Analysis
Type: OpenClaw Skill
Name: datayes-macro
Version: 1.0.0
The skill is a legitimate tool for querying financial macro indicators from Datayes. It includes a security-conscious implementation in `scripts/datayes_macro.py` that validates API endpoints against a hardcoded allowlist of trusted domains (`ALLOWED_HTTP_HOSTS`) before transmitting the sensitive `DATAYES_TOKEN`. The code uses only the Python standard library and lacks any indicators of malicious intent, such as data exfiltration to unauthorized endpoints or arbitrary command execution.
Capability Assessment
Purpose & Capability
Name/description match the code and runtime requirements: the skill is a Datayes macro-indicator fetcher, requires only python3 and DATAYES_TOKEN, and its code calls Datayes API endpoints. There are no unrelated credentials, binaries, or config paths requested.
Instruction Scope
SKILL.md instructs running the bundled Python script and to read DATAYES_TOKEN from the environment (matches the code). One minor inconsistency: the docs state that only Datayes trusted domains are allowed, but the code's ALLOWED_HTTP_HOSTS also includes api.wmcloud.com (a non-datayes domain). This may be intentional (a data source/datayes partner), but you should confirm whether that host is acceptable for your token to be sent to.
Install Mechanism
No install spec; this is instruction-plus-scripts only. The code is run directly with python3 and nothing is downloaded or written by an installer.
Credentials
The skill requires a single environment variable (DATAYES_TOKEN) which is appropriate for calling Datayes APIs. The script reads only DATAYES_TOKEN for authorization and does not request other secrets.
Persistence & Privilege
always is false, the skill is user-invocable, and it doesn't request persistent system-wide configuration or modify other skills. It does not require elevated privileges.
How to Use
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install datayes-macro - After installation, invoke the skill by name or use
/datayes-macro - Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
Initial release: Macro & industry data skill, replaces previous stock-oriented version
- Supports querying macroeconomic and industry indicators (e.g., GDP, CPI, M2, PMI) via Python scripts.
- New script datayes_macro.py for searching and retrieving indicator details and time series.
- Usage focused on Datayes macro API: search, query, and detail commands.
- Stock-specific scripts and documentation removed; only macro-related functionality retained.
- Updated documentation to reflect new command examples, selection, and output requirements.
Metadata
Frequently Asked Questions
What is Datayes 宏观指标?
查询 Datayes/通联的宏观与行业指标数据。用户询问 GDP、CPI、PPI、PMI、M2、社融、利率、就业、贸易、产量、价格等宏观或行业时间序列时使用。优先通过仓库内 Python 脚本搜索候选指标并拉取明细,不要手写 HTTP 请求。 It is an AI Agent Skill for Claude Code / OpenClaw, with 91 downloads so far.
How do I install Datayes 宏观指标?
Run "/install datayes-macro" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is Datayes 宏观指标 free?
Yes, Datayes 宏观指标 is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does Datayes 宏观指标 support?
Datayes 宏观指标 is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created Datayes 宏观指标?
It is built and maintained by Datayes (@datayes); the current version is v1.0.0.
More Skills