Commit Graph

135 Commits

Author SHA1 Message Date
SkywalkerJi e88f842158 Upgrade this repository's open-source license to AGPL. 2025-11-03 19:50:50 +08:00
tinkle-community 4a8d4d9284 update aster exchange guide 2025-11-02 12:15:40 +08:00
tinkle-community 20e2145771 Merge pull request #160 from hrzisme/update-readme-narrative-team
Simplify team intro and clarify contact channels
2025-11-01 11:31:16 +08:00
nobody c8c7b46a72 Simplify team intro and clarify contact channels
- Remove job descriptions, keep only names and Twitter handles
- Investment: DM Tinkle or Zack
- Partnerships: DM official Twitter @nofx_ai
2025-11-01 11:28:11 +08:00
tinkle-community 8ed4cafcb7 Merge pull request #159 from hrzisme/update-readme-narrative-team
Update readme narrative team
2025-11-01 11:05:09 +08:00
nobody 9743854df2 Add official Twitter account @nofx_ai to all READMEs 2025-11-01 10:53:58 +08:00
nobody 51bb7d65d0 Update multilingual READMEs: Reposition as Agentic Trading OS with team info 2025-11-01 10:49:48 +08:00
tinkle-community 12238fef9b Merge pull request #156 from hrzisme/update-readme-narrative-team
Update README.md
2025-11-01 10:46:36 +08:00
nobody 5117475e59 Update README: Add Zack's Twitter handle and refine team/funding info 2025-11-01 10:41:37 +08:00
nobody e8aaf9eb4d Update README.md 2025-11-01 10:30:24 +08:00
tinkle-community 40c8baf2bf Merge pull request #76 from cookieY/main 2025-10-31 03:39:09 +08:00
henrylab ed9417195c 1. 修复hyperliquid 总盈亏,总净值计算错误问题
2. 修复持仓盈亏百分比错误,计算公式应该加入杠杆倍数
2025-10-30 22:23:05 +08:00
tinkle-community e4d5dcc23c 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.
Co-Authored-By: tinkle-community <tinklefund@gmail.com>
2025-10-30 22:21:57 +08:00
tinkle-community 85fa9c09ab 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
Co-Authored-By: tinkle-community <tinklefund@gmail.com>
2025-10-30 22:12:09 +08:00
tinkle-community edd8bffd91 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).
Co-Authored-By: tinkle-community <tinklefund@gmail.com>
2025-10-30 21:27:53 +08:00
tinkle-community 5eba8471cf 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
Co-Authored-By: tinkle-community <tinklefund@gmail.com>
2025-10-30 21:07:43 +08:00
tinkle-community 004ae60d31 Refactor: Extract availableBalance variable in Hyperliquid trader
Extract availableBalance calculation into a separate variable for better readability.
Co-Authored-By: tinkle-community <tinklefund@gmail.com>
2025-10-30 20:09:30 +08:00
tinkle-community 57cc6c2d8f 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
Co-Authored-By: tinkle-community <tinklefund@gmail.com>
2025-10-30 18:20:25 +08:00
tinkle-community 542ae63ee4 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
Co-Authored-By: tinkle-community <tinklefund@gmail.com>
2025-10-30 18:11:15 +08:00
tinkle-community beb9561742 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.
Co-Authored-By: tinkle-community <tinklefund@gmail.com>
2025-10-30 18:09:16 +08:00
tinkle-community fd8b1477e7 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
Co-Authored-By: tinkle-community <tinklefund@gmail.com>
2025-10-30 17:58:25 +08:00
tinkle-community e249aaa16b fix:config add hyperliquid_wallet_addr 2025-10-30 17:16:03 +08:00
tinkle-community 7545b7a894 Merge pull request #59 from liugangdao/main
fix: hyperliquid余额不准确
2025-10-30 17:05:54 +08:00
刘 志 887899749f fix: hyperliquid余额不准确 2025-10-30 08:38:31 +00:00
tinkle-community e480296e33 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 b773d7289a Fix mcp defaultConfig override issue in multi-trader, multi-AI model scenario 2025-10-30 15:46:17 +08:00
tinkle-community 0f9b379cec 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 d5842c38ab 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
SkywalkerJi 01add7037a Reduce the request frequency to the Binance API and add backend caching. 2025-10-30 14:01:06 +08:00
d0lwl0b d49c64ea53 Merge branch 'tinkle-community:main' into main 2025-10-30 13:49:39 +08:00
tinkle-community 1a27338faa Merge pull request #44 from SkywalkerJi/main
Smooth the account equity curve.
2025-10-30 13:17:55 +08:00
tinkle-community e9f49625c8 Merge pull request #45 from yiplee/main
Change health check endpoint to accept any HTTP method for improved f…
2025-10-30 13:15:22 +08:00
tinkle-community e3506fe0e8 Merge pull request #46 from mxyhi/main
fix: 修复aster 没有取消委托单的问题
2025-10-30 13:14:17 +08:00
d0lwl0b 0d52bc8ad9 refactor(docker): restructure Docker setup with dedicated backend/frontend services 2025-10-30 13:11:29 +08:00
mxyhi b75a671b2c 🐛 fix(order): 开仓前先撤销所有挂单
- 先在开仓前取消所有挂单,防止残留挂单导致仓位叠加
- 取消挂单失败时记录警告,但仍继续开仓
2025-10-30 13:08:26 +08:00
mxyhi a80590e592 feat(trader): aster平仓后自动取消挂单
- 调整 CloseLong/CloseShort 逻辑, 在平仓后调用 CancelAllOrders 清理挂单
2025-10-30 13:06:14 +08:00
yiplee fd0cf4abb2 Change health check endpoint to accept any HTTP method for improved flexibility. 2025-10-30 13:00:17 +08:00
SkywalkerJi c0ea50a409 Merge branch 'tinkle-community:main' into main 2025-10-30 12:54:04 +08:00
SkywalkerJi b39efdac27 Smooth the account equity curve. 2025-10-30 12:53:27 +08:00
d0lwl0b 907f660398 Merge branch 'tinkle-community:main' into main 2025-10-30 12:26:21 +08:00
d0lwl0b 2a3276c125 docs: update Docker Compose documentation to V2 syntax 2025-10-30 12:26:00 +08:00
tinkle-community b3fb73c4a0 Merge pull request #39 from SkywalkerJi/main
Optimize front-end display on mobile devices.
2025-10-30 12:14:53 +08:00
d0lwl0b 236d97c127 Merge branch 'tinkle-community:main' into main 2025-10-30 12:13:00 +08:00
SkywalkerJi 7208debb11 Optimize mobile display to prevent selection boxes from exceeding the screen boundaries. 2025-10-30 12:08:39 +08:00
tinkle-community 043e5e97b6 Merge pull request #35 from SkywalkerJi/main
When a custom URL ends with #, force the use of the full URL without appending /chat/completions.
2025-10-30 10:50:23 +08:00
tinkle-community 37a2bb4d46 Merge pull request #34 from ITfisher/release
Solving Slow Build Speed and Health Check 404 Issues
2025-10-30 10:47:23 +08:00
SkywalkerJi be37a65d91 Merge branch 'tinkle-community:main' into main 2025-10-30 10:38:45 +08:00
SkywalkerJi 67da692c64 When a custom URL ends with #, force the use of the full URL without appending /chat/completions. 2025-10-30 10:38:15 +08:00
tinkle-community c487da6471 Merge pull request #33 from SkywalkerJi/main
Expose the default mainstream currency settings to the configuration file
2025-10-30 10:36:53 +08:00
itfisher 027c0a31e4 fix conflict 2025-10-30 10:33:41 +08:00