Commit Graph

106 Commits

Author SHA1 Message Date
d0lwl0b
1faacf0565 Merge branch 'tinkle-community:main' into main 2025-10-30 13:49:39 +08:00
tinkle-community
72098251d1 Merge pull request #44 from SkywalkerJi/main
Smooth the account equity curve.
2025-10-30 13:17:55 +08:00
tinkle-community
22f0e70b35 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
d7bfdc140d Merge pull request #46 from mxyhi/main
fix: 修复aster 没有取消委托单的问题
2025-10-30 13:14:17 +08:00
d0lwl0b
f9524c459a refactor(docker): restructure Docker setup with dedicated backend/frontend services 2025-10-30 13:11:29 +08:00
mxyhi
908236640a 🐛 fix(order): 开仓前先撤销所有挂单
- 先在开仓前取消所有挂单,防止残留挂单导致仓位叠加
- 取消挂单失败时记录警告,但仍继续开仓
2025-10-30 13:08:26 +08:00
mxyhi
234c4ab3c3 feat(trader): aster平仓后自动取消挂单
- 调整 CloseLong/CloseShort 逻辑, 在平仓后调用 CancelAllOrders 清理挂单
2025-10-30 13:06:14 +08:00
yiplee
a51861ea78 Change health check endpoint to accept any HTTP method for improved flexibility. 2025-10-30 13:00:17 +08:00
SkywalkerJi
1e94d1cdac Merge branch 'tinkle-community:main' into main 2025-10-30 12:54:04 +08:00
SkywalkerJi
45ae0f714e Smooth the account equity curve. 2025-10-30 12:53:27 +08:00
d0lwl0b
0dc341675f Merge branch 'tinkle-community:main' into main 2025-10-30 12:26:21 +08:00
d0lwl0b
6a565e5ffa docs: update Docker Compose documentation to V2 syntax 2025-10-30 12:26:00 +08:00
tinkle-community
956cfdadc3 Merge pull request #39 from SkywalkerJi/main
Optimize front-end display on mobile devices.
2025-10-30 12:14:53 +08:00
d0lwl0b
10f9ad0288 Merge branch 'tinkle-community:main' into main 2025-10-30 12:13:00 +08:00
SkywalkerJi
616215cdd9 Optimize mobile display to prevent selection boxes from exceeding the screen boundaries. 2025-10-30 12:08:39 +08:00
tinkle-community
0072c6ee09 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
6ad0f8eafb 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
8a1e81b1c0 Merge branch 'tinkle-community:main' into main 2025-10-30 10:38:45 +08:00
SkywalkerJi
10c68aa1b7 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
a0be038a7e 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
c2852b34aa fix conflict 2025-10-30 10:33:41 +08:00
itfisher
fd94973b4d improve go build time 2025-10-30 10:14:39 +08:00
SkywalkerJi
7f7ad141a4 Expose the default mainstream currency settings to the configuration file 2025-10-30 10:01:45 +08:00
tinkle-community
557de33915 Merge pull request #25 from Im-Sue/main
add 常见问题.md 提示如何处理币安API 4061问题
2025-10-30 02:57:40 +08:00
sue
3f002a193e fix: 修复配置硬编码问题
## 修复内容

### 1. AI决策杠杆配置动态化 (decision/engine.go)
- **问题**: System Prompt 中硬编码 50x/20x 杠杆,导致 AI 生成的决策不符合用户配置(5x)
- **修复**:
  - buildSystemPrompt() 新增 btcEthLeverage, altcoinLeverage 参数
  - System Prompt 文本使用动态杠杆值(第225-226行)
  - 示例 JSON 使用配置杠杆值(第299行)
  - 调用时传入实际配置值(第100行)
- **影响**: AI 现在会根据用户配置的杠杆限制生成决策

### 2. 前端初始余额显示优化 (web/src/components/EquityChart.tsx)
- **问题**: 初始余额硬编码为 1000 USDT,与用户配置的 100 USDT 不符
- **修复**: 实现三级回退机制
  1. 优先使用历史数据第一个点的 total_equity
  2. 备用使用当前账户 account.total_equity
  3. 最后使用默认值 100(匹配常见配置)
- **影响**: 前端显示的初始余额现在与实际配置一致

## 技术细节

**函数签名变更**:
```go
// 修改前
func buildSystemPrompt(accountEquity float64) string

// 修改后
func buildSystemPrompt(accountEquity float64, btcEthLeverage, altcoinLeverage int) string
```

**React 状态优化**:
```typescript
// 修改前
const initialBalance = history[0]?.total_equity || 1000;

// 修改后
const initialBalance = history[0]?.total_equity || account?.total_equity || 100;
```

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

Co-Authored-By: tinkle-community <tinklefund@gmail.com>
2025-10-30 02:43:14 +08:00
sue
b5f300b570 add 常见问题.md 提示如何处理币安API 4061问题 2025-10-30 02:35:52 +08:00
tinkle-community
ef36e308ce Merge pull request #24 from Im-Sue/main
fix: 修复AI学习数据加载失败问题-前端硬编码api
2025-10-30 02:15:10 +08:00
sue
9da0ca5d9f Merge branch 'main' of https://github.com/tinkle-community/nofx 2025-10-30 02:07:41 +08:00
tinkle-community
b40c6d859a Docs: Add screenshots section to all README files
Add professional UI screenshots to demonstrate the trading platform:
- Competition mode: Multi-AI leaderboard with real-time performance charts
- Trader details: Complete dashboard with equity curves and decision logs

