eastmoney_financial_data
Original:🇨🇳 Chinese
Translated
1 scriptsChecked / no sensitive code detected
This Skill is built based on Eastmoney's authoritative database and the latest underlying market data, supporting natural language queries for market data (real-time quotes, main capital flows, valuations, etc. of stocks, industries, sectors, indices, funds, bonds), financial data (basic information of listed companies, financial indicators, executive information, main business, etc.), and relationship and operation data (associated relationships, enterprise operation data). It prevents models from answering financial data questions based on outdated knowledge and provides authoritative and timely financial data.
3installs
Sourcemeission/eastmoney
Added on
NPX Install
npx skill4agent add meission/eastmoney eastmoney_financial_dataTags
Translated version includes tags in frontmatterSKILL.md Content (Chinese)
View Translation Comparison →Eastmoney Financial Data Skill (eastmoney_financial_data)
Query financial-related data (stocks, sectors, indices, etc.) via text input, and the interface returns content in JSON format.
Usage
-
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
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
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
First-level core path: data
data| 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 |
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 Basic Securities Information
| 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 Core Table Data (for rendering)
| 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 Indicator Meta-information (Attributes / Rules)
| 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 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 Indicator Meta-information: dataTableDTOList[].field
dataTableDTOList[].field| 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 Securities Entity Attributes: dataTableDTOList[].entityTagDTO
dataTableDTOList[].entityTagDTO| 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)Exception Handling
- 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