ZhouYongyou
2a3fb16ca6
feat(main): auto-initialize config.json on first run
...
## Problem
Users reported admin_mode setting doesn't work after fresh install:
- System prompts for registration/login
- Modifying config.json has no effect
- Page always requires login
## Root Cause
- Only config.json.example exists after git clone
- User doesn't know to copy .example → .json
- syncConfigToDatabase() skips sync if config.json missing
- Database uses default values but config changes don't apply
## Fix
Add ensureConfigExists() to auto-create config.json from .example:
```go
// Before database initialization
if err := ensureConfigExists(); err != nil {
log.Fatalf("❌ 初始化配置文件失敗: %v", err)
}
```
**Behavior**:
- First run: "⚠️ config.json 不存在,從 config.json.example 複製..."
- Creates config.json automatically
- Then syncConfigToDatabase() runs normally
- admin_mode works immediately
## Benefits
- ✅ Zero manual configuration for new users
- ✅ Consistent with Docker behavior (PR #310 )
- ✅ Prevents 90% of admin_mode issues
- ✅ Minimal code change (18 lines)
## Testing
- Tested compilation: successful
- Matches upstream Docker init logic (commit 34f61af )
Related: issue reported by user on z-dev branch
2025-11-05 01:37:06 +08:00
ZhouYongyou
db7b24e2e0
style: apply go fmt to fix indentation and alignment
...
Fix formatting issues across multiple files:
- logger/decision_logger.go: correct if statement indentation
- main.go: fix DataKLineTime field tab alignment
- trader/auto_trader.go: align struct field comments and code blocks
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-11-04 10:44:15 +08:00
ZhouYongyou
75c04083b3
feat: Add Telegram news integration for market sentiment analysis (PR #277 )
...
- Add Telegram channel monitoring for market news
- Integrate news sentiment into AI decision making
- Improve context awareness for trading decisions
- Fix missing InsideCoins field in ConfigFile structure
- Merge with existing partial_close and position tracking features
2025-11-03 22:19:38 +08:00
vicnoah
89814b612e
Merge branch 'dev' into dev
2025-11-02 22:14:42 +08:00
yuanshi2016
95c32fcb2e
修改Kline获取方式为Websocket缓存。
2025-11-02 17:59:19 +08:00
yuanshi2016
3b1db6f64f
K线获取方式改为websocket组合流. 带重拨机制
...
流程为下:
1. 启动时使用所有交易员设置的币种(去重) 如果交易员未配置,则使用系统默认
2. 在决策获取K线时 如果没有缓存 则先实时获取后再添加订阅. ps: 适用于Api方式的币种列表
2025-11-02 14:03:13 +08:00
wwg
d2af549bac
feat(config): 增加新闻源配置与数据库迁移支持
...
- 在config.json.example中添加新闻源相关配置示例,支持telegram频道订阅
- 扩展数据库表结构,新增traders表多字段支持信号源和杠杆参数
- 新增NewsConfig结构体及相关telegram新闻配置数据模型
- 在交易决策上下文结构Context中添加新闻数据news字段支持传递新闻
- 在交易决策构建用户提示信息时加入相关新闻内容
- 优化数据库操作代码,支持交易所和交易员配置的完整字段读取与更新
- 添加数据库exchanges表迁移逻辑,重建表结构和触发器以支持新字段
- 引入第三方库github.com/samber/lo用于集合操作
- 在go.mod添加新的依赖模块,并更新相关依赖版本
2025-11-01 23:10:02 +08:00
yuanshi2016
2c08e1f10b
新增内置AI评分
...
修改market/data.go Get函数获取K线为流式获取(可以解决传入币种比较多的情况下耗时问题)
market目录下新增文件
main.go 新增运行入口
通过inside_coins=true控制
该评分默认初始化大约需要2分钟左右(因为币种列表比较多,api有限速)
使用时应该注意engine.go下的流动性过滤问题
2025-11-01 15:58:54 +08:00
icy
9fe8f1a1e7
Merge branch 'dev' of github.com:Icyoung/nofx
...
# Conflicts:
# manager/trader_manager.go
# web/src/components/AITradersPage.tsx
2025-11-01 02:23:05 +08:00
icy
a7cc5e5ed4
竞赛fix、交易员新增参数
2025-11-01 02:17:11 +08:00
SkywalkerJi
91fcfb0ec5
Fix coin settings
2025-10-31 21:05:53 +08:00
icy
8296d9843a
Sync config.json to config.db for manual modify admin_mode and other configs
2025-10-31 15:24:18 +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
SkywalkerJi
a6fceff4d3
Expose the default mainstream currency settings to the configuration file
2025-10-30 10:01:45 +08:00
PorunC
36840d52dd
Feat: Integrate leverage configuration across trading system
...
- Pass leverage config through TraderManager to AutoTrader
- Add BTCETHLeverage and AltcoinLeverage fields to Context and AutoTraderConfig
- Update decision validation to use configured leverage limits
- Display configured leverage in startup message
- Update error messages to show current leverage limits
Changes:
- main.go: Pass leverage config to AddTrader, update startup message
- manager/trader_manager.go: Accept and forward leverage config
- trader/auto_trader.go: Store leverage config, pass to Context
- decision/engine.go: Use dynamic leverage limits in validation
This completes the leverage configuration feature implementation.
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-10-29 20:30:04 +08:00
nobody
ccfa48688b
feat: 添加use_default_coins开关,简化默认币种配置
...
- 新增use_default_coins配置项:true=使用默认8个主流币种,false=使用API币种池
- 更直观的配置方式,新手可直接设置true快速开始
- 优先级:use_default_coins > coin_pool_api_url > 缓存 > 默认列表
- 更新所有语言版本README(en/zh-CN/ru/uk)添加配置说明
- 更新config.json.example示例文件
2025-10-29 12:59:12 +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