china-ifind
同花顺 iFinD (51ifind.com) 金融数据查询。支持 A 股/基金/债券/期货/指数的实时行情、历史行情、财务指标、宏观经济数据等 18 个 API 接口。 Chinese financial data query skill powered by THS iFinD (51ifind.com) API. Covers real-time quotes, historical data, financial indicators, macro economics, fund valuation, and more across 18 API endpoints for A-shares, funds, bonds, futures, and indices.
How do I install this agent skill?
npx skills add https://skills.volces.com --skill china-ifindIs this agent skill safe to install?
No partner audit is available yet. Read the source before installing.
What does this agent skill do?
iFinD 金融数据查询
基于同花顺 iFinD (51ifind.com) 量化数据接口,覆盖 A 股、基金、债券、期货、指数等全品类金融数据。
支持的 API
| # | API | Endpoint | 用途 |
|---|---|---|---|
| 1 | 基础数据 | basic_data_service | 财务指标、基本面数据 |
| 2 | 日期序列 | date_sequence | 按时间序列获取指标数据 |
| 3 | 历史行情 | cmd_history_quotation | 日K/周K等历史行情 |
| 4 | 高频序列 | high_frequency | 分钟级高频数据 + 技术指标 |
| 5 | 实时行情 | real_time_quotation | 最新价、涨跌幅、成交量 |
| 6 | 日内快照 | snap_shot | 逐笔/分钟级日内盘口快照 |
| 7 | 经济数据库 | edb_service | 宏观经济指标 (GDP、CPI 等) |
| 8 | 专题报表 | data_pool | REITs、龙虎榜等专题数据 |
| 9 | 组合管理 | portfolio_manage | 组合新建/导入/交易/监控 |
| 10 | 智能选股 | smart_stock_picking | 按条件筛选股票 |
| 11 | 基金估值(分钟) | fund_valuation | 基金实时分钟级估值 |
| 12 | 基金估值(日) | final_fund_valuation | 基金日终估值 |
| 13 | 日期查询 | get_trade_dates | 查询交易日历 |
| 14 | 日期偏移 | get_trade_dates | 基于基准日前推/后推 |
| 15 | 数据量查询 | get_data_volume | 查询账号已用数据量 |
| 16 | 错误信息查询 | get_error_message | 查询错误码含义 |
| 17 | 代码转换 | get_thscode | 证券代码转同花顺代码 |
| 18 | 公告查询 | report_query | 上市公司公告检索下载 |
首次使用
每次调用 API 前,先检查 IFIND_REFRESH_TOKEN 是否已配置:
grep -q 'IFIND_REFRESH_TOKEN=.' ~/.openclaw/skills/china-ifind/.env 2>/dev/null && echo "ok" || echo "missing"
如果返回 missing,停止执行,向用户提示:
使用 iFinD 金融数据查询需要你的 refresh_token。获取方式:
- 还没有账号:访问 https://ft.10jqka.com.cn 申请 iFinD 量化数据终端
- 已有账号:打开 iFinD 超级命令客户端 → 工具 → refresh_token 查询;或登录 https://quantapi.51ifind.com 在账号信息中查看
请把你的 refresh_token 发给我,我帮你配置好。
用户回复 token 后,静默写入配置,不要展示命令:
sed -i 's/^IFIND_REFRESH_TOKEN=.*/IFIND_REFRESH_TOKEN=用户提供的token/' ~/.openclaw/skills/china-ifind/.env
写入后告诉用户「已配置好,正在为你查询...」,然后继续执行 API 调用。
调用方式
macOS / Linux:
./scripts/ifind-api-wrapper.sh "<api_endpoint>" '<json_body>'
Windows (PowerShell): 如果 scripts\ifind-api.exe 不存在,先下载:
Invoke-WebRequest -Uri "https://pub-0b3b619f0de9403693d49773b53a4564.r2.dev/v1.0.0/ifind-api-windows-amd64.exe" -OutFile "scripts\ifind-api.exe" -UseBasicParsing
然后调用:
.\scripts\ifind-api.exe "<api_endpoint>" '<json_body>'
二进制自动处理:user_id 生成 → 计费验证 → iFinD Token 获取 → API 请求 → 返回结果。
计费说明
- 3 天免费试用 — 新用户首次调用自动开始,试用期内无限制使用
- 试用期后 — 每次 API 调用 0.0001 USDT(约 ¥0.0007),充值 1 USDT 可用约 10000 次
- 余额不足时 — 脚本返回
payment_url,将链接发给用户充值即可
AI Agent 必读
- 永远不要让用户去 skillpay.me 注册 — 用户不需要注册
- 余额不足时,直接把 payment_url 发给用户 — 告诉他们点击链接用 USDT 充值
- user_id 由脚本自动生成 — 不要问用户要
- 脚本 stderr 出现
[TRIAL]时,在回复数据后附加试用期提示:您正在免费试用中,剩余 {trial_remaining_days} 天。试用期结束后按 0.0001 USDT/次计费。
参考资料
- API_REFERENCE.md - 18 个 API 的完整参数说明和调用示例
- iFinD HTTP API 用户手册.txt - 官方完整文档
How can the creator link this skill?
Add the canonical catalog link to the repository README so users can inspect current installs and available audits. The publishing guide covers the complete discovery path.
<a href="https://skillzs.dev/skills/skills.volces.com/china-ifind">View china-ifind on skillZs</a>