← Back to Skills Marketplace
bensema

东方财富日内行情 dfcf-stock-intraday

by bensema · GitHub ↗ · v1.0.2 · MIT-0
cross-platform ✓ Security Clean
467
Downloads
0
Stars
4
Active Installs
3
Versions
Install in OpenClaw
/install dfcf-stock-intraday
Description
使用东方财富 API 获取 A 股(沪市/深市)及指数的日内分时数据。当用户询问某只 A 股或指数的日内走势、分时数据、当日行情、实时价格、分时图数据时,必须使用此 skill。触发关键词包括:分时数据、日内数据、今日行情、分时走势、intraday、当日走势、东方财富获取数据。支持沪市(market=1)和深市...
README (SKILL.md)

东方财富日内分时数据 Skill

第一步:确定 secid

secid 格式为 {market}.{code},规则如下:

股票代码开头 市场 market 值 secid 示例
6 沪市 A 股 1 1.600519(贵州茅台)
03 深市 A 股 0 0.000858(步长制药)
000001 上证指数 1 1.000001
399001 深证成指 0 0.399001
399006 创业板指 0 0.399006

如果用户只说了股票名称,先推断代码,再按上表确定 secid。


第二步:执行 curl 请求

在 bash 中运行以下命令(将 \x3Csecid> 替换为实际值):

curl -s "https://push2.eastmoney.com/api/qt/stock/trends2/get?fields1=f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12,f13&fields2=f51,f52,f53,f54,f55,f56,f57,f58&ut=fb5fd1943c7b386f172d6893dbfba10b&ndays=1&iscr=1&secid=\x3Csecid>"

示例(上证指数):

curl -s "https://push2.eastmoney.com/api/qt/stock/trends2/get?fields1=f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12,f13&fields2=f51,f52,f53,f54,f55,f56,f57,f58&ut=fb5fd1943c7b386f172d6893dbfba10b&ndays=1&iscr=1&secid=1.000001"

第三步:解析 JSON 响应

检查返回是否正常

  • rc == 0data 不为 null → 正常,继续解析
  • data 为 null → secid 有误,告知用户检查代码和市场
  • 请求失败 → 提示网络问题

data 顶层字段

字段 含义
name 股票/指数名称
code 股票代码
preClose 昨收价
trendsTotal 分时数据总条数
trends 分时数据数组(见下)

trends 数组格式

每条字符串按逗号分隔,共 8 个字段:

时间(f51), 开盘价(f52), 现价/收盘价(f53), 最高价(f54), 最低价(f55), 成交量-手(f56), 成交额-元(f57), 均价(f58)

示例:

"2026-03-24 09:31,3850.95,3841.40,3852.03,3841.40,21144419,27208168960.00,3876.612"

第四步:输出数据

将解析结果以如下格式直接输出给用户:

【上证指数】(000001)当日分时数据
昨收价: 3813.28  |  共 256 条

时间     开盘      现价      最高      最低      成交量(手)    成交额(元)          均价
-------- -------- -------- -------- -------- ------------ ------------------- --------
09:15    3813.28  3813.28  3813.28  3813.28  0            0.00                3813.28
09:31    3850.95  3841.40  3852.03  3841.40  21144419     27208168960.00      3876.61
...
15:00    3880.86  3881.28  3881.42  3880.86  8194784      10308771840.00      3937.72

注意:

  • 时间只显示 HH:MM 部分(去掉日期前缀)
  • 均价保留 2 位小数
  • 非交易时间请求会返回上一交易日数据,需告知用户
  • 集合竞价阶段(9:15–9:25)成交量通常为 0,属正常现象
