网淘吧来吧,欢迎您!

返回首页 微信
微信
手机版
手机版

All-Market Financial Data Hub技能使用说明

2026-03-26 新闻来源:网淘吧 围观:57
电脑广告
手机广告

Financial Data Query

Key Source and Security Instructions

  • This skill uses only one environment variable:EM_API_KEY.
  • EM_API_KEYis issued by East Money's MiaoXiang Service (https://ai.eastmoney.com/mxClaw) and is used for its interface authentication.
  • Before providing the key, please confirm the key source, scope of use, validity period, and whether reset/revocation is supported.
  • It is prohibited to hardcode/plaintext expose the key in code, prompts, logs, or output files.

Functional Scope

1. Supported Query Object Scope

  • Stocks (A-shares, Hong Kong stocks, US stocks)
  • Sectors, Indices, Shareholders
  • Corporate Issuers, Bonds, Non-listed Companies
  • Stock Market, Fund Market, Bond Market

2. Supported Data Types for Query

Supports querying the following types of structured data:

  • Real-time Market Data(current price, price change percentage, order book data, etc.)
  • Quantitative Data(technical indicators, fund flows, etc.)
  • Report Data(Revenue, Net Profit, Financial Ratios, etc.)

3. Supported Query Methods andStrict Limits

Supports combined queries with multiple entities, multiple metrics, and multiple time ranges.Due to backend interface limitations, a single query must adhere to the following quotas:

  • Entity Limit: A maximum of5stocks/financial entities per query.
  • Metric Limit: A maximum of3core metrics per query.
  • Processing Logic: If a user request exceeds the above limits, the Skill will prioritize processing the first 5 entities and the first 3 metrics, and a note will be included in the result description file.

Example:"Query the revenue of six stocks A, B, C, D, E, F" -> Only the first five will be returned.

4. Output Results

After execution, the Skill will output the following files:

  • A query results.xlsxfile to hold the structured query results.
  • A result description.txt file.文档,用于描述查询内容、结果含义及必要说明

查询示例

基础指标查询

  • 东方财富的基本面
  • 贵州茅台最近一年的营业收入和净利润
  • 半导体ETF的业绩表现

实时行情与盘口查询

  • 当前300059的实时买单
  • 英伟达现在的最新价和涨跌幅
  • 沪深300当前点位和成交额

多实体、多指标、多时间查询(注意配额)

  • 合规示例:对比创业板指、沪深300、中证500(3个实体)春节以来的涨幅(1个指标)。
  • 合规示例:东方财富、拼多多(2个实体)最近一年的营收、毛利、净利(3个指标)。
  • 超限提示:若查询“沪深前十大权重股的市盈率”,系统将截取前5名进行查询。

补充说明

  • 本技能面向金融结构化数据与关系数据查询,不侧重主观分析、投资建议或资讯解读。
  • 语句中必须包含明确的金融实体名称。
  • 当用户使用自然语言发起查询时,本技能可根据问句内容识别查询对象、指标和时间范围,并输出结构化结果文件。
  • 对于支持范围内的查询请求,优先输出结构化数据查询结果,并同时生成结果说明文件,便于后续使用。

前提条件

1. 注册东方财富妙想账号

访问https://ai.eastmoney.com/mxClaw注册账号并获取API_KEY。

2. 配置 Token

# macOS 添加到 ~/.zshrc,Linux 添加到 ~/.bashrc
export EM_API_KEY="your_api_key_here"

然后根据系统执行对应的命令:

macOS:

source ~/.zshrc

Linux:

source ~/.bashrc

3. 安装依赖

pip3 install httpx pandas openpyxl --user

快速开始

在工作目录下执行

python3 {baseDir}/scripts/get_data.py --query "贵州茅台近期走势如何"

输出示例

xlsx: /path/to/miaoxiang/mx_finance_data/mx_finance_data_9535fe18.xlsx
描述: /path/to/miaoxiang/mx_finance_data/mx_finance_data_9535fe18_description.txt
行数: 42

输出文件说明

文件 说明
mx_finance_data_<查询id>.xlsx 结构化数据表,包含请求的实体与指标
mx_finance_data_<查询id>_description.txt 包含查询逻辑说明、字段含义及配额截断提示
免责申明
部分文章来自各大搜索引擎,如有侵权,请与我联系删除。
打赏
文章底部电脑广告
手机广告位-内容正文底部

相关文章

您是本站第262398名访客 今日有10篇新文章/评论