Install
openclaw skills install eastmoney-finance-newsSearch and retrieve timely financial news, reports, announcements, and policy analyses based on user queries from Eastmoney data.
openclaw skills install eastmoney-finance-news基于东方财富妙想搜索能力,用于获取涉及时效性信息或特定事件信息的金融资讯(新闻、公告、研报、政策解读等)。
EASTMONEY_APIKEY: 东方财富 API key (默认:mkt_Z19TUfMY79_44k4wZsAHIVGVva0-g8PxD_DkBDQx2iM)POST https://mkapi2.dfcfs.com/finskillshub/api/claw/news-search
Content-Type: application/json
{
"apikey": "<EASTMONEY_APIKEY>",
"query": "立讯精密的资讯"
}
| 字段 | 释义 |
|---|---|
title | 信息标题 |
secuList | 关联证券列表 |
trunk | 信息核心正文 |
from urllib.request import Request
import json
def get_eastmoney_news(query):
apikey = os.environ.get("EASTMONEY_APIKEY", "mkt_Z19TUfMY79_44k4wZsAHIVGVva0-g8PxD_DkBDQx2iM")
url = "https://mkapi2.dfcfs.com/finskillshub/api/claw/news-search"
data = {
"apikey": apikey,
"query": query
}
req = Request(url, data=json.dumps(data).encode("utf-8"), headers={"Content-Type": "application/json"})
with urllib.request.urlopen(req) as response:
result = json.loads(response.read().decode("utf-8"))
return result