Yann Long

iFind http API

資料分析v1.0.0
作者:Yann Long更新於 2026-05-11ifind@clawhub_yannlong/ifind
競品分析

據 AlphaMoat 統計,截至 2026-09,iFind http API 累計下載 1,574 次、獲 1 個星標,在全部 5,078 個 AI 技能中排名第 4,722 位,在「資料分析」分類(399 個)中排名第 371 位。

累計安裝
141
累計下載
1574
星標
1
全站排名
#4,722
全站前 93% · 「資料分析」前 93%
平台累計安裝累計下載星標評論
ClawHub ↗30110312
SkillHub ↗14115741—

各平台的計數口徑不同,統計時間不一致。

這個技能是做什麼的

介面覆蓋行情、宏觀、基金、日曆、報告和組合等資訊。請求前應核驗 API 端點、許可權範圍及 refresh token 的安全儲存;保護令牌,並對資料來源和時間戳進行復核,避免將結果當作個性化投資建議。 需要 Python requests 和已授權 refresh token;核對介面及查詢範圍,避免洩露憑據。

資料釋出於 2026-10-29

可以用來做什麼

  • 查詢金融與宏觀資料
  • 獲取基金、日曆或報告資訊
  • 整理組合相關資料

什麼時候用

  • 需要複用本地 iFinD HTTP 封裝時
  • 任何 API 請求前確認授權和令牌儲存,並在引用資料時核對來源與時間

示例提示詞

以下是根據技能文件生成的示例,不代表實際執行結果。

概述 iFinD 查詢能力,並說明呼叫 API 前和使用結果時需要核驗什麼。

月度資料趨勢

累計下載1574
22394916742026-03 · 累計下載 3232026-05 · 累計下載 6862026-07 · 累計下載 10082026-08 · 累計下載 11622026-09 · 累計下載 157426-0326-09
星標1
0122026-03 · 星標 12026-05 · 星標 12026-07 · 星標 12026-08 · 星標 12026-09 · 星標 126-0326-09

2026-09 起統計方法調整:同名技能按作者分別統計,並覆蓋全部技能。圖中虛線為調整前的月份,與之後的資料不直接比較,也不計算跨越調整的增長。 該技能有同名的其他版本,調整前的資料歸屬當前下載量最大的這一個。

月份累計下載環比星標
2026-091574—1
2026-081162+15.3%1
2026-071008—1
2026-05686—1
2026-03323—1

SKILL.md 原文

以下是作者釋出的原始檔案,按純文字顯示,本站未做修改或稽核;其中的連結不可點選,命令請核實後再執行。抓取於 2026-10-23。

4.6 KB · ClawHub v1.0.0
---
name: ifind
description: |
  Use a local Python wrapper around the official iFinD QuantAPI HTTP endpoints on quantapi.51ifind.com. Use when the user wants iFinD market, macro, fund, code-conversion, calendar, report, or portfolio data through HTTP without downloading third-party binaries. This skill is especially appropriate when a local `ifind_api.py` wrapper or custom iFinD HTTP integration should be reused, and when refresh_token acquisition and secure local storage must be checked before any API call.
---

# iFinD

Use this skill to query iFinD via the local Python wrapper in `scripts/ifind_api.py`.
展開全部(共 130 行)
## Environment preparation

Before first use, verify Python dependencies.

Required runtime dependency:
- `requests`

A pinned dependency file is provided at `scripts/requirements.txt`.

Check quickly with:

```bash
python3 -c "import requests; print(requests.__version__)"
```

If missing, install it before running any API script:

```bash
python3 -m pip install -r scripts/requirements.txt
```

If the environment is externally managed, prefer a virtual environment, but installing `requests` is allowed for this skill when needed.

## First rule: confirm refresh_token before querying

Before any data call:

1. Check token status with:
   `python3 scripts/ifind_token_store.py status`
2. If missing, prefer letting the agent obtain it directly from the official site:
   - open `https://quantapi.51ifind.com`
   - log in with the user's existing session, or ask the user to complete login if interactive approval is needed
   - go to the account information page
   - locate the `refresh_token`
3. Store it only through:
   `python3 scripts/ifind_token_store.py set --token '<TOKEN>'`
4. Only fall back to asking the user to provide the token if the browser path is unavailable or login cannot be completed.

Never ask the user to paste shell commands that would echo the token back into chat. Never print the token after storing it.

## Preferred token acquisition workflow

Prefer this order:

1. Browser login to `https://quantapi.51ifind.com` and read the token from account information
2. iFinD 超级命令客户端 → 工具 → `refresh_token` 查询
3. Ask the user directly only as a fallback

If browser automation is used, keep the flow minimal and do not browse unrelated pages. Once the token is found, store it immediately and stop exposing it in further output.

## Token storage policy

- Storage path: `~/.openclaw/skills/ifind/credentials.json`
- File permission target: owner read/write only (`600` on POSIX)
- The store script writes the file and tightens permissions automatically.
- The request script reads the refresh_token from that file unless `IFIND_REFRESH_TOKEN` is already present in the environment.
- Prefer the stored token over hardcoding tokens into code or notes.

## Quick workflow

### 1. Verify dependencies and token state

Run:

```bash
python3 -c "import requests; print(requests.__version__)"
python3 scripts/ifind_token_store.py status
```

If `requests` is missing, install it first:

```bash
python3 -m pip install -r scripts/requirements.txt
```

If the token is missing, obtain it through the preferred browser workflow and store it first.

### 2. Choose a calling path

- For direct endpoint calls, use `scripts/ifind_request.py endpoint`
- For common market-data work, use `scripts/ifind_request.py preset`
- For Python integration or patching, read `scripts/ifind_api.py`
- For endpoint details and payload shape, read `references/iFind_API_Reference.md`

### 3. Run the query

Examples:

```bash
python3 scripts/ifind_request.py preset realtime \
  --codes '300033.SZ,600000.SH' \
  --indicators 'open,high,low,latest,changeRatio,volume,amount'

python3 scripts/ifind_request.py preset ohlcv \
  --codes '000300.SH' \
  --startdate '2025-01-01' \
  --enddate '2025-03-01'

python3 scripts/ifind_request.py endpoint get_thscode \
  --payload '{"seccode":"300033","functionpara":{"mode":"seccode","sectype":"","market":"","tradestatus":"0","isexact":"0"}}'
```

## Output discipline

When using returned data in analysis:

- state the endpoint used
- include the symbol universe / code list
- include the requested date range or timestamp
- include the returned `perf`, `dataVol`, or other useful metadata when relevant
- if the API returns an error, surface the error code and message rather than guessing

## References

- `references/iFind_API_Reference.md`: local API wrapper reference and examples from the user
- `references/token-and-storage.md`: refresh_token acquisition and storage procedure
- `scripts/ifind_api.py`: local Python wrapper
- `scripts/ifind_request.py`: CLI for endpoint/preset calls
- `scripts/ifind_token_store.py`: token status/set/remove helper

「資料分析」分類下的熱門技能

資料月份:2026-09 · 下載/星標/安裝數聚合自公開技能註冊庫(ClawHub、SkillHub),按月更新。口徑說明見資料方法。