fix: handle empty AI500 coin list gracefully instead of error

This commit is contained in:
tinkle-community
2026-01-23 20:12:11 +08:00
parent 2f54d1d4c0
commit b5716ff3cb
3 changed files with 11 additions and 1 deletions

View File

@@ -534,6 +534,12 @@ func (at *AutoTrader) runCycle() error {
return fmt.Errorf("failed to build trading context: %w", err)
}
// 如果没有候选币种,友好提示并跳过本周期
if len(ctx.CandidateCoins) == 0 {
logger.Infof(" No candidate coins available, skipping this cycle")
return nil
}
// Save equity snapshot independently (decoupled from AI decision, used for drawing profit curve)
at.saveEquitySnapshot(ctx)