Commit Graph

157 Commits

Author SHA1 Message Date
SkywalkerJi
c16f3f7bf2 Fix leverage settings 2025-10-31 21:05:13 +08:00
tinkle-community
cd951358b5 Merge pull request #125 from SkywalkerJi/dev
Ignore the database to avoid submitting sensitive data.
2025-10-31 18:40:17 +08:00
SkywalkerJi
363b32718e Change the minimum amount to 50 and remove the maximum amount limit. 2025-10-31 18:34:48 +08:00
SkywalkerJi
ee9af1771c Ignore the database to avoid submitting sensitive data. 2025-10-31 18:30:36 +08:00
tinkle-community
8f026aa661 Merge pull request #116 from Icyoung/dev
Dev start script fix
2025-10-31 15:58:04 +08:00
Icyoung
16be200fd2 Merge branch 'tinkle-community:dev' into dev 2025-10-31 15:55:06 +08:00
icy
6c5de7e58f Fix docker compose bug for config.db 2025-10-31 15:53:48 +08:00
tinkle-community
0518db399f Merge pull request #114 from Icyoung/dev
[Dev] 还原config配置、部署优化
2025-10-31 15:50:23 +08:00
icy
c5324d09a8 Add config.db volume mapping to docker-compose
- Map config.db to host for database persistence
- Ensures user configurations, traders, and AI models persist across container restarts
- Enables easy backup of configuration database

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

Co-Authored-By: tinkle-community <tinklefund@gmail.com>
2025-10-31 15:31:47 +08:00
icy
0f9c8eab25 Merge branch 'dev' of github.com:Icyoung/nofx 2025-10-31 15:26:04 +08:00
icy
a3f2706ec8 Sync config.json to config.db for manual modify admin_mode and other configs 2025-10-31 15:24:18 +08:00
Icyoung
1d61db359a Merge branch 'tinkle-community:dev' into dev 2025-10-31 14:47:56 +08:00
icy
28efd54e3d start scrip fix 2025-10-31 14:41:45 +08:00
icy
43e678137a start scrpit fix 2025-10-31 14:39:04 +08:00
icy
b1f4e78393 admin_mode config 2025-10-31 14:34:53 +08:00
icy
10533af715 start script fix about config.json 2025-10-31 14:16:47 +08:00
icy
46bf41b3f6 Restore config.json.example 2025-10-31 14:09:28 +08:00
tinkle-community
bdb0080a91 Merge pull request #110 from Icyoung/dev
【Dev】新增仓位模式的配置、移除config配置的文档描述
2025-10-31 13:54:19 +08:00
icy
9edcd19caa Route fix 2025-10-31 13:49:05 +08:00
icy
8bf37a09e5 Discard config settings in MD 2025-10-31 13:28:06 +08:00
icy
56a6d7e5a7 Add MarginMode configration 2025-10-31 13:14:24 +08:00
icy
a8e3673e3c Fix start script 2025-10-31 12:46:16 +08:00
tinkle-community
273cf8fb61 Merge pull request #105 from d0lwl0b/dev
fix(config): rename config example to .jsonc and update all references
2025-10-31 12:02:40 +08:00
d0lwl0b
720f24fecf fix(config): rename config example to .jsonc and update all references 2025-10-31 11:51:17 +08:00
tinkle-community
78d8513b6d Merge pull request #92 from Icyoung/dev
[Dev] account系统、前端配置 ,model/cex dex/trader、自定义prompt
2025-10-31 04:24:59 +08:00
tinkle-community
17f1eee867 Merge branch 'main' into dev
Integrate latest changes from main branch including:
- Documentation updates for trader configuration
- Color system improvements for UI components
- Logo design files

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

