← 返回 Skills 市场
446
总下载
1
收藏
1
当前安装
2
版本数
在 OpenClaw 中安装
/install cn-stock-announcements
功能描述
A tool to query Chinese listed company announcements from SZSE (Shenzhen Stock Exchange) and SSE (Shanghai Stock Exchange). Supports single/batch stock queri...
使用说明 (SKILL.md)
Chinese Stock Announcements (SZSE & SSE)
这个技能用于查询中国A股上市公司(上交所、深交所)的官方信息披露与公告。它可以作为独立脚本供人类或大模型使用,也可以作为 OpenClaw 插件直接集成在 Python 代码中。
使用场景
- 用户需要查询某只特定股票(如平安银行 000001、浦发银行 600000)的最新公告时。
- 用户想批量追踪多只股票的动向时。
- 用户想通过关键词(如"年报"、"重组"、"分红")来搜索两市所有相关的公告时。
- 用户需要限定特定的时间范围(精确到时分秒)来过滤公告时。
工作流程
当用户请求查询股票公告时,大模型应该直接调用本项目提供的 stock_plugin.py 脚本来获取数据,并格式化输出给用户。
方式一:命令行/脚本直接调用 (CLI)
你可以直接执行 Python 代码来调用该模块:
# 例子:查询包含关键词且在指定时间内的公告
python3 -c "
import json
from stock_plugin import StockAnnouncementPlugin
plugin = StockAnnouncementPlugin()
res = plugin.query_announcements(
keyword='年报',
start_date='2024-03-15 00:00:01',
end_date='2024-03-16 00:00:01',
limit=5
)
print(json.dumps(res, indent=2, ensure_ascii=False))
"
方式二:在 OpenClaw 工作流中调用 (Python 代码编写)
如果用户要求你编写一段使用该功能的 OpenClaw 代码,你可以按照以下方式组织代码:
from openclaw2 import OpenClaw
from stock_plugin import StockAnnouncementPlugin
# 初始化 OpenClaw 客户端
client = OpenClaw.remote(api_key="your_api_key")
# 安装股票公告查询插件
client.use(StockAnnouncementPlugin())
# 让大模型 Agent 调用插件获取数据
results = client.pipeline([
"请帮我查询 000001 和 600000 从 2024-03-15 00:00:01 到 2024-03-16 00:00:01 发布关于「年报」的公告"
])
print(results[-1])
参数说明
StockAnnouncementPlugin.query_announcements 支持以下参数:
| 参数 | 类型 | 说明 | 示例 |
|---|---|---|---|
stock_codes |
List[str] |
股票代码列表(可选) | ["000001", "600000"] |
keyword |
str |
搜索关键词(可选) | "年报" |
start_date |
str |
起始时间(精确到秒或天) | "2024-03-15 00:00:01" 或 "2024-03-15" |
end_date |
str |
结束时间(精确到秒或天) | "2024-03-16 00:00:01" 或 "2024-03-16" |
limit |
int |
单个交易所返回的最大结果数 | 10 (默认) |
⚠️ 时间过滤规则注意:
- 深交所 (SZSE):原生 API 请求体支持传入日期(
YYYY-MM-DD)获取粗略范围,随后通过脚本在本地自动进行精确到时分秒的二次过滤筛选。 - 上交所 (SSE):原生 API 仅支持日期级别(
YYYY-MM-DD)的检索和返回,所以插件会自动截取传入时间的日期部分进行检索。上交所数据由于没有时分秒属性,不支持秒级精确过滤。
技能资源
stock_plugin.py:核心逻辑文件,包含StockAnnouncementPlugin类及沪深两市的抓取和过滤逻辑。使用标准 requests 库实现,无需复杂环境。
前置条件
需要安装 requests 库:
pip install requests
安全使用建议
This skill appears coherent and focused on fetching exchange announcements. Before installing, consider: 1) Network access: the plugin makes outbound requests to SZSE and SSE endpoints (note SZSE/SSE URLs used in the code and that some requests are plain HTTP), so ensure your environment permits these calls and that you trust those endpoints. 2) Rate limits and scraping policies: exchanges may throttle or block automated queries—use reasonable limits and caching. 3) No credentials are requested by the skill, so avoid supplying unrelated API keys or secrets to it. 4) If you require HTTPS-only traffic, review/modify the code to use secure endpoints where available. 5) As with any third-party code, review and run in a sandboxed environment if you have stricter security requirements.
功能分析
Type: OpenClaw Skill
Name: cn-stock-announcements
Version: 1.0.1
The skill is a legitimate tool for querying Chinese stock announcements from the Shenzhen (SZSE) and Shanghai (SSE) stock exchanges. The implementation in `stock_plugin.py` uses standard HTTP requests to official exchange API endpoints and contains no evidence of data exfiltration, malicious execution, or prompt injection.
能力评估
Purpose & Capability
The name/description match the provided Python implementation: the plugin queries SZSE and SSE announcement endpoints, supports stock lists, keywords, and date ranges. Required files (stock_plugin.py, requirements.txt) and the API usage align with the described functionality.
Instruction Scope
SKILL.md instructs the agent to call stock_plugin.py or integrate via OpenClaw; it does not instruct reading unrelated system files, environment variables, or exfiltrating data. Example code includes an OpenClaw API key parameter, but that is a generic example for client usage and not a requirement of the skill.
Install Mechanism
No install-time downloads or extract steps are declared (instruction-only). A requirements.txt lists requests and openclaw, which is proportionate. There are no third-party URLs or archive downloads in the install process.
Credentials
The skill declares no required environment variables or credentials. The code performs only outbound HTTP(S) requests to official exchange endpoints and does not attempt to read secrets or local config.
Persistence & Privilege
always is false and the plugin registers itself only with a client-provided register_tool method (no forced global installation or modification of other skills). It does not persist or modify other agent/system configurations.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install cn-stock-announcements - 安装完成后,直接呼叫该 Skill 的名称或使用
/cn-stock-announcements触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.1
- Removed README.md file from the project.
- No changes to functionality or usage.
v1.0.0
Initial release of cn-stock-announcements.
- Query official company announcements for SZSE and SSE-listed Chinese stocks.
- Supports single or batch stock code queries, keyword searches, and precise time-range filtering.
- CLI and OpenClaw workflow usage are both documented.
- Allows filtering by keywords (e.g., "annual report") and by time down to the second for SZSE; SSE supports date-only filtering.
- Requires only the requests library; no complex dependencies.
元数据
常见问题
A股上市公司公告 是什么?
A tool to query Chinese listed company announcements from SZSE (Shenzhen Stock Exchange) and SSE (Shanghai Stock Exchange). Supports single/batch stock queri... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 446 次。
如何安装 A股上市公司公告?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install cn-stock-announcements」即可一键安装,无需额外配置。
A股上市公司公告 是免费的吗?
是的,A股上市公司公告 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
A股上市公司公告 支持哪些平台?
A股上市公司公告 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 A股上市公司公告?
由 Stepeno(@noahstepheno)开发并维护,当前版本 v1.0.1。
推荐 Skills