China iFinD Skill(同花顺Skill)

同花顺 iFinD (51ifind.com) 金融数据查询。支持 A 股/基金/债券/期货/指数的实时行情、历史行情、财务指标、宏观经济数据等 18 个 API 接口。 Chinese financial data query skill powered by THS iFinD (51ifind.com) A...

MIT-0 · Free to use, modify, and redistribute. No attribution required.
0 · 42 · 0 current installs · 0 all-time installs
duplicate of @sinabs/ifind-cn
MIT-0
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
Name/description, SKILL.md, API reference and the Python script all consistently implement calls to iFinD (quantapi.51ifind.com). The single required env var (IFIND_REFRESH_TOKEN) is exactly what the API requires. No unrelated credentials, hosts, or binaries are requested.
Instruction Scope
Runtime instructions explicitly require the refresh token, fetch an access_token from the official API, call endpoints under quantapi.51ifind.com, and log calls to a local .data directory. The SKILL.md/REFERENCE instruct the agent to stop if no token is configured and to ask the user to provide it (including a sed example to write ~/.openclaw/skills/ifind-api/.env). Asking the user to paste a secret into chat is operationally necessary but should be surfaced to users as a privacy risk.
Install Mechanism
No install spec (instruction-only plus one Python script) — nothing is downloaded from external URLs or installed system-wide. The included Python script uses only the standard library.
!
Credentials
The skill requires a sensitive IFIND_REFRESH_TOKEN. The docs and code store tokens unencrypted on disk: refresh token may be written into the skill's .env (references show sed writing to ~/.openclaw/skills/ifind-api/.env) and access_token is cached in .data/access_token; logs are written to .data/ifind.log. These are reasonable for a client but are sensitive — users must trust the skill and secure the skill directory (file permissions, remove secrets when not needed). The SKILL.md explicitly asks users to paste the refresh_token into chat or write it into .env, which is a privacy concern if the user does not trust the skill or the agent.
Persistence & Privilege
always is false and the skill does not request system-wide changes or modify other skills. It persists local state within its own skill directory (.env, .data) which is normal for a client wrapper.
Assessment
This skill is coherent for querying the iFinD API, but it requires your IFIND_REFRESH_TOKEN (a sensitive secret). Only provide that token if you trust the skill and the host. Prefer to set the token via a secure local mechanism (e.g., create ~/.openclaw/skills/ifind-api/.env yourself with restrictive permissions) rather than pasting it directly into a chat. After use, consider removing the token and cached access_token (.data/access_token) and inspect the local log (.data/ifind.log). Verify network calls go to quantapi.51ifind.com and review the script if you need higher assurance.

Like a lobster shell, security has layers — review code before you run it.

Current versionv1.0.1
Download zip
latestvk9712e5antffeajw99b6wzqzg9830cb7

License

MIT-0
Free to use, modify, and redistribute. No attribution required.

Runtime requirements

EnvIFIND_REFRESH_TOKEN

SKILL.md

iFinD 金融数据查询

基于同花顺 iFinD (51ifind.com) 量化数据接口,覆盖 A 股、基金、债券、期货、指数等全品类金融数据。

运行机制

  1. Token 获取:使用用户提供的 IFIND_REFRESH_TOKEN 向 iFinD 官方 API 获取 access_token,缓存在本地 .data/access_token(24 小时 TTL)。
  2. API 调用:携带 access_token 调用 quantapi.51ifind.com 量化数据接口,返回 JSON 结果。
  3. 自动重试:当 token 过期(errorcode -1302)时自动刷新并重试一次。
  4. 日志:调用记录写入 .data/ifind.log(滚动日志,1MB 上限)。

本脚本仅与 iFinD 官方 API(quantapi.51ifind.com)通信,不连接任何第三方服务。

支持的 API

#APIEndpoint用途
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_poolREITs、龙虎榜等专题数据
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 前,先按 API_REFERENCE.md 中「Token 配置」章节检查并配置 IFIND_REFRESH_TOKEN

如果未配置,停止执行,向用户提示:

使用 iFinD 金融数据查询需要你的 refresh_token。获取方式:

请把你的 refresh_token 发给我,我帮你配置好。

参考资料

  • API_REFERENCE.md - Token 配置、调用方式、18 个 API 完整参数和示例

Files

3 total
Select a file
Select a file to preview.

Comments

Loading comments…