Co-Authored-By: tinkle-community <tinklefund@gmail.com>
2025-10-31 04:17:10 +08:00
icy
7ce0e5d0cb rename fix 2025-10-31 04:07:14 +08:00
icy
87d163340a Merge branch 'main' of github.com:Icyoung/nofx
# Conflicts:
#	config.json.example
#	config/config.go
#	main.go
#	trader/auto_trader.go
#	web/src/App.tsx
#	web/src/components/CompetitionPage.tsx
2025-10-31 03:59:58 +08:00
icy
d3e7b7dbb1 account system、custom prompt 2025-10-31 03:42:01 +08:00
tinkle-community
45c049fbe1 Merge pull request #76 from cookieY/main 2025-10-31 03:39:09 +08:00
henrylab
ec064a705a 1. 修复hyperliquid 总盈亏,总净值计算错误问题
2. 修复持仓盈亏百分比错误,计算公式应该加入杠杆倍数
2025-10-30 22:23:05 +08:00
tinkle-community
5f036d7669 UI: Unify trader colors between Leaderboard and Performance Chart
Problem:
- Leaderboard used ai_model-based colors (qwen=purple, other=blue)
- Performance Comparison used index-based colors (10 color pool)
- This caused color mismatch between the two components
- Same trader showed different colors in different sections

Solution:
- Create shared color utility (utils/traderColors.ts)
- Define single color pool with 10 distinct colors
- Implement unified getTraderColor function based on trader index
- Update both ComparisonChart and CompetitionPage to use shared utility

Changes:
- New file: web/src/utils/traderColors.ts (shared color logic)
- Updated: ComparisonChart.tsx (use shared utility)
- Updated: CompetitionPage.tsx (use shared utility in Leaderboard
  and Head-to-Head sections)

Now traders consistently display the same color across all UI sections.

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

Co-Authored-By: tinkle-community <tinklefund@gmail.com>
2025-10-30 22:21:57 +08:00
tinkle-community
e8aec99d36 UI: Fix duplicate colors in Performance Comparison chart
Problem:
- Multiple traders using the same AI model had duplicate colors
- Only 2 colors were available (blue for deepseek, purple for qwen)
- Made it difficult to distinguish between traders

Solution:
- Expand color pool from 2 to 10 distinct colors
- Change color assignment from ai_model-based to index-based
- Each trader now gets a unique color based on their position
- Colors cycle if there are more than 10 traders

Color pool includes: blue, purple, emerald, orange, pink, amber,
sky, violet, green, rose

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

Co-Authored-By: tinkle-community <tinklefund@gmail.com>
2025-10-30 22:12:09 +08:00
tinkle-community
96bd41335e Docs: Complete exchange configuration documentation
Update configuration documentation across all 4 languages (Chinese, English,
Russian, Ukrainian) with comprehensive exchange-related fields:

Configuration field table updates:
- Add `exchange` field (binance/hyperliquid/aster)
- Add `hyperliquid_private_key` field with 0x prefix warning
- Add `hyperliquid_wallet_addr` field
- Add `hyperliquid_testnet` field (optional, defaults to false)
- Update `ai_model` to include "custom" option
- Change Binance API key fields to show conditional requirement
  (only required when using Binance exchange)

config.json.example updates:
- Add `enabled` field to all trader configurations
- Set appropriate enabled states for example traders
- Ensure all traders have exchange field properly configured

This makes it clear to users which configuration fields are required
for each exchange option (Binance, Hyperliquid, or Aster DEX).

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

Co-Authored-By: tinkle-community <tinklefund@gmail.com>
2025-10-30 21:27:53 +08:00
tinkle-community
f5931bd9eb feat: Add trader enabled switch and fix critical bugs
New Features:
- Add 'enabled' field to trader config for selective startup
- Only enabled traders will be initialized and run
- Display skip messages for disabled traders in logs

Bug Fixes:
- Fix Hyperliquid account value calculation
  * AccountValue is total equity, no need to add TotalMarginUsed
  * Correctly calculate wallet balance without unrealized PnL
  * Fix available balance calculation (AccountValue - TotalMarginUsed)