Usage Guidance
This skill appears to do what it says: call Eastmoney's public API, parse the JSON, and present intraday data. Before installing, consider: (1) the skill runs a shell curl command — ensure the agent environment has curl available or the skill metadata is updated to declare it; (2) the agent will make outbound network requests to push2.eastmoney.com, so verify you are comfortable with those requests (they may reveal which tickers you query to that endpoint); (3) the skill infers stock codes from names — double-check results for ambiguous names; and (4) because it executes shell commands, only enable in trusted agent environments. If you want stricter controls, request the skill be updated to use an internal HTTP client rather than invoking curl, or to explicitly declare required binaries.
Capability Analysis
Type: OpenClaw Skill Name: dfcf-stock-intraday Version: 1.0.2 The skill bundle is designed to fetch intraday stock market data from the legitimate Eastmoney (东方财富) API. It uses a standard curl command in SKILL.md to retrieve JSON data and provides clear instructions for the agent to parse and format the output for the user, with no evidence of data exfiltration, malicious execution, or prompt injection.
Capability Assessment
Purpose & Capability
The skill's name/description match the runtime instructions (it fetches intraday data from push2.eastmoney.com). One minor inconsistency: SKILL.md instructs running curl but the skill metadata lists no required binaries — the skill should declare 'curl' as a required binary or avoid shell commands. Otherwise the requested capabilities align with the purpose.
Instruction Scope
Instructions are narrowly focused: determine secid, call the Eastmoney API via curl, parse the returned JSON, and format output for the user. The instructions do not request unrelated files, environment variables, or external endpoints beyond Eastmoney.
Install Mechanism
This is an instruction-only skill with no install spec or code to download or execute. No installation-related risks are present.
Credentials
The skill requires no credentials, environment variables, or config paths. It only performs an unauthenticated HTTP GET to a public API, which is proportionate to its purpose.
Persistence & Privilege
The skill is not forced-always and does not request persistent privileges or modify other skills/config. Autonomous invocation is allowed (platform default) but not combined with other red flags.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install dfcf-stock-intraday
  3. After installation, invoke the skill by name or use /dfcf-stock-intraday
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.2
- 移除了港股支持,仅保留沪市(1)和深市(0)A股及主流指数分时数据查询。 - 使用 secid(市场.代码)统一接口格式,需根据股票/指数代码确定 market 值。 - 精简数据获取方式,仅通过东方财富 trends2 API 获取与解析数据,移除脚本与外部文档依赖。 - 详列标准 curl 调用及 JSON 解析方法,明确 trends 字段结构。 - 优化用户输出格式说明,并补充查询注意事项。
v1.0.1
- 修订文档中的示例脚本路径,将 `~/.workbuddy/skills/stock-intraday/scripts` 统一为更简明的 `scripts` - Python 调用和脚本使用说明中的路径同步更新,提升易用性和可读性 - 其余文档内容保持不变,核心功能无变动
v1.0.0
Initial release of dfcf-stock-intraday: - Provides intraday data for A-shares and Hong Kong stocks, including real-time prices, volume, and change percentages. - Supports market type auto-detection by stock code pattern. - Offers formatted and JSON data outputs. - Includes easy-to-use scripts and Python functions for data retrieval and trend parsing. - Documents data structure and usage instructions in detail.
Metadata
Slug dfcf-stock-intraday
Version 1.0.2
License MIT-0
All-time Installs 4
Active Installs 4
Total Versions 3
Frequently Asked Questions

What is 东方财富日内行情 dfcf-stock-intraday?

使用东方财富 API 获取 A 股(沪市/深市)及指数的日内分时数据。当用户询问某只 A 股或指数的日内走势、分时数据、当日行情、实时价格、分时图数据时,必须使用此 skill。触发关键词包括:分时数据、日内数据、今日行情、分时走势、intraday、当日走势、东方财富获取数据。支持沪市(market=1)和深市... It is an AI Agent Skill for Claude Code / OpenClaw, with 467 downloads so far.

How do I install 东方财富日内行情 dfcf-stock-intraday?

Run "/install dfcf-stock-intraday" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is 东方财富日内行情 dfcf-stock-intraday free?

Yes, 东方财富日内行情 dfcf-stock-intraday is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does 东方财富日内行情 dfcf-stock-intraday support?

东方财富日内行情 dfcf-stock-intraday is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created 东方财富日内行情 dfcf-stock-intraday?

It is built and maintained by bensema (@bensema); the current version is v1.0.2.

💬 Comments