eastmoney_financial_data
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese东方财富金融数据skill (eastmoney_financial_data)
Eastmoney Financial Data Skill (eastmoney_financial_data)
通过文本输入查询金融相关数据(股票、板块、指数等),接口返回 JSON格式内容。
Query financial-related data (stocks, sectors, indices, etc.) via text input, and the interface returns content in JSON format.
使用方式
Usage
-
首先检查环境变量是否存在:
EASTMONEY_APIKEYbashecho $EASTMONEY_APIKEY如果不存在,提示用户在东方财富Skills页面(https://marketing.dfcfs.com/views/finskillshub/indexuNdYscEA?appfenxiang=1)获取apikey并设置到环境变量。⚠️ 安全注意事项- 外部请求: 本 Skill 会将您的查询文本发送至东方财富官方 API 域名 ( ) 以获取金融数据。
mkapi2.dfcfs.com - 凭据保护: API Key 仅通过环境变量 在服务端或受信任的运行环境中使用,不会在前端明文暴露。
EASTMONEY_APIKEY
- 外部请求: 本 Skill 会将您的查询文本发送至东方财富官方 API 域名 (
-
使用POST请求调用接口:bash
curl -X POST --location 'https://mkapi2.dfcfs.com/finskillshub/api/claw/query' \ --header 'Content-Type: application/json' \ --header "apikey: $EASTMONEY_APIKEY" \ --data '{"toolQuery":"用户的查询内容"}'
-
First check if the environment variableexists:
EASTMONEY_APIKEYbashecho $EASTMONEY_APIKEYIf it does not exist, prompt the user to obtain the apikey on the Eastmoney Skills page (https://marketing.dfcfs.com/views/finskillshub/indexuNdYscEA?appfenxiang=1) and set it to the environment variable.⚠️ Security Notes- External Requests: This Skill will send your query text to Eastmoney's official API domain ( ) to obtain financial data.
mkapi2.dfcfs.com - Credential Protection: The API Key is only used on the server side or in trusted running environments via the environment variable , and will not be exposed in plaintext on the frontend.
EASTMONEY_APIKEY
- External Requests: This Skill will send your query text to Eastmoney's official API domain (
-
Call the interface using a POST request:bash
curl -X POST --location 'https://mkapi2.dfcfs.com/finskillshub/api/claw/query' \ --header 'Content-Type: application/json' \ --header "apikey: $EASTMONEY_APIKEY" \ --data '{"toolQuery":"User's query content"}'
适用场景
Applicable Scenarios
当用户查询以下类型的内容时使用本skill:
- 行情类数据:股票、行业、板块、指数、基金、债券的实时行情、主力资金流向、估值等数据
- 财务类数据:上市公司与非上市公司的基本信息、财务指标、高管信息、主营业务、股东结构、融资情况等数据
- 关系与经营类数据:股票、非上市公司、股东及高管之间的关联关系数据,以及企业经营相关数据
Use this Skill when users query the following types of content:
- Market Data: Real-time quotes, main capital flows, valuations and other data of stocks, industries, sectors, indices, funds, bonds
- Financial Data: Basic information, financial indicators, executive information, main business, shareholder structure, financing status and other data of listed and non-listed companies
- Relationship and Operation Data: Associated relationship data between stocks, non-listed companies, shareholders and executives, as well as enterprise operation-related data
数据限制说明
Data Limitation Notes
请谨慎查询大数据范围的数据,如某只股票3年的每日最新价,可能会导致返回内容过多,模型上下文爆炸问题。
Please be cautious when querying large-scope data, such as the daily latest price of a certain stock over 3 years, which may lead to excessive returned content and model context explosion issues.
返回结构说明
Return Structure Description
一级核心路径:data
dataFirst-level core path: data
data| 字段路径 | 类型 | 核心释义 |
|---|---|---|
| 字符串 | 查数请求唯一标识 ID,关联单次查询任务 |
| 数组 | 【核心】标准化后的证券指标数据列表,每个元素对应1 个证券 + 1 个指标的完整数据 |
| 数组 | 原始未加工的证券指标数据列表,与标准化列表结构完全一致,供原始数据调用 |
| 对象 | 本次查数的查询条件,记录查询关键词、时间范围等 |
| 数组 | 本次查询关联的证券主体汇总信息,去重后展示所有涉事证券的基础属性 |
| Field Path | Type | Core Definition |
|---|---|---|
| String | Unique ID for the data query request, associated with a single query task |
| Array | 【Core】Standardized list of securities indicator data, each element corresponds to complete data of 1 security + 1 indicator |
| Array | Raw unprocessed list of securities indicator data, with exactly the same structure as the standardized list, for raw data calls |
| Object | Query conditions for this data query, recording query keywords, time range, etc. |
| Array | 【Summary of securities entities associated with this query】, displaying basic attributes of all involved securities after deduplication |
二级核心路径:data.dataTableDTOList[]
(单指标对象,表格核心)
data.dataTableDTOList[]Second-level core path: data.dataTableDTOList[]
(Single indicator object, core of the table)
data.dataTableDTOList[]数组内每个对象为独立的指标数据单元,包含证券信息 + 表格数据 + 指标元信息 + 证券标签四大部分。
Each object in the array is an independent indicator data unit, including four parts: securities information + table data + indicator meta-information + securities tags.
2.1 证券基础信息
2.1 Basic Securities Information
| 字段路径 | 类型 | 核心释义 |
|---|---|---|
| 字符串 | 证券完整代码(含市场标识,如 300059.SZ) |
| 字符串 | 证券全称(含代码,如东方财富 (300059.SZ)) |
| 字符串 | 本指标数据的标题,概括查询结果(如东方财富最新价) |
| Field Path | Type | Core Definition |
|---|---|---|
| String | Full securities code (including market identifier, e.g., 300059.SZ) |
| String | Full name of the security (including code, e.g., Eastmoney (300059.SZ)) |
| String | Title of this indicator data, summarizing the query result (e.g., Eastmoney's latest price) |
2.2 表格数据核心(渲染用)
2.2 Core Table Data (for rendering)
| 字段路径 | 类型 | 核心释义 | 表格逻辑 |
|---|---|---|---|
| 对象 | 【核心】标准化表格数据,键 = 指标编码,值 = 指标数值数组; | 键为指标列, |
| 对象 | 原始表格数据,与 | 同 |
| 对象 | 【核心】列名映射关系,将指标编码 / 内置字段转为业务中文名(如 f2→最新价) | 解决表格列名 “编码转中文” 的问题, |
| 数组 | 指标列的展示排序,元素为指标编码(如 [f2]) | 控制表格中多个指标列的前后顺序,单指标时为单元素数组 |
| Field Path | Type | Core Definition | Table Logic |
|---|---|---|---|
| Object | 【Core】Standardized table data, key = indicator code, value = array of indicator values; | Key is indicator column, |
| Object | Raw table data, same structure as | Same as |
| Object | 【Core】Column name mapping relationship, converting indicator codes / built-in fields to business Chinese names (e.g., f2→latest price) | Solves the problem of "code to Chinese" for table column names, |
| Array | Display order of indicator columns, elements are indicator codes (e.g., [f2]) | Controls the order of multiple indicator columns in the table, single-element array for single indicator |
2.3 指标元信息(属性 / 规则)
2.3 Indicator Meta-information (Attributes / Rules)
| 字段路径 | 类型 | 核心释义 |
|---|---|---|
| 字符串 | 数据来源类型(如行情数据 / 数据浏览器) |
| 字符串 | 数据类型枚举值(HQ = 行情,DATA_BROWSER = 数据浏览器) |
| 对象 | 【核心】当前指标的详细元信息,含指标编码、名称、查询时间、粒度等 |
| Field Path | Type | Core Definition |
|---|---|---|
| String | Data source type (e.g., market data / data browser) |
| String | Enumerated value of data type (HQ = market quotes, DATA_BROWSER = data browser) |
| Object | 【Core】Detailed meta-information of the current indicator, including indicator code, name, query time, granularity, etc. |
2.4 证券标签信息(主体属性)
2.4 Securities Tag Information (Entity Attributes)
| 字段路径 | 类型 | 核心释义 |
|---|---|---|
| 对象 | 本指标关联证券的详细主体属性(如证券类型、市场、简称等) |
| Field Path | Type | Core Definition |
|---|---|---|
| Object | Detailed entity attributes of the securities associated with this indicator (e.g., securities type, market, abbreviation, etc.) |
三级核心路径
Third-level core path
3.1 指标元信息:dataTableDTOList[].field
dataTableDTOList[].field3.1 Indicator Meta-information: dataTableDTOList[].field
dataTableDTOList[].field| 字段路径 | 类型 | 核心释义 |
|---|---|---|
| 字符串 | 指标唯一编码 |
| 字符串 | 指标业务中文名(如最新价 / 收盘价) |
| 字符串 | 本次查询的时间范围(开始 / 结束) |
| 字符串 | 数据粒度(DAY = 日度,MIN = 分钟等) |
| Field Path | Type | Core Definition |
|---|---|---|
| String | Unique code of the indicator |
| String | Business Chinese name of the indicator (e.g., latest price / closing price) |
| String | Time range of this query (start / end) |
| String | Data granularity (DAY = daily, MIN = minute, etc.) |
3.2 证券主体属性:dataTableDTOList[].entityTagDTO
dataTableDTOList[].entityTagDTO3.2 Securities Entity Attributes: dataTableDTOList[].entityTagDTO
dataTableDTOList[].entityTagDTO| 字段路径 | 类型 | 核心释义 |
|---|---|---|
| 字符串 | 证券纯代码(无市场标识,如 300059) |
| 字符串 | 市场标识(.SZ = 深交所,.SH = 上交所) |
| 字符串 | 证券类型(如 A 股 / 港股 / 债券) |
| 字符串 | 证券完整中文名(如东方财富) |
| Field Path | Type | Core Definition |
|---|---|---|
| String | Pure securities code (without market identifier, e.g., 300059) |
| String | Market identifier (.SZ = Shenzhen Stock Exchange, .SH = Shanghai Stock Exchange) |
| String | Securities type (e.g., A-shares / Hong Kong stocks / bonds) |
| String | Full Chinese name of the security (e.g., Eastmoney) |
示例
Example
python
import os
import requests
api_key = os.getenv("EASTMONEY_APIKEY")
if not api_key:
raise ValueError("请先设置EASTMONEY_APIKEY环境变量")
url = "https://mkapi2.dfcfs.com/finskillshub/api/claw/query"
headers = {
"Content-Type": "application/json",
"apikey": api_key
}
data = {
"toolQuery": "东方财富最新价"
}
response = requests.post(url, headers=headers, json=data)
response.raise_for_status()
result = response.json()
print(result)python
import os
import requests
api_key = os.getenv("EASTMONEY_APIKEY")
if not api_key:
raise ValueError("请先设置EASTMONEY_APIKEY环境变量")
url = "https://mkapi2.dfcfs.com/finskillshub/api/claw/query"
headers = {
"Content-Type": "application/json",
"apikey": api_key
}
data = {
"toolQuery": "东方财富最新价"
}
response = requests.post(url, headers=headers, json=data)
response.raise_for_status()
result = response.json()
print(result)异常处理
Exception Handling
- 如果数据结果为空,提示用户到东方财富妙想AI查询
- 如果请求失败,检查API Key是否正确,网络是否正常
- If the data result is empty, prompt the user to query on Eastmoney Miaoxiang AI
- If the request fails, check if the API Key is correct and if the network is normal