- Fix frontend page refresh navigation issue
  * Use URL hash to persist page state across refreshes
  * Support browser back/forward buttons
  * Prevent Details page from reverting to Competition on refresh

Technical Changes:
- config/config.go: Add Enabled bool field to TraderConfig
- main.go: Skip disabled traders during initialization
- trader/hyperliquid_trader.go: Correct account value logic
- web/src/App.tsx: Implement hash-based routing

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

Co-Authored-By: tinkle-community <tinklefund@gmail.com>
2025-10-30 21:07:43 +08:00
icy
a2cded592b 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>
2025-10-30 20:57:57 +08:00
icy
c64727ffd0 sync fork 2025-10-30 20:51:22 +08:00
tinkle-community
2608294238 Refactor: Extract availableBalance variable in Hyperliquid trader
Extract availableBalance calculation into a separate variable for better readability.

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

Co-Authored-By: tinkle-community <tinklefund@gmail.com>
2025-10-30 20:09:30 +08:00
tinkle-community
1836ffb0fe Merge pull request #67 from tinkle-community/main
merge
2025-10-30 19:57:36 +08:00
tinkle-community
cf64831842 DevOps: Add PM2 deployment scripts
Add complete PM2 deployment solution:
- pm2.config.js: Dynamic path configuration
- pm2.sh: One-click management script
- PM2_DEPLOYMENT.md: Deployment guide

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

Co-Authored-By: tinkle-community <tinklefund@gmail.com>
2025-10-30 18:20:25 +08:00
tinkle-community
8b52138424 UI: Display position details in Trade History
Frontend changes:
- Update TradeOutcome interface with new fields:
  - quantity: Position size
  - leverage: Leverage multiplier
  - position_value: Total position value
  - margin_used: Margin required

- Add position details display in trade cards:
  - Quantity (with 4 decimal precision)
  - Leverage (shown as "50x")
  - Position Value (shown as "$10000.00")
  - Margin Used (shown as "$200.00")

Visual design:
- 2x2 grid layout for position details
- Color coding: Leverage in gold, Margin in purple
- Conditional rendering with fallback "-" for missing data

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

Co-Authored-By: tinkle-community <tinklefund@gmail.com>
2025-10-30 18:11:15 +08:00
tinkle-community
3ffc6b9ea7 Feature: Add position details to Trade History
Add missing fields to TradeOutcome:
- Quantity: Position size
- Leverage: Leverage multiplier
- PositionValue: Total position value (quantity × openPrice)
- MarginUsed: Margin required (positionValue / leverage)

This provides complete trade information for analysis and display.

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

Co-Authored-By: tinkle-community <tinklefund@gmail.com>
2025-10-30 18:09:16 +08:00
tinkle-community
5c0e17f8e3 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: tinkle-community <tinklefund@gmail.com>
2025-10-30 17:58:25 +08:00
tinkle-community
b36e26d4cf fix:config add hyperliquid_wallet_addr 2025-10-30 17:16:03 +08:00
tinkle-community
4b0664ec93 Merge pull request #59 from liugangdao/main
fix: hyperliquid余额不准确
2025-10-30 17:05:54 +08:00
刘 志
eaaaaf3d1e fix: hyperliquid余额不准确 2025-10-30 08:38:31 +00:00
tinkle-community
5dbc87af94 Merge pull request #54 from tpkeeper/main
Fix mcp defaultConfig override issue in multi-trader, multi-AI model
2025-10-30 16:13:34 +08:00
tpkeeper
9195b2b373 Fix mcp defaultConfig override issue in multi-trader, multi-AI model scenario 2025-10-30 15:46:17 +08:00
tinkle-community
7283035445 Merge pull request #40 from d0lwl0b/main
docs: modernize Docker Compose documentation to V2 syntax
2025-10-30 14:24:52 +08:00
tinkle-community
7c03715efc Merge pull request #48 from SkywalkerJi/main
Reduce the request frequency to the Binance API and add backend caching.
2025-10-30 14:15:19 +08:00