Screenshots added to all language versions:
- README.md (English)
- README.zh-CN.md (Chinese)
- README.ru.md (Russian)
- README.uk.md (Ukrainian)

Images organized in screenshots/ directory with descriptive filenames:
- competition-page.png (AI battle interface)
- details-page.png (trader dashboard)

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

Co-Authored-By: tinkle-community <tinklefund@gmail.com>
2025-10-30 01:42:38 +08:00
sue
0d7325e082 fix: 修复AI学习数据加载失败问题
问题描述:
- AILearning组件直接使用硬编码的localhost:8080地址
- 绕过了Vite代理配置,导致加载失败
- 在生产环境无法正常工作

修复内容:
1. api.ts: 添加统一的getPerformance()方法
2. AILearning.tsx: 移除硬编码URL,使用统一API
3. 删除多余的fetcher函数

技术改进:
- 使用Vite代理配置,避免CORS问题
- 统一API管理,提高可维护性
- 支持开发和生产环境

影响范围:
- web/src/lib/api.ts: +11行 (新增getPerformance方法)
- web/src/components/AILearning.tsx: -4行, +2行 (重构API调用)

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

Co-Authored-By: tinkle-community <tinklefund@gmail.com>
2025-10-30 01:36:51 +08:00
tinkle-community
307116cf38 Merge pull request #22 from hrzisme/feat/aster-dex-support
Feat/aster dex support
2025-10-30 01:01:54 +08:00
nobody
b663e72dba Delete COMMIT_MESSAGE.txt 2025-10-30 00:45:39 +08:00
nobody
78ba807cab Update readmes. 2025-10-30 00:41:14 +08:00
nobody
7312c3b9aa Delete HOW_TO_SUBMIT_PR.md 2025-10-30 00:32:13 +08:00
nobody
be7445c58c change the config 2025-10-30 00:29:39 +08:00
d0lwl0b
b39399fe85 chore: update .dockerignore to exclude lock files 2025-10-30 00:28:39 +08:00
nobody
6281166403 feat: Add Aster DEX exchange support + fix precision issues
## Features
- Add full Aster DEX integration with Binance-compatible API
- Support Web3 authentication with API wallet system
- Add comprehensive Aster integration guide (ASTER_INTEGRATION.md)
- Add example Aster configuration (config.aster.example.json)

## Bug Fixes
- Fix precision error (code -1111) for all order types
- Implement proper float-to-string conversion with exchange precision
- Add automatic precision fetching from /exchangeInfo endpoint
- Remove trailing zeros from formatted values

## Documentation
- Update README.md with Aster quick start guide
- Add detailed setup instructions for creating API wallet
- Include troubleshooting FAQ and security best practices
- Update core features to mention three supported exchanges

## Technical Details
- Added formatFloatWithPrecision() helper function
- Updated all order functions to use proper precision formatting
- Added precision logging for debugging
- Fully backward compatible with existing configurations

Closes #[issue number if applicable]
2025-10-30 00:27:33 +08:00
d0lwl0b
280b45756d Merge branch 'tinkle-community:main' into main 2025-10-30 00:19:12 +08:00
tinkle-community
207fb5a02e Merge pull request #20 from fanyinghao/fix-docker-compose
Enhance Docker setup
2025-10-30 00:07:38 +08:00
tinkle-community
5b3b26921d Fix: Add input_prompt display in decision cards
Previously, the frontend DecisionRecord type was missing the input_prompt
field that exists in the backend DecisionLog, causing the input context
sent to AI to not be displayed in the UI.

Changes:
- Add input_prompt field to DecisionRecord interface in both type files
- Add collapsible Input Prompt section in DecisionCard component
- Display input_prompt before AI Chain of Thought with blue styling
- Use same expand/collapse interaction pattern as CoT trace

Now users can view both the input context and AI's reasoning process
in the decision cards.

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

Co-Authored-By: tinkle-community <tinklefund@gmail.com>
2025-10-29 23:59:11 +08:00
Yinghao Fan
0cff762ce0 Merge remote-tracking branch 'upstream/main' into fix-docker-compose 2025-10-29 23:47:18 +08:00
itfisher
8551e01e39 improve go build time 2025-10-29 23:38:41 +08:00
Yinghao Fan
61335ae036 Enhance Docker setup: Add shared volume for frontend files and update Dockerfile for dependencies
Changes:
- Updated `docker-compose.yml` to include a new shared volume `frontend-dist` for frontend files.
- Modified the `nofx` service command to copy frontend files to the shared volume.
- Updated `Dockerfile` to use Go 1.25 and added necessary build dependencies for TA-Lib installation.

These changes improve the Docker environment by facilitating shared access to frontend assets and ensuring the build process is up-to-date with the latest Go version.
2025-10-29 23:34:21 +08:00
itfisher
0842f9f498 fix level rage 2025-10-29 23:18:50 +08:00
itfisher
90900cf7ef fix health check 2025-10-29 23:10:47 +08:00
d0lwl0b
2383d0bbb2 Merge branch 'tinkle-community:main' into main 2025-10-29 23:08:10 +08:00
tinkle-community
8d930464bc Merge pull request #18 from manwallet/feature/custom-api-support
Feature: Add support for custom OpenAI-compatible API
2025-10-29 23:03:52 +08:00
itfisher
c3f56b7976 fix docker build error 2025-10-29 22:59:59 +08:00
btcman
27ba298eed 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: tinkle-community <tinklefund@gmail.com>
2025-10-29 22:48:28 +08:00
itfisher
201600f874 fix docker build error 2025-10-29 22:38:04 +08:00