Commit Graph

19 Commits

Author SHA1 Message Date
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
ZhouYongyou
6553b81b94 fix: config.json.example 缺少 coin_pool_api_url 和 oi_top_api_url 字段
- 问题:config.json.example 与 main.go 的 ConfigFile 结构不一致
- 影响:新用户复制 example 时会缺少必要的配置字段
- 修复:添加 coin_pool_api_url 和 oi_top_api_url(空字符串)

相关提交:517d0ca (admin_mode config)
2025-11-02 00:40:21 +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
icy
a7cc5e5ed4 竞赛fix、交易员新增参数 2025-11-01 02:17:11 +08:00
icy
517d0caf6f admin_mode config 2025-10-31 14:34:53 +08:00
icy
dd88997d8e Restore config.json.example 2025-10-31 14:09:28 +08:00
icy
ac7c40632d account system、custom prompt 2025-10-31 03:42:01 +08:00
tinkle
1ab26d629f fix:config add hyperliquid_wallet_addr 2025-10-30 17:16:03 +08:00
SkywalkerJi
a6fceff4d3 Expose the default mainstream currency settings to the configuration file 2025-10-30 10:01:45 +08:00
nobody
e17cdac49c change the config 2025-10-30 00:29:39 +08:00
btcman
2cdfb87144 Feature: Add support for custom OpenAI-compatible API
This update enables users to configure any OpenAI-compatible API endpoint,
allowing the use of:
- OpenAI official API (GPT-4, GPT-4o, etc.)
- OpenRouter (access to multiple models)
- Local deployed models (Ollama, LM Studio, etc.)
- Other OpenAI-format compatible API services

Changes:
- config: Add custom_api_url, custom_api_key, custom_model_name fields
- mcp: Add SetCustomAPI function and ProviderCustom constant
- trader: Update AI initialization logic to support custom API
- manager: Pass custom API config to trader instances
- Add CUSTOM_API.md documentation with usage examples
- Update config.json.example with custom API sample

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-29 22:48:28 +08:00
PorunC
6fb65b43c6 Merge upstream/main: Integrate Hyperliquid support with leverage config
Resolved conflicts in manager/trader_manager.go by combining:
- Upstream: Exchange field, Hyperliquid API keys, Hyperliquid testnet
- Local: BTCETHLeverage and AltcoinLeverage fields

Both features are now working together.
2025-10-29 21:01:05 +08:00
PorunC
b5a5760bc4 Feat: Add configurable leverage settings for BTC/ETH and altcoins (v2.0.3)
- Add LeverageConfig struct with btc_eth_leverage and altcoin_leverage fields
- Set default leverage to 5x (safe for Binance subaccounts)
- Add validation warnings for leverage >5x (subaccount restrictions)
- Update config.json.example with leverage configuration

Breaking changes:
- None (backward compatible with default 5x leverage)

Migration:
- Existing configs will auto-default to 5x leverage (safe)
- Main accounts can increase to 20x (altcoins) or 50x (BTC/ETH) in config.json
- Subaccounts must keep leverage ≤5x to avoid trade failures

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-29 20:29:51 +08:00
nobody
e1d5a6405c feat: Add Hyperliquid exchange support with unified trader interface
Major changes:
- Add full Hyperliquid trading support (long/short, leverage, SL/TP)
- Create unified Trader interface for multi-exchange support
- Implement automatic precision handling for orders and prices
- Fix balance calculation and unrealized P&L display
- Add comprehensive configuration guide in README

New features:
- Support for both Binance and Hyperliquid exchanges
- Automatic order size precision based on szDecimals
- Price formatting with 5 significant figures
- Non-custodial trading with Ethereum private key
- Seamless exchange switching via configuration

Technical details:
- Add trader/interface.go for unified trader interface
- Add trader/hyperliquid_trader.go for Hyperliquid implementation
- Update manager and auto_trader to support multiple exchanges
- Add go-hyperliquid SDK dependency
- Fix precision errors (float_to_wire, invalid price)

Fixes:
- Correct calculation of wallet balance and unrealized P&L
- Proper handling of AccountValue vs TotalRawUsd
- Frontend display issues for total equity and P&L

Documentation:
- Add Hyperliquid setup guide in README
- Update config.json.example with both exchanges
- Add troubleshooting section for common errors

Tested with live trading on Hyperliquid mainnet.
No breaking changes - backward compatible with existing configs.
2025-10-29 20:00:30 +08:00
tinkle
6d822173fb Docs: Enhance README files with beginner-friendly guides (4 languages)
**Configuration Improvements:**
- Add comprehensive "Get AI API Keys" section (DeepSeek + Qwen)
- Split configuration into Beginner Mode and Expert Mode
- Add step-by-step setup guides with placeholder tables
- Add configuration checklist and field explanations
- Document smart default behavior for use_default_coins (v2.0.2)

**Startup/Monitoring Guides:**
- Add detailed 2-step system startup instructions
- Include expected output and error troubleshooting tables
- Add monitoring and graceful shutdown procedures
- Provide health check commands

**AI Decision Flow Updates:**
- Enhance flow diagram with emojis and wider boxes
- Add v2.0.2 improvement markers throughout
- Document position duration tracking
- Document accurate USDT PnL calculation with leverage
- Document enhanced AI freedom for raw data analysis
- Document improved position tracking (symbol_side keys)
- Add "Key Improvements in v2.0.2" summary section

**Code Changes:**
- Simplify config.json.example to beginner-friendly single trader
- Implement smart default: use_default_coins auto-enables when omitted
- Set default to true if false without coin_pool_api_url

**Files Updated:**
- README.md (English): +559 lines
- README.zh-CN.md (Chinese): +527 lines
- README.ru.md (Russian): +634 lines
- README.uk.md (Ukrainian): +521 lines
- config.json.example: Simplified configuration
- config/config.go: Smart default logic

Total: 2068+ additions across all documentation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-29 17:16:27 +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
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
afe513b7aa Security: Remove hardcoded credentials
- Remove hardcoded API URL and auth token from pool/coin_pool.go
- Update config.json.example with placeholder format
- Credentials should now be configured via config.json file
2025-10-28 20:58:02 +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