ZhouYongyou
366ae87077
style: format Go code with go fmt
...
- Fix formatting issues flagged by PR advisory checks
- Run go fmt ./... on all Go files
- No functional changes, code style improvements only
Files formatted:
- api/server.go
- auth/auth.go
- decision/engine.go
- logger/decision_logger.go
- manager/trader_manager.go
- market/monitor.go
- market/types.go
- mcp/client.go
- trader/*.go (aster, auto, binance, hyperliquid)
2025-11-03 19:35:41 +08:00
ZhouYongyou
ab3cab9a93
fix: 統一 handleTraderList 返回完整 AI model ID(保持與 handleGetTraderConfig 一致)
...
問題:
- handleTraderList 仍在截斷 AI model ID (admin_deepseek → deepseek)
- 與 handleGetTraderConfig 返回的完整 ID 不一致
- 導致前端 isModelInUse 檢查失效
修復:
- 移除 handleTraderList 中的截斷邏輯
- 返回完整 AIModelID (admin_deepseek)
- 與其他 API 端點保持一致
測試:
- GET /api/traders → ai_model: admin_deepseek ✓
- GET /api/traders/:id → ai_model: admin_deepseek ✓
- 模型使用檢查邏輯正確 ✓
2025-11-02 07:11:57 +08:00
ZhouYongyou
04419b47e6
fix: 修复编辑交易员时「AI模型配置不存在或未启用」错误
...
问题:
- 编辑交易员并修改系统提示词模板时,保存失败
- 错误提示:AI模型配置不存在或未启用
根本原因:
1. 后端 API 返回的 ai_model 被截断(admin_deepseek → deepseek)
2. 前端验证时找不到对应的模型 ID(enabledModels 存的是完整 ID)
3. API 缺少 system_prompt_template 字段
修复内容:
- api/server.go: 移除 AI model ID 截断逻辑,返回完整 ID
- api/server.go: 在 handleGetTraderConfig 中添加 system_prompt_template 字段
- web/src/types.ts: TraderConfigData 接口添加 system_prompt_template 字段
- web/src/components/AITradersPage.tsx: 添加 fallback 机制和详细日志
测试:
- 编辑交易员 → 修改系统提示词模板 → 保存成功
- Console 输出验证日志,不再报错
2025-11-02 04:51:30 +08:00
icy
2cc91d1701
Remote auth for prompt templates
2025-11-01 20:25:55 +08:00
icy
2538d2f928
Merge branch 'dev' of https://github.com/tinkle-community/nofx
2025-11-01 20:09:17 +08:00
SkywalkerJi
4250c11ddf
Supports custom system prompts and custom models.
2025-11-01 19:45:54 +08:00
icy
996b152eba
Resolve merge conflicts in AITradersPage.tsx
...
- Fixed import statement conflict (using 'type Language')
- Merged exchange configuration logic preserving support for multiple exchange types
- Kept comprehensive form handling for Binance, Hyperliquid, Aster, and OKX exchanges
- Updated security warning messages to use proper translation keys
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-11-01 19:01:44 +08:00
icy
f413f87f39
Fixed health check; Fixed dex config; Add rank trader info view;
2025-11-01 18:58:32 +08:00
SkywalkerJi
48d1320209
* Fixed the custom model URL.
...
* Added functionality for custom model names.
2025-11-01 16:09:15 +08:00
icy
a7cc5e5ed4
竞赛fix、交易员新增参数
2025-11-01 02:17:11 +08:00
icy
d0621265aa
Add MarginMode configration
2025-10-31 13:14:24 +08:00
icy
a85d38cb59
rename fix
2025-10-31 04:07:14 +08:00
icy
ac7c40632d
account system、custom prompt
2025-10-31 03:42:01 +08:00
icy
ec25de08d6
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: Claude <noreply@anthropic.com >
2025-10-30 20:57:57 +08:00
icy
4f5b8b250a
sync fork
2025-10-30 20:51:22 +08:00
tinkle
9139407739
Fix: Resolve Trade History data loss and P&L calculation errors
...
Major fixes:
1. Trade History data loss issue
- Root cause: Open records outside analysis window caused close matching failures
- Solution: Pre-populate position state by reading 3x window of historical records
- Ensures long-term positions (>5 hours) generate correct trade records
2. P&L calculation errors
- Remove incorrect leverage multiplication from absolute P&L
- Correct calculation: Futures P&L = quantity × price difference
- Leverage only affects P&L percentage (relative to margin)
3. Other fixes
- Break-even trades (pnl=0) no longer misclassified as losses
- Perfect strategy shows Profit Factor as 999.0 instead of 0.0
- Expand analysis window from 20 to 100 cycles (5 hours)
Files changed:
- logger/decision_logger.go: Core matching and calculation logic
- api/server.go: API analysis window
- trader/auto_trader.go: AI decision analysis window
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-10-30 17:58:25 +08:00
yiplee
b1ba52e15f
Change health check endpoint to accept any HTTP method for improved flexibility.
2025-10-30 13:00:17 +08:00
tinkle
14ffb0593a
Update: Merge nofx improvements
...
- Frontend trading records and UI enhancements
- Optimized AI prompts and decision engine
- Performance analysis and comparison features
- Binance-style UI improvements
2025-10-28 21:45:28 +08:00
tinkle
7e8a494ed3
Initial commit: NOFX AI Trading System
...
- Multi-AI competition mode (Qwen vs DeepSeek)
- Binance Futures integration
- AI self-learning mechanism
- Professional web dashboard
- Complete risk management system
2025-10-28 15:47:34 +08:00