妙想资讯搜索 Skill (mx_search)
Overview
This skill provides a safe way to query the Meixiang financial search service for news, announcements, research reports, policy documents, trading rules, specific events, impact analyses, and any other external data needed for finance‑related queries. It ensures the results come from authoritative sources and are current.
Prerequisites
- 1. Obtain an API key from the Meixiang Skills page.
- Set the API key in the environment variable
MX_APIKEY.
export MX_APIKEY="your_api_key_here"
- 3. Ensure
curl is available on the system (default on macOS).
Usage
When the user asks a finance‑related question, follow these steps:
- 1. Construct the query string based on the user's request.
- Execute the POST request to the Meixiang endpoint:
curl -X POST \
--location 'https://mkapi2.dfcfs.com/finskillshub/api/claw/news-search' \
--header 'Content-Type: application/json' \
--header "apikey:${MX_APIKEY}" \
--data '{"query":"<YOUR_QUERY_HERE>"}'
- 3. Parse the JSON response. Important fields include:
-
title: concise headline of the information.
-
secuList: list of related securities (code, name, type).
-
trunk: main text or structured data block.
- 4. Present the information to the user in a readable format, optionally highlighting the securities involved.
Example
User query: "立讯精密的资讯"
Command executed:
CODEBLOCK2
Sample response excerpt:
CODEBLOCK3
Formatted reply to user:
- - 标题: 立讯精密最新研报
- 关联证券: 002475 立讯精密 (股票)
- 内容摘要: ... (provide concise summary from
trunk)
Saving Results (optional)
If the user wants to keep the result, you can save the raw JSON to a file in the current work directory:
curl ... > mx_search_result.json
Then inform the user of the file path.
When Not to Use
Do not use this skill for non‑financial queries, or when the user explicitly asks for opinion‑based answers without needing source data.
References
- - Meixiang API documentation (internal).
- Example queries table (see above).
妙想资讯搜索 Skill (mx_search)
概述
该技能提供了一种安全的方式来查询妙想金融搜索服务,获取新闻、公告、研究报告、政策文件、交易规则、特定事件、影响分析以及任何其他金融相关查询所需的外部数据。它确保结果来自权威来源且具有时效性。
前置条件
- 1. 从妙想技能页面获取API密钥。
- 在环境变量MX_APIKEY中设置API密钥。
bash
export MX
APIKEY=yourapi
keyhere
- 3. 确保系统上安装了curl(macOS默认已安装)。
使用方法
当用户提出金融相关问题时,请按照以下步骤操作:
- 1. 根据用户请求构建查询字符串。
- 向妙想端点发送POST请求:
bash
curl -X POST \
--location https://mkapi2.dfcfs.com/finskillshub/api/claw/news-search \
--header Content-Type: application/json \
--header apikey:${MX_APIKEY} \
--data {query:
QUERYHERE>}
- 3. 解析JSON响应。重要字段包括:
- title:信息的简洁标题。
- secuList:相关证券列表(代码、名称、类型)。
- trunk:主要文本或结构化数据块。
- 4. 以可读格式向用户呈现信息,并可选择突出显示涉及的证券。
示例
用户查询: 立讯精密的资讯
执行的命令:
bash
curl -X POST --location https://mkapi2.dfcfs.com/finskillshub/api/claw/news-search \
--header Content-Type: application/json \
--header apikey:${MX_APIKEY} \
--data {query:立讯精密的资讯}
示例响应片段:
json
{
title: 立讯精密最新研报,
secuList: [{secuCode:002475,secuName:立讯精密,secuType:股票}],
trunk: ...报告内容...
}
格式化回复给用户:
- - 标题: 立讯精密最新研报
- 关联证券: 002475 立讯精密 (股票)
- 内容摘要: ... (从trunk提供简洁摘要)
保存结果(可选)
如果用户希望保留结果,您可以将原始JSON保存到当前工作目录的文件中:
bash
curl ... > mxsearchresult.json
然后告知用户文件路径。
不适用场景
请勿将此技能用于非金融查询,或当用户明确要求基于观点的答案而不需要源数据时。
参考
- - 妙想API文档(内部)。
- 示例查询表(见上文)。