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
Added on

NPX Install

npx skill4agent add meission/eastmoney eastmoney_financial_data

SKILL.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

  1. First check if the environment variable
    EASTMONEY_APIKEY
    exists:
    bash
    echo $EASTMONEY_APIKEY
    If 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 (
      mkapi2.dfcfs.com
      ) to obtain financial data.
    • Credential Protection: The API Key is only used on the server side or in trusted running environments via the environment variable
      EASTMONEY_APIKEY
      , and will not be exposed in plaintext on the frontend.
  2. 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

Field PathTypeCore Definition
data.questionId
StringUnique ID for the data query request, associated with a single query task
data.dataTableDTOList
Array【Core】Standardized list of securities indicator data, each element corresponds to complete data of 1 security + 1 indicator
data.rawDataTableDTOList
ArrayRaw unprocessed list of securities indicator data, with exactly the same structure as the standardized list, for raw data calls
data.condition
ObjectQuery conditions for this data query, recording query keywords, time range, etc.
data.entityTagDTOList
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)

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 PathTypeCore Definition
dataTableDTOList[].code
StringFull securities code (including market identifier, e.g., 300059.SZ)
dataTableDTOList[].entityName
StringFull name of the security (including code, e.g., Eastmoney (300059.SZ))
dataTableDTOList[].title
StringTitle of this indicator data, summarizing the query result (e.g., Eastmoney's latest price)

2.2 Core Table Data (for rendering)

Field PathTypeCore DefinitionTable Logic
dataTableDTOList[].table
Object【Core】Standardized table data, key = indicator code, value = array of indicator values;
headName
is the value of the time / dimension column
Key is indicator column,
headName
is time column, value is the indicator value of the cross cell
dataTableDTOList[].rawTable
ObjectRaw table data, same structure as
table
, without data standardization
Same as
table
, raw values without format / unit correction
dataTableDTOList[].nameMap
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,
headNameSub
is the fixed name of the time column
dataTableDTOList[].indicatorOrder
ArrayDisplay 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 PathTypeCore Definition
dataTableDTOList[].dataType
StringData source type (e.g., market data / data browser)
dataTableDTOList[].dataTypeEnum
StringEnumerated value of data type (HQ = market quotes, DATA_BROWSER = data browser)
dataTableDTOList[].field
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 PathTypeCore Definition
dataTableDTOList[].entityTagDTO
ObjectDetailed 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

Field PathTypeCore Definition
field.returnCode
StringUnique code of the indicator
field.returnName
StringBusiness Chinese name of the indicator (e.g., latest price / closing price)
field.startDate/endDate
StringTime range of this query (start / end)
field.dateGranularity
StringData granularity (DAY = daily, MIN = minute, etc.)

3.2 Securities Entity Attributes:
dataTableDTOList[].entityTagDTO

Field PathTypeCore Definition
entityTagDTO.secuCode
StringPure securities code (without market identifier, e.g., 300059)
entityTagDTO.marketChar
StringMarket identifier (.SZ = Shenzhen Stock Exchange, .SH = Shanghai Stock Exchange)
entityTagDTO.entityTypeName
StringSecurities type (e.g., A-shares / Hong Kong stocks / bonds)
entityTagDTO.fullName
StringFull 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