diff --git a/web/src/App.tsx b/web/src/App.tsx index 24166314..6ec4569d 100644 --- a/web/src/App.tsx +++ b/web/src/App.tsx @@ -13,6 +13,7 @@ import { LanguageProvider, useLanguage } from './contexts/LanguageContext' import { AuthProvider, useAuth } from './contexts/AuthContext' import { t, type Language } from './i18n/translations' import { useSystemConfig } from './hooks/useSystemConfig' +import { AlertTriangle } from 'lucide-react' import type { SystemStatus, AccountInfo, @@ -1038,6 +1039,46 @@ function DecisionCard({ 保证金率: {decision.account_state.margin_used_pct.toFixed(1)}% 持仓: {decision.account_state.position_count} + + 候选币种: {decision.candidate_coins?.length || 0} + + + )} + + {/* 候选币种为0的警告提示 */} + {decision.candidate_coins && decision.candidate_coins.length === 0 && ( +
+ +
+
⚠️ 候选币种数量为 0
+
+
可能原因:
+
    +
  • 币种池API未配置或无法访问(请检查信号源设置)
  • +
  • API连接超时或返回数据为空
  • +
  • 未配置自定义币种且API获取失败
  • +
+
+ 解决方案: +
+
    +
  • 在交易员配置中设置自定义币种列表
  • +
  • 或者配置正确的币种池API地址
  • +
  • 或者禁用"使用币种池"和"使用OI Top"选项
  • +
+
+
)} diff --git a/web/src/components/AITradersPage.tsx b/web/src/components/AITradersPage.tsx index 92091d87..f9ddce76 100644 --- a/web/src/components/AITradersPage.tsx +++ b/web/src/components/AITradersPage.tsx @@ -659,6 +659,53 @@ export function AITradersPage({ onTraderSelect }: AITradersPageProps) { + {/* 信号源配置警告 */} + {traders && traders.some(t => (t.use_coin_pool || t.use_oi_top)) && + (!userSignalSource.coinPoolUrl && !userSignalSource.oiTopUrl) && ( +
+ +
+
+ ⚠️ 信号源未配置 +
+
+

+ 您有交易员启用了"使用币种池"或"使用OI Top",但尚未配置信号源API地址。 + 这将导致候选币种数量为0,交易员无法正常工作。 +

+

+ 解决方案: +

+
    +
  • 点击"📡 信号源"按钮配置API地址
  • +
  • 或在交易员配置中禁用"使用币种池"和"使用OI Top"
  • +
  • 或在交易员配置中设置自定义币种列表
  • +
+
+ +
+
+ )} + {/* Configuration Status */}
{/* AI Models */} diff --git a/web/src/types.ts b/web/src/types.ts index af3ea8c3..d1368c01 100644 --- a/web/src/types.ts +++ b/web/src/types.ts @@ -92,6 +92,8 @@ export interface TraderInfo { exchange_id?: string is_running?: boolean custom_prompt?: string + use_coin_pool?: boolean + use_oi_top?: boolean } export interface AIModel {