Ifind Data logo

Ifind Data

Community
10e9928a
ifind-data

基于同花顺 iFind API 的金融数据查询技能。用于获取 A 股、港股、美股的股票行情、基金净值、指数数据、财务报表等。触发场景:(1) 查询股票实时行情或历史价格,(2) 获取基金净值和业绩数据,(3) 查询指数成分股和估值,(4) 使用自然语言选股(问财),(5) 获取财务数据和估值指标。支持本地 SDK 和 HTTP API 两种调用方式。

Overview

Publisher10e9928a
Repositoryifind-data
Skill nameifind-data
Stars
45
Forks
6
Bundled files
6
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 6 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by 10e9928a on GitHub. Read the source before you install it.

Installation

Install the Ifind Data AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/10e9928a/ifind-data/tree/main/ifind-data
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/10e9928a/ifind-data.git /tmp/ifind-data
mkdir -p .claude/skills
cp -r /tmp/ifind-data/ifind-data .claude/skills/ifind-data
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Ifind Data in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Ifind Data on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Ifind Data is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

iFind Data

基于同花顺 iFind API 的金融数据查询技能,提供股票、基金、指数等金融数据的查询功能。

快速开始

环境配置

  1. 复制 assets/env.example 为 .env,填入认证信息:

    IFIND_USERNAME=your_username
    IFIND_PASSWORD=your_password
  2. 安装依赖:

    bash
    pip install requests pandas numpy python-dotenv loguru
  3. (可选)安装本地 SDK:从 https://quantapi.10jqka.com.cn 下载 iFinDPy

基本用法

python
from scripts.ifind_client import IFindClient

# 创建客户端并登录
client = IFindClient()
client.login()

# 获取股票收盘价
data = client.get_basic_data('000001.SZ', 'ths_close_price_stock', '2024-01-15,100')

# 获取实时行情
data = client.get_realtime_quotes(['000001.SZ', '600000.SH'])

# 问财自然语言查询
data = client.wencai_query('市值大于1000亿的股票', 'stock')

数据查询工作流

  1. 确定查询类型:

    • 单日数据? → 使用 get_basic_data()
    • 历史序列? → 使用 get_date_serial()
    • 实时行情? → 使用 get_realtime_quotes()
    • 自然语言选股? → 使用 wencai_query()
  2. 构建查询参数:

    • 证券代码格式:000001.SZ(深交所)、600000.SH(上交所)
    • 日期格式:YYYY-MM-DD 或 YYYYMMDD
  3. 执行查询并处理返回的 DataFrame

核心功能

股票数据查询

python
# 获取收盘价
client.get_basic_data('000001.SZ', 'ths_close_price_stock', '2024-01-15,100')

# 获取历史价格
client.get_date_serial('000001.SZ', 'ths_close_price_stock', 'Fill:Blank', '2024-01-01', '2024-01-15')

# 获取估值数据
client.get_basic_data('000001.SZ', 'ths_pe_stock,ths_pb_stock', '2024-01-15')

实时行情

python
# 获取最新价
client.get_realtime_quotes('000001.SZ', 'latest,changeRatio,volume')

# 获取 Level2 盘口
client.get_realtime_quotes('000001.SZ', 'latest,bid1,bid2,bid3,bid4,bid5,ask1,ask2,ask3,ask4,ask5')

问财查询

python
# 条件选股
client.wencai_query('市盈率小于20且ROE大于15%的股票', 'stock')

# 获取涨停股
client.wencai_query('今日涨停的股票', 'stock')

# 获取主力资金流向
client.wencai_query('主力资金流入的股票', 'stock')

指数和基金

python
# 获取指数成分股
client.get_data_pool('p03291', 'date=20240115;blockname=001005261', 'p03291_f001:Y,p03291_f002:Y')

# 获取基金净值
client.get_basic_data('000001.OF', 'ths_unit_nav_fund', '2024-01-15')

常用指标速查

简称指标代码说明
收盘价ths_close_price_stock日收盘价
市盈率ths_pe_stockPE
市净率ths_pb_stockPB
总市值ths_market_value_stock市值
ROEths_roe_stock净资产收益率

更多指标参见 references/indicators.md

板块代码

简称代码
全部A股001005010
沪深300001005261
中证500001005262
上证50001005260

更多板块代码参见 references/block_codes.md

资源

  • scripts/ifind_client.py - iFind API 客户端,提供所有数据查询方法
  • scripts/http_client.py - HTTP API 客户端,无需安装本地 SDK
  • references/indicators.md - 完整指标代码参考
  • references/block_codes.md - 板块代码参考
  • references/api_examples.md - API 调用示例
  • assets/env.example - 环境变量配置模板

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Ifind Data AI skill do?

基于同花顺 iFind API 的金融数据查询技能。用于获取 A 股、港股、美股的股票行情、基金净值、指数数据、财务报表等。触发场景:(1) 查询股票实时行情或历史价格,(2) 获取基金净值和业绩数据,(3) 查询指数成分股和估值,(4) 使用自然语言选股(问财),(5) 获取财务数据和估值指标。支持本地 SDK 和 HTTP API 两种调用方式。

Why use Ifind Data on TypingMind?

Because you install it once and use it with any model. Ifind Data is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Ifind Data in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/10e9928a/ifind-data/tree/main/ifind-data. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Ifind Data?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Ifind Data?

As many as you like. As long as a model supports skills, you can use Ifind Data with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Ifind Data AI skill free?

It is published on GitHub by 10e9928a. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