mirror of
https://github.com/NoFxAiOS/nofx.git
synced 2026-06-06 05:51:19 +08:00
Merge remote tracking branch into local development
- Resolved conflicts in README.md: Combined web-based config updates with multi-exchange support - Resolved conflicts in main.go: Fixed database initialization and default coin settings - Resolved conflicts in manager/trader_manager.go: Updated trader management for new database structure - Resolved conflicts in web/src/App.tsx: Combined UI improvements with responsive design - Resolved conflicts in web/.dockerignore: Merged dependency exclusions - Removed deprecated files: Dockerfile, config/config.go, web/Dockerfile, ComparisonChart.tsx, CompetitionPage.tsx 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: tinkle-community <tinklefund@gmail.com>
This commit is contained in:
@@ -61,7 +61,7 @@ func corsMiddleware() gin.HandlerFunc {
|
||||
// setupRoutes 设置路由
|
||||
func (s *Server) setupRoutes() {
|
||||
// 健康检查
|
||||
s.router.GET("/health", s.handleHealth)
|
||||
s.router.Any("/health", s.handleHealth)
|
||||
|
||||
// API路由组
|
||||
api := s.router.Group("/api")
|
||||
@@ -639,8 +639,9 @@ func (s *Server) handlePerformance(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
// 分析最近20个周期的交易表现
|
||||
performance, err := trader.GetDecisionLogger().AnalyzePerformance(20)
|
||||
// 分析最近100个周期的交易表现(避免长期持仓的交易记录丢失)
|
||||
// 假设每3分钟一个周期,100个周期 = 5小时,足够覆盖大部分交易
|
||||
performance, err := trader.GetDecisionLogger().AnalyzePerformance(100)
|
||||
if err != nil {
|
||||
c.JSON(http.StatusInternalServerError, gin.H{
|
||||
"error": fmt.Sprintf("分析历史表现失败: %v", err),
|
||||
|
||||
Reference in New Issue
Block a user