Commit Graph

514 Commits

Author SHA1 Message Date
SkywalkerJi
eb515d74e9 Resolved front-end linting issues. (#533) 2025-11-05 20:41:41 +08:00
SkywalkerJi
696e9f6187 Add ja docs (#530)
* docs: add Japanese README

* docs: Update README.ja.md

* docs: add DOCKER_DEPLOY.ja.md

---------

Co-authored-by: Ikko Ashimine <ashimine_ikko_bp@tenso.com>
2025-11-05 20:14:26 +08:00
ERIC LEUNG
2755eb733a fix: 删除多定义的方法 (#528) 2025-11-05 20:11:50 +08:00
CoderMageFox
86d2a07040 docs: clarify Aster only supports EVM wallets, not Solana wallets (#524) 2025-11-05 19:37:27 +08:00
Ember
a7385e5256 fix(web): remove undefined setHyperliquidWalletAddr call in ExchangeConfigModal (#525) 2025-11-05 19:35:57 +08:00
0xYYBB | ZYY | Bobo
0f98e06d9e Revert "fix: hard system prompt (#401)" (#522)
This reverts commit 7dd669a907.
2025-11-05 19:05:09 +08:00
GitBib
dab933faee fix: update go.sum with missing modernc.org/sqlite dependencies (#523) 2025-11-05 19:03:32 +08:00
Theshyx11
df4af06bc7 docs: 添加 config.db Docker 启动失败 bug 修复文档 (#210)
## 问题描述
Docker Compose 首次启动时,config.db 被创建为目录而非文件,
导致 SQLite 数据库初始化失败,容器不断重启。

错误信息: "unable to open database file: is a directory"

## 发现时间
2025-11-02 00:14 (UTC+8)

## 根本原因
docker-compose.yml 中的卷挂载配置:
  - ./config.db:/app/config.db

当本地 config.db 不存在时,Docker 会自动创建同名**目录**。

## 临时解决方案
1. docker-compose down
2. rm -rf config.db
3. touch config.db
4. docker-compose up -d

## 修复时间
2025-11-02 00:22 (UTC+8)

## 新增文件
- BUGFIX_CONFIG_DB_2025-11-02.md: 详细的 bug 修复报告

## 建议改进
- 在 DOCKER_DEPLOY.md 中添加预启动步骤说明
- 考虑在 Dockerfile 中添加自动初始化脚本

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

Co-authored-by: shy <shy@nofx.local>
Co-authored-by: Claude <noreply@anthropic.com>
2025-11-05 18:21:05 +08:00
Sue
77c99499d7 feat(api): add server IP display for exchange whitelist configuration (#520)
Added functionality to display server public IP address for users to configure exchange API whitelists, specifically for Binance integration.

Backend changes (api/server.go):
- Add GET /api/server-ip endpoint requiring authentication
- Implement getPublicIPFromAPI() with fallback to multiple IP services
- Implement getPublicIPFromInterface() for local network interface detection
- Add isPrivateIP() helper to filter private IP addresses
- Import net package for IP address handling

Frontend changes (web/):
- Add getServerIP() API method in api.ts
- Display server IP in ExchangeConfigModal for Binance
- Add IP copy-to-clipboard functionality
- Load and display server IP when Binance exchange is selected
- Add i18n translations (en/zh) for whitelist IP messages:
  - whitelistIP, whitelistIPDesc, serverIPAddresses
  - copyIP, ipCopied, loadingServerIP

User benefits:
- Simplifies Binance API whitelist configuration
- Shows exact server IP to add to exchange whitelist
- One-click IP copy for convenience

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

Co-authored-by: Claude <noreply@anthropic.com>
2025-11-05 18:15:33 +08:00
Jupiteriana
7dd669a907 fix: hard system prompt (#401) 2025-11-05 17:45:18 +08:00
CoderMageFox
f7391adff9 feat: add i18n support for candidate coins warnings (#516)
- Add 13 translation keys for candidate coins warnings in both English and Chinese
- Update App.tsx to use t() function for all warning text
- Update AITradersPage.tsx to use t() function for signal source warnings
- Ensure proper internationalization for all user-facing messages

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

Co-authored-by: Claude <noreply@anthropic.com>
2025-11-05 17:35:38 +08:00
PoorThoth
0c371c834a Change SQLite driver in database configuration (#441)
* Change SQLite driver in database configuration

Replace SQLite driver from 'github.com/mattn/go-sqlite3' to 'modernc.org/sqlite'.

* Update go.mod

---------

Co-authored-by: tinkle-community <tinklefund@gmail.com>
2025-11-05 17:34:29 +08:00
CoderMageFox
2299a0e34f feat: 添加候选币种为0时的前端警告提示 (#515)
* feat: add frontend warnings for zero candidate coins

当候选币种数量为0时,在前端添加详细的错误提示和诊断信息

主要改动:
1. 决策日志中显示候选币种数量,为0时标红警告
2. 候选币种为0时显示详细警告卡片,包含可能原因和解决方案
3. 交易员列表页面添加信号源未配置的全局警告
4. 更新TraderInfo类型定义,添加use_coin_pool和use_oi_top字段

详细说明:
- 在App.tsx的账户状态摘要中添加候选币种显示
- 当候选币种为0时,显示详细的警告卡片,列出:
  * 可能原因(API未配置、连接超时、数据为空等)
  * 解决方案(配置自定义币种、配置API、禁用选项等)
- 在AITradersPage中添加信号源配置检查
  * 当交易员启用了币种池但未配置API时显示全局警告
  * 提供"立即配置信号源"快捷按钮
- 不改变任何后端逻辑,纯UI层面的用户提示改进

影响范围:
- web/src/App.tsx: 决策记录卡片中的警告显示
- web/src/components/AITradersPage.tsx: 交易员列表页警告
- web/src/types.ts: TraderInfo类型定义更新

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

Co-Authored-By: Claude <noreply@anthropic.com>

* fix: import AlertTriangle from lucide-react in App.tsx

修复TypeScript编译错误:Cannot find name 'AlertTriangle'

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

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-11-05 17:11:04 +08:00
zcan
986886b291 Fix/binance server time (#453)
* Fix Binance futures server time sync

* Fix Binance server time sync; clean up logging and restore decision sorting

---------

Co-authored-by: tinkle-community <tinklefund@gmail.com>
2025-11-05 17:09:47 +08:00
vicnoah
e37f6c16f7 ci(docker): 添加Docker镜像构建和推送的GitHub Actions工作流 (#124)
* ci(docker): 添加Docker镜像构建和推送的GitHub Actions工作流

- 支持在main和develop分支及版本标签的push事件触发
- 支持Pull Request事件及手动触发工作流
- 配置了backend和frontend两个镜像的构建策略
- 使用QEMU和Docker Buildx实现多平台构建(amd64和arm64)
- 集成GitHub Container Registry和Docker Hub登录
- 自动生成镜像元数据和多标签支持
- 支持基于GitHub Actions缓存提升构建速度
- 实现根据事件类型自动决定是否推送镜像
- 输出构建完成的镜像摘要信息

* Update Docker Hub login condition in workflow

* Fix Docker Hub login condition in workflow

* Simplify Docker Hub login step

Removed conditional check for Docker Hub username.

* Change branch names in Docker build workflow

* Update docker-build.yml
2025-11-05 16:55:09 +08:00
ERIC LEUNG
341b70a640 refactor(AITradersPage): remove unused hyperliquidWalletAddr state (#511) 2025-11-05 16:42:56 +08:00
Icyoung
6790895ab1 Merge pull request #462 from zhouyongyou/fix/quantity-zero-min-notional
fix(trader+decision): prevent quantity=0 error with minimum notional validation
2025-11-05 16:29:24 +08:00
Icyoung
3b180e58f8 Merge pull request #467 from zhouyongyou/fix/binance-multi-assets-api-error
fix: 智能处理币安多资产模式和统一账户API错误
2025-11-05 16:23:32 +08:00
Icyoung
d940ef43fd Merge branch 'dev' into fix/binance-multi-assets-api-error 2025-11-05 16:23:22 +08:00
Icyoung
5cdd0ab001 Merge pull request #468 from NoFearInMyHeart-G/dev
feat: 增加持仓最高收益缓存和自动止盈机制
2025-11-05 16:22:05 +08:00
Icyoung
093a3a4bec Merge branch 'dev' into dev 2025-11-05 16:21:57 +08:00
Icyoung
f601e62e90 Merge pull request #437 from zhouyongyou/fix/margin-calculation
fix(margin): correct position sizing formula to prevent insufficient margin errors
2025-11-05 16:13:37 +08:00
Icyoung
c8b8e6192a Merge pull request #436 from zhouyongyou/fix/partial-close-stats
fix(ui): prevent system_prompt_template overwrite when value is empty string
2025-11-05 16:12:12 +08:00
Icyoung
77beea9f9f Merge branch 'dev' into fix/partial-close-stats 2025-11-05 16:11:53 +08:00
Icyoung
267fb10ee1 Merge pull request #433 from zhouyongyou/fix/dual-side-position-mode
fix(binance): initialize dual-side position mode to prevent code=-4061 errors
2025-11-05 16:09:37 +08:00
Icyoung
c859736c72 Merge pull request #435 from zhouyongyou/fix/trader-config-overwrite
fix(margin): correct position sizing formula to prevent insufficient margin errors
2025-11-05 16:08:18 +08:00
Icyoung
6c21ce8386 Merge branch 'dev' into fix/trader-config-overwrite 2025-11-05 16:05:40 +08:00
Icyoung
70fa0730e2 Merge pull request #434 from zhouyongyou/fix/stop-loss-take-profit-separation
fix(trader): separate stop-loss and take-profit order cancellation to prevent accidental deletions
2025-11-05 16:05:00 +08:00
Icyoung
c5d865f309 Merge pull request #429 from zhouyongyou/feat/auto-balance-sync
feat(trader): add automatic balance sync every 10 minutes
2025-11-05 16:02:21 +08:00
tinkle-community
8c105599f6 Merge pull request #493 from simonjiang99/fix/3-minutes-minimum
fix(api):enforce minimum scan interval of three minutes
2025-11-05 16:02:04 +08:00
Icyoung
6099db2105 Merge branch 'dev' into feat/auto-balance-sync 2025-11-05 16:01:57 +08:00
Icyoung
aadde2d0ac Merge pull request #428 from zhouyongyou/fix/initial-balance-sync
fix(api): add balance sync endpoint with smart detection
2025-11-05 15:58:45 +08:00
Icyoung
f30f2ea695 Merge pull request #416 from zhouyongyou/fix/bug-fixes-collection-v2
fix: 修復 6 個 bug(替代 #271)
2025-11-05 15:57:36 +08:00
Icyoung
f3af7370e2 Merge branch 'dev' into fix/bug-fixes-collection-v2 2025-11-05 15:56:58 +08:00
Icyoung
f067003303 Merge pull request #471 from zhouyongyou/fix/hyperliquid-complete-balance-fix
fix(hyperliquid): complete balance detection with 4 critical fixes
2025-11-05 15:47:15 +08:00
Icyoung
feed4ef6a8 Merge pull request #446 from zhouyongyou/fix/json-fullwidth-characters
fix(decision): handle fullwidth JSON characters from AI responses
2025-11-05 15:46:56 +08:00
Icyoung
c7226bf04e Merge pull request #386 from zhouyongyou/feat/configurable-oi-threshold
feat(decision): configurable OI threshold + relaxed trading template
2025-11-05 15:46:25 +08:00
Icyoung
6c78d9dc14 Merge pull request #385 from zhouyongyou/fix/market-price-staleness
fix(market): resolve price staleness causing trade failures
2025-11-05 15:45:52 +08:00
Icyoung
af6a2c5276 Merge pull request #414 from zhouyongyou/feat/query-actual-balance-v2
feat(api): query actual exchange balance when creating trader
2025-11-05 15:45:09 +08:00
Icyoung
ae7f3bc2be Merge pull request #325 from zhouyongyou/refactor/enhance-partial-close-guidance
refactor(prompts): 增強部分平倉使用指導 [依賴 #415]
2025-11-05 15:43:08 +08:00
Icyoung
cb31330380 Merge pull request #273 from zhouyongyou/feat/logger-dynamic-tpsl
feat(logger): 添加動態 TP/SL 日誌支持 [依賴 #415]
2025-11-05 15:42:33 +08:00
Icyoung
31d7fcba8e Merge pull request #415 from zhouyongyou/feat/partial-close-core-v2
feat: 部分平倉和動態止盈止損核心實現 / Partial Close & Dynamic TP/SL Core
2025-11-05 15:41:20 +08:00
tinkle-community
9f5fe361d2 Merge pull request #501 from Hansen1018/add-Hansen-prompt
增加 稳健和风险控制均衡基础策略提示词
2025-11-05 15:33:02 +08:00
tinkle-community
552b54d8a3 Merge pull request #500 from CoderMageFox/feature/aster-field-help-tooltips
feat: add help tooltips for Aster exchange configuration fields
2025-11-05 15:04:27 +08:00
tinkle-community
5d247d38fe Merge pull request #498 from tangmengqiu/dev_logs
feat(log): add logrus log lib and add telegram notification push as an option
2025-11-05 14:15:47 +08:00
CoderMageFox
ba31078d92 feat: add Aster API wallet links to help tooltips
Added direct links to Aster API wallet page in help tooltips for easier access.

Changes:
- Added English link: https://www.asterdex.com/en/api-wallet
- Added Chinese link: https://www.asterdex.com/zh-CN/api-wallet
- Updated asterSignerDesc with API wallet URL
- Updated asterPrivateKeyDesc with API wallet URL and security note
- Users can now directly access the API wallet page from tooltips

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-05 13:26:05 +08:00
CoderMageFox
cf2314c266 refactor: merge USDT warning into security warning box
Merged standalone USDT warning into existing security warning section for cleaner UI.

Changes:
- Removed separate red warning box for USDT
- Added USDT warning as first item in security warning box (conditional on Aster exchange)
- Now shows 4 warnings for Aster: USDT requirement + 3 general security warnings
- Cleaner, more organized warning presentation

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-05 13:19:39 +08:00
Hansen1018
ad563049a0 增加 稳健和风险控制均衡基础策略提示词
主要优化点:

强化风险控制框架 明确单笔风险≤2%,总风险≤6%
添加连续亏损后的仓位调整规则

设置单日和每周最大亏损限制

提高开仓标准 要求至少3个技术指标支持
必须有多时间框架趋势确认

入场时机要求更具体

完善决策流程 增加市场环境评估环节
明确风险回报比计算要求

添加资金保护检查点

细化行为准则 明确等待最佳机会的重要性
强调分批止盈和严格止损

添加情绪控制具体方法

增强绩效反馈机制 不同夏普比率区间的具体行动指南
亏损状态下的仓位控制要求

盈利状态下的纪律保持提醒

这个优化版本更加注重风险控制和稳健性,同时保持了交易的专业性和灵活性。
2025-11-05 13:19:07 +08:00
CoderMageFox
df6f775f3c feat: add USDT warning for Aster exchange configuration
Added warning message to inform users that Aster only tracks USDT balance, preventing P&L calculation errors from asset price fluctuations.

Why this is important:
- Aster trader only tracks USDT balance (aster_trader.go:453)
- If users use BNB/ETH as margin, price fluctuations will cause:
  * Initial balance becomes inaccurate
  * P&L statistics will be wrong
  * Example: 10 BNB @ $100 = $1000, if BNB drops to $90, real equity is $900 but system still shows $1000

Changes:
- Added asterUsdtWarning translation in both EN and ZH
- Added red warning box below Aster private key field
- Clear message: "Please use USDT as margin currency"

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-05 13:15:49 +08:00
CoderMageFox
a03e4269ce feat: add help tooltips for Aster exchange configuration fields
Added interactive help icons with tooltips for Aster exchange fields (user, signer, privateKey) to guide users through correct configuration.

Changes:
- Added HelpCircle icon from lucide-react
- Created reusable Tooltip component with hover/click interaction
- Added bilingual help descriptions in translations.ts
- User field: explains main wallet address (login address)
- Signer field: explains API wallet address generation
- Private Key field: clarifies local-only usage, never transmitted

This prevents user confusion and configuration errors when setting up Aster exchange.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-05 13:03:41 +08:00