This commit is contained in:
aaron 2026-02-24 21:23:36 +08:00
parent ed8d6be496
commit 2f350d1bbf
2 changed files with 40 additions and 6 deletions

View File

@ -255,12 +255,21 @@ class CryptoAgent:
# 价格监控由 main.py 中的 price_monitor_loop 统一处理,避免重复检查 # 价格监控由 main.py 中的 price_monitor_loop 统一处理,避免重复检查
logger.info(f"模拟交易已启用(由后台统一监控)") logger.info(f"模拟交易已启用(由后台统一监控)")
# 发送启动通知 # 发送启动通知(卡片格式)
await self.feishu.send_text( title = "🚀 加密货币智能体已启动"
f"🚀 加密货币智能体已启动LLM 驱动)\n"
f"监控交易对: {', '.join(self.symbols)}\n" # 构建卡片内容
f"运行时间: 每5分钟整点" content_parts = [
) f"🤖 **驱动引擎**: LLM 自主分析",
f"📊 **监控交易对**: {len(self.symbols)}",
f" {', '.join(self.symbols)}",
f"⏰ **运行频率**: 每5分钟整点",
f"💰 **模拟交易**: 已启用(后台统一监控)",
f"🎯 **分析维度**: 技术面 + 资金面 + 情绪面",
]
content = "\n".join(content_parts)
await self.feishu.send_card(title, content, "green")
await self.telegram.send_startup_notification(self.symbols) await self.telegram.send_startup_notification(self.symbols)
while self.running: while self.running:

View File

@ -156,6 +156,31 @@ class StockAgent:
# 更新状态为运行中 # 更新状态为运行中
monitor.update_status("stock_agent", AgentStatus.RUNNING) monitor.update_status("stock_agent", AgentStatus.RUNNING)
# 发送启动通知(卡片格式)
us_stocks = [s for s in self.symbols if not s.endswith('.HK')]
hk_stocks = [s for s in self.symbols if s.endswith('.HK')]
title = "📈 股票智能体已启动"
content_parts = [
f"🤖 **驱动引擎**: LLM 三维分析",
f"📊 **监控股票**: {len(self.symbols)}",
]
if us_stocks:
content_parts.append(f" 🇺🇸 美股 ({len(us_stocks)}): {', '.join(us_stocks[:3])}{'...' if len(us_stocks) > 3 else ''}")
if hk_stocks:
content_parts.append(f" 🇭🇰 港股 ({len(hk_stocks)}): {', '.join(hk_stocks[:3])}{'...' if len(hk_stocks) > 3 else ''}")
content_parts.extend([
f"⏰ **运行频率**: 每小时整点",
f"🎯 **分析维度**: 技术面(40%) + 基本面(35%) + 新闻(25%)",
f"📢 **当前模式**: 仅市场分析",
])
content = "\n".join(content_parts)
await self.feishu.send_card(title, content, "green")
async def stop(self): async def stop(self):
"""停止智能体""" """停止智能体"""
self.running = False self.running = False