cherry_studio_sse_config.json4.04 kB
{
"name": "股票分析SSE工具",
"description": "基于AKShare API的股票分析工具,支持SSE协议",
"version": "1.0.0",
"baseUrl": "http://localhost:8001/sse",
"endpoints": {
"tools": "/api/tools",
"realtime": "/api/stock/realtime",
"history": "/api/stock/history",
"indicators": "/api/stock/indicators",
"sentiment": "/api/market/sentiment",
"search": "/api/stock/search",
"news": "/api/stock/news"
},
"sseEndpoints": {
"realtime": "/sse/stock/realtime",
"sentiment": "/sse/market/sentiment"
},
"tools": [
{
"name": "获取实时行情",
"function": "get_stock_realtime_data",
"description": "获取指定股票的实时行情数据",
"endpoint": "/api/stock/realtime",
"sseEndpoint": "/sse/stock/realtime",
"method": "GET",
"parameters": {
"symbol": {
"type": "string",
"description": "股票代码,如 '000001'",
"required": true
}
}
},
{
"name": "获取历史数据",
"function": "get_stock_history_data",
"description": "获取股票历史K线数据",
"endpoint": "/api/stock/history",
"method": "GET",
"parameters": {
"symbol": {
"type": "string",
"description": "股票代码",
"required": true
},
"period": {
"type": "string",
"description": "数据周期 (daily/weekly/monthly)",
"default": "daily"
},
"start_date": {
"type": "string",
"description": "开始日期 (YYYYMMDD格式)",
"default": ""
},
"end_date": {
"type": "string",
"description": "结束日期 (YYYYMMDD格式)",
"default": ""
}
}
},
{
"name": "计算技术指标",
"function": "calculate_technical_indicators",
"description": "计算股票技术指标",
"endpoint": "/api/stock/indicators",
"method": "GET",
"parameters": {
"symbol": {
"type": "string",
"description": "股票代码",
"required": true
},
"indicators": {
"type": "string",
"description": "指标列表,逗号分隔 (ma,macd,rsi)",
"default": "ma,macd,rsi"
}
}
},
{
"name": "获取市场情绪",
"function": "get_market_sentiment",
"description": "分析市场整体情绪",
"endpoint": "/api/market/sentiment",
"sseEndpoint": "/sse/market/sentiment",
"method": "GET",
"parameters": {
"symbol": {
"type": "string",
"description": "股票代码,为空时获取整体市场情绪",
"default": ""
}
}
},
{
"name": "搜索股票",
"function": "search_stock_info",
"description": "根据关键词搜索股票",
"endpoint": "/api/stock/search",
"method": "GET",
"parameters": {
"keyword": {
"type": "string",
"description": "搜索关键词(股票名称或代码)",
"required": true
}
}
},
{
"name": "获取股票新闻",
"function": "get_stock_news",
"description": "获取股票相关新闻资讯",
"endpoint": "/api/stock/news",
"method": "GET",
"parameters": {
"symbol": {
"type": "string",
"description": "股票代码,为空时获取市场新闻",
"default": ""
},
"limit": {
"type": "integer",
"description": "新闻数量限制",
"default": 10
}
}
}
],
"usage": {
"description": "在CherryStudio中使用此配置",
"steps": [
"1. 启动SSE服务器: python sse_server.py",
"2. 在CherryStudio中添加自定义工具",
"3. 配置基础URL: http://localhost:8080",
"4. 导入工具配置或手动添加工具",
"5. 开始使用股票分析功能"
]
}
}