网淘吧来吧,欢迎您!

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

Financial Search Engine技能使用说明

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

Financial Information Search

ViaNatural Language QueryRetrieves timely financial information, with data sourced from the Miaoxiang Large Model. Applicable scenarios include:

  • Latest News and Policy Developments
  • Company Announcements and Event Tracking
  • Broker Research Reports and Market Analysis
  • Analysis of Macro Events' Impact on Markets/Sectors

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 its source, scope of use, validity period, and whether it supports resetting/revocation.
  • Do not hardcode/expose the key in plaintext in code, prompts, logs, or output files.

Functional Scope

Basic Retrieval Capabilities

  • Retrieve the latest information on individual stocks, sectors, and themes
  • Aggregate public information such as announcements, research reports, and news
  • Return readable main text content (preferentially extracting fromllmSearchResponse)
  • Supports saving results locally.txt文件,便于追溯与复盘

输入建议

  • 查询建议包含至少一个明确目标:公司、板块、事件、政策或时间范围
  • 对语义不清的问句,应先做一次简洁澄清再执行检索
  • 汇总时保持关键数值、专有名词和原始语义不被篡改

查询示例

类型 查询示例
个股资讯 格力电器最新研报与公告、寒武纪 688256 最新动态
板块/主题 商业航天板块近期新闻、新能源政策解读
宏观/风险 美联储加息对A股影响、汇率风险相关公司案例
综合解读 今日大盘异动原因、北向资金流向解读

前提条件

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

快速开始

1. 命令行调用

python3 {baseDir}/scripts/get_data.py "寒武纪 688256 最新研报与公告"

输出示例

Saved: /path/to/workspace/mx_finance_search/mx_finance_search_90bf169c.txt
(随后输出资讯正文内容)

参数说明:

参数 说明 必填
query(位置参数) 自然语言查询文本 ✅(位置参数或 stdin 二选一)
--no-save 仅输出结果,不写入本地文件

2. 代码调用

import asyncio
from pathlib import Path
from scripts.get_data import query_financial_news

async def main():
    result = await query_financial_news(
        query="新能源板块近期政策与龙头公司动态",
        output_dir=Path("workspace/mx_finance_search"),
        save_to_file=True,
    )
    if "error" in result:
        print(result["error"])
    else:
        print(result["content"])
        if result.get("output_path"):
            print("已保存至:", result["output_path"])

asyncio.run(main())

输出文件说明

文件 说明
mx_finance_search_<ID>.txt 资讯正文文本(从返回中提取)

返回字段说明

  • content:提取后的资讯正文(优先llmSearchResponse)。
  • output_path:当save_to_file=TrueAnd when there is content, return the save path.
  • raw: Returns the original interface response for debugging or secondary processing.
  • error: Returns error information when retrieval fails.

Environment Variables

Variable Description Default
EM_API_KEY News retrieval interface authentication key (required) Empty

Frequently Asked Questions

Error: EM_API_KEY is required.
→ EM_API_KEY needs to be configured. Please contact the official website to obtain it and configure it manually.

Why does it exit directly when no query is passed?
→ The command line first reads positional argumentsquery. If it is empty, it then reads stdin; if both are empty, it prints help and exits.

How to only view the output without saving to disk?

python3 -m scripts.get_data "商业航天板块近期新闻" --no-save

Compliance Statement

  • Hardcoding account IDs, session IDs, or tokens in code or prompts is prohibited.
  • Environment variables are treated as sensitive information and must not be disclosed in logs or responses.
  • When retrieval fails, do not fabricate facts; instead, return clear errors or statements of uncertainty.
  • Outputs should remain traceable and auditable.

天猫隐藏优惠券

网淘吧

免责申明
部分文章来自各大搜索引擎,如有侵权,请与我联系删除。
打赏
文章底部电脑广告
手机广告位-内容正文底部

相关文章

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