mirror of
https://github.com/NoFxAiOS/nofx.git
synced 2026-07-10 22:36:58 +08:00
Feat: Update docs
- 重构文档结构 - 更新文档内容 - 制定roadmap - 提供中/EN 双语文档
This commit is contained in:
233
docs/community/README.md
Normal file
233
docs/community/README.md
Normal file
@@ -0,0 +1,233 @@
|
||||
# 👥 NOFX Community
|
||||
|
||||
Welcome to the NOFX community! This section contains everything you need to contribute and participate.
|
||||
|
||||
---
|
||||
|
||||
## 🤝 How to Contribute
|
||||
|
||||
### Getting Started
|
||||
|
||||
1. **Read the Guides**
|
||||
- [Contributing Guide](../../CONTRIBUTING.md) - Complete contribution workflow
|
||||
- [Code of Conduct](../../CODE_OF_CONDUCT.md) - Community standards
|
||||
- [Security Policy](../../SECURITY.md) - Report vulnerabilities
|
||||
|
||||
2. **Find Something to Work On**
|
||||
- Browse [GitHub Issues](https://github.com/tinkle-community/nofx/issues)
|
||||
- Look for `good first issue` label
|
||||
- Check out [bounty tasks](#-bounty-program)
|
||||
|
||||
3. **Join the Community**
|
||||
- 💬 [Telegram Developer Community](https://t.me/nofx_dev_community)
|
||||
- 🐦 [Twitter @nofx_ai](https://x.com/nofx_ai)
|
||||
- 🐙 [GitHub Discussions](https://github.com/tinkle-community/nofx/discussions)
|
||||
|
||||
---
|
||||
|
||||
## 💰 Bounty Program
|
||||
|
||||
### Active Bounties
|
||||
|
||||
NOFX offers bounties for valuable contributions:
|
||||
|
||||
| Category | Reward Range | Examples |
|
||||
|----------|--------------|----------|
|
||||
| 🥇 Major Features | $500-1000 | Exchange integration, core architecture |
|
||||
| 🥈 Medium Features | $200-500 | WebSocket support, new AI models |
|
||||
| 🥉 Small Features | $50-200 | Bug fixes, UI improvements, documentation |
|
||||
|
||||
### How to Claim Bounties
|
||||
|
||||
**📖 Complete Guide:** [bounty-guide.md](bounty-guide.md)
|
||||
|
||||
**Quick Steps:**
|
||||
1. Find issue tagged `[BOUNTY]`
|
||||
2. Comment with your proposal
|
||||
3. Wait for approval
|
||||
4. Work on the task
|
||||
5. Submit PR with demo
|
||||
6. Get paid after merge!
|
||||
|
||||
### Current Bounty Tasks
|
||||
|
||||
| Task | Reward | Difficulty | Status |
|
||||
|------|--------|------------|--------|
|
||||
| [Hyperliquid Integration](bounty-hyperliquid.md) | TBD | Hard | 🟡 Open |
|
||||
| [Aster DEX Integration](bounty-aster.md) | TBD | Medium | ✅ Completed |
|
||||
|
||||
---
|
||||
|
||||
## 🏆 Recognition
|
||||
|
||||
### Ways to Get Recognized
|
||||
|
||||
**Contributor Levels:**
|
||||
- 🌟 **Active Contributor** - Submit quality PRs
|
||||
- ⭐ **Trusted Contributor** - 3+ merged PRs, given review rights
|
||||
- 💎 **Core Team** - Top contributors, invited by maintainers
|
||||
|
||||
**Benefits:**
|
||||
- Listed in README and release notes
|
||||
- Direct access to maintainer discussions
|
||||
- Priority support for your issues
|
||||
- Invitation to private roadmap planning
|
||||
|
||||
### Hall of Fame
|
||||
|
||||
**Top Contributors:**
|
||||
- Coming soon! Be the first! 🚀
|
||||
|
||||
---
|
||||
|
||||
## 📋 Contribution Types
|
||||
|
||||
### Code Contributions
|
||||
- New exchange integrations
|
||||
- AI model adapters
|
||||
- Bug fixes and improvements
|
||||
- Performance optimizations
|
||||
|
||||
**Required:**
|
||||
- ✅ Code compiles and runs
|
||||
- ✅ Follows code style guidelines
|
||||
- ✅ Includes basic tests (preferred)
|
||||
- ✅ Updates documentation if needed
|
||||
|
||||
### Documentation
|
||||
- Tutorial writing
|
||||
- Translation (中文, Русский, Українська)
|
||||
- FAQ updates
|
||||
- Video guides
|
||||
|
||||
**Rewards:**
|
||||
- $50-200 for comprehensive guides
|
||||
- Recognition in docs
|
||||
- Contributor badge
|
||||
|
||||
### Testing & QA
|
||||
- Bug reports with reproduction steps
|
||||
- Security vulnerability reports (see [Security Policy](../../SECURITY.md))
|
||||
- Testnet verification
|
||||
- Performance testing
|
||||
|
||||
**Rewards:**
|
||||
- $50-500 for critical bug finds
|
||||
- Up to $1000 for security vulnerabilities
|
||||
- Recognition in security hall of fame
|
||||
|
||||
---
|
||||
|
||||
## 🌍 Community Channels
|
||||
|
||||
### Primary Channels
|
||||
|
||||
| Platform | Purpose | Link |
|
||||
|----------|---------|------|
|
||||
| 💬 Telegram | Real-time chat, questions | [Join](https://t.me/nofx_dev_community) |
|
||||
| 🐙 GitHub | Issues, PRs, discussions | [Visit](https://github.com/tinkle-community/nofx) |
|
||||
| 🐦 Twitter | Announcements, updates | [@nofx_ai](https://x.com/nofx_ai) |
|
||||
|
||||
### Core Team
|
||||
|
||||
- **Tinkle** - [@Web3Tinkle](https://x.com/Web3Tinkle)
|
||||
- **Zack** - [@0x_ZackH](https://x.com/0x_ZackH)
|
||||
|
||||
**Contact:**
|
||||
- Technical questions → Telegram or GitHub Issues
|
||||
- Business inquiries → Twitter DM to core team
|
||||
- Security reports → [SECURITY.md](../../SECURITY.md)
|
||||
|
||||
---
|
||||
|
||||
## 📅 Community Events
|
||||
|
||||
### Regular Activities
|
||||
- **Weekly Updates** - Development progress (Telegram)
|
||||
- **Monthly AMA** - Ask maintainers anything
|
||||
- **Quarterly Roadmap** - Future plans discussion
|
||||
|
||||
### Upcoming Events
|
||||
- *No scheduled events yet*
|
||||
|
||||
**Want to organize an event?**
|
||||
- Contact core team on Telegram
|
||||
- Propose in GitHub Discussions
|
||||
- Tweet and tag @nofx_ai
|
||||
|
||||
---
|
||||
|
||||
## 🎓 Learning Resources
|
||||
|
||||
### For Contributors
|
||||
|
||||
**Understanding NOFX:**
|
||||
- [System Architecture](../architecture/README.md) *(coming soon)*
|
||||
- [API Reference](../architecture/api-reference.md) *(coming soon)*
|
||||
- [Database Schema](../architecture/database-schema.md) *(coming soon)*
|
||||
|
||||
**Learning Materials:**
|
||||
- Go programming: [Tour of Go](https://go.dev/tour/)
|
||||
- React/TypeScript: [React Docs](https://react.dev/)
|
||||
- Trading basics: [Binance Academy](https://academy.binance.com/)
|
||||
|
||||
### Recommended Reading
|
||||
|
||||
1. **Before Contributing:**
|
||||
- [Contributing Guide](../../CONTRIBUTING.md)
|
||||
- [Code of Conduct](../../CODE_OF_CONDUCT.md)
|
||||
|
||||
2. **For Exchange Integration:**
|
||||
- [Hyperliquid Bounty](bounty-hyperliquid.md)
|
||||
- [Aster Bounty](bounty-aster.md)
|
||||
- Existing code: `trader/binance_futures.go`
|
||||
|
||||
3. **For AI Features:**
|
||||
- [Custom API Guide](../getting-started/custom-api.md)
|
||||
- MCP client code: `mcp/client.go`
|
||||
- Decision engine: `decision/engine.go`
|
||||
|
||||
---
|
||||
|
||||
## 🛡️ Community Guidelines
|
||||
|
||||
### Our Values
|
||||
- **Respect** - Treat everyone with courtesy
|
||||
- **Transparency** - Open communication and decisions
|
||||
- **Quality** - High standards for contributions
|
||||
- **Collaboration** - Work together, help each other
|
||||
|
||||
### Not Acceptable
|
||||
- ❌ Harassment or discrimination
|
||||
- ❌ Spam or self-promotion
|
||||
- ❌ Sharing malicious code
|
||||
- ❌ Violating [Code of Conduct](../../CODE_OF_CONDUCT.md)
|
||||
|
||||
**Violations will result in:**
|
||||
1. Warning
|
||||
2. Temporary ban
|
||||
3. Permanent ban (serious cases)
|
||||
|
||||
---
|
||||
|
||||
## 📊 Community Stats
|
||||
|
||||
| Metric | Count |
|
||||
|--------|-------|
|
||||
| GitHub Stars | Check [repo](https://github.com/tinkle-community/nofx) |
|
||||
| Contributors | 21+ |
|
||||
| Open Issues | Check [issues](https://github.com/tinkle-community/nofx/issues) |
|
||||
| Merged PRs | Check [pulls](https://github.com/tinkle-community/nofx/pulls?q=is%3Apr+is%3Amerged) |
|
||||
|
||||
---
|
||||
|
||||
## 🚀 Quick Links
|
||||
|
||||
- **Want to contribute code?** → [Contributing Guide](../../CONTRIBUTING.md)
|
||||
- **Want to claim bounty?** → [Bounty Guide](bounty-guide.md)
|
||||
- **Found a security issue?** → [Security Policy](../../SECURITY.md)
|
||||
- **Have questions?** → [Telegram Community](https://t.me/nofx_dev_community)
|
||||
|
||||
---
|
||||
|
||||
[← Back to Documentation Home](../README.md)
|
||||
157
docs/community/bounty-aster.md
Normal file
157
docs/community/bounty-aster.md
Normal file
@@ -0,0 +1,157 @@
|
||||
# 🚀 [BOUNTY] Integrate Aster Exchange Support
|
||||
|
||||
## 💰 Bounty Reward
|
||||
**To be discussed** - Open to proposals from contributors
|
||||
|
||||
## 📋 Overview
|
||||
We're looking for contributors to add Aster exchange support to NOFX AI Trading System. Currently supports Binance Futures, seeking to expand to Aster perpetual contracts.
|
||||
|
||||
## 🎯 Task Requirements
|
||||
|
||||
### Core Features to Implement
|
||||
|
||||
#### 1. **Aster API Integration**
|
||||
- [ ] Account management (balance, positions, margin)
|
||||
- [ ] Market data fetching (K-lines, order book, trades)
|
||||
- [ ] Order execution (market/limit orders)
|
||||
- [ ] Position management (open, close, modify)
|
||||
- [ ] Websocket real-time data stream (if available)
|
||||
|
||||
#### 2. **Adapter Layer**
|
||||
- [ ] Create `trader/aster_perpetual.go` adapter
|
||||
- [ ] Implement unified interface compatible with existing `BinanceFuturesClient`
|
||||
- [ ] Handle Aster-specific features (if any)
|
||||
|
||||
#### 3. **Configuration Support**
|
||||
```json
|
||||
{
|
||||
"traders": [
|
||||
{
|
||||
"id": "aster_trader",
|
||||
"name": "Aster AI Trader",
|
||||
"exchange": "aster", // NEW
|
||||
"aster_api_key": "xxx",
|
||||
"aster_secret_key": "xxx",
|
||||
"ai_model": "deepseek",
|
||||
"initial_balance": 1000.0
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
#### 4. **Risk Control Adaptation**
|
||||
- [ ] Adapt position limits for Aster specs
|
||||
- [ ] Handle leverage rules (may differ from Binance)
|
||||
- [ ] Implement liquidation price calculation
|
||||
- [ ] Funding rate integration (if applicable)
|
||||
|
||||
#### 5. **Testing & Documentation**
|
||||
- [ ] Unit tests for API wrapper
|
||||
- [ ] Integration tests with testnet (if available)
|
||||
- [ ] Update README with Aster setup guide
|
||||
- [ ] Add Aster-specific troubleshooting docs
|
||||
|
||||
## 📚 Technical References
|
||||
|
||||
**Aster Resources:**
|
||||
- Official Website: [Add Aster exchange URL]
|
||||
- API Documentation: [Add Aster API docs URL]
|
||||
- SDK/Libraries: [Add if available]
|
||||
|
||||
**NOFX Architecture:**
|
||||
- See `trader/binance_futures.go` as reference implementation
|
||||
- Main trading logic: `trader/auto_trader.go`
|
||||
- Configuration: `config.json` structure
|
||||
|
||||
## 🔧 Implementation Guidelines
|
||||
|
||||
### File Structure
|
||||
```
|
||||
trader/
|
||||
├── binance_futures.go (existing reference)
|
||||
├── aster_perpetual.go (NEW - to implement)
|
||||
└── exchange_interface.go (NEW - unified interface)
|
||||
|
||||
config/
|
||||
└── config.go (UPDATE - add Aster config)
|
||||
```
|
||||
|
||||
### Interface to Implement
|
||||
```go
|
||||
type ExchangeClient interface {
|
||||
// Account
|
||||
GetAccount() (*AccountInfo, error)
|
||||
GetPositions() ([]*Position, error)
|
||||
|
||||
// Market Data
|
||||
GetKlines(symbol, interval string, limit int) ([]*Kline, error)
|
||||
GetTicker(symbol string) (*Ticker, error)
|
||||
|
||||
// Trading
|
||||
CreateOrder(params *OrderParams) (*Order, error)
|
||||
ClosePosition(symbol, side string) error
|
||||
|
||||
// Risk Management
|
||||
SetLeverage(symbol string, leverage int) error
|
||||
GetLiquidationPrice(position *Position) (float64, error)
|
||||
}
|
||||
```
|
||||
|
||||
## ✅ Acceptance Criteria
|
||||
|
||||
**Minimum Requirements:**
|
||||
- [ ] Can connect to Aster testnet/mainnet
|
||||
- [ ] Fetch real-time account balance and positions
|
||||
- [ ] Execute market orders successfully
|
||||
- [ ] Close positions correctly
|
||||
- [ ] Calculate accurate P/L
|
||||
- [ ] No breaking changes to existing Binance integration
|
||||
|
||||
**Bonus Points:**
|
||||
- [ ] Websocket streaming for real-time data
|
||||
- [ ] Support for limit orders and stop-loss/take-profit
|
||||
- [ ] Multi-exchange competition mode (Binance vs Aster)
|
||||
- [ ] Performance comparison dashboard
|
||||
|
||||
## 📝 How to Contribute
|
||||
|
||||
1. **Comment on this issue** to express interest
|
||||
2. **Fork the repository** and create a feature branch
|
||||
3. **Implement the integration** following guidelines above
|
||||
4. **Test thoroughly** on testnet before mainnet
|
||||
5. **Submit a Pull Request** with:
|
||||
- Code changes
|
||||
- Tests
|
||||
- Documentation updates
|
||||
- Demo video/screenshots
|
||||
|
||||
## 🤝 Support & Questions
|
||||
|
||||
- Ask questions in this issue's comments
|
||||
- Join our Telegram: [NOFX Developer Community](https://t.me/nofx_dev_community)
|
||||
- Reference existing code: `trader/binance_futures.go`
|
||||
|
||||
## ⚠️ Important Notes
|
||||
|
||||
- **Test on testnet first** - Do NOT test with real funds initially
|
||||
- **Maintain backward compatibility** - Existing Binance users should not be affected
|
||||
- **Code quality** - Follow existing code style and patterns
|
||||
- **Security** - Handle API keys securely, no hardcoded credentials
|
||||
|
||||
## 🔍 Research Needed
|
||||
|
||||
**Before starting, please investigate:**
|
||||
- [ ] Does Aster provide a public API? (REST/Websocket)
|
||||
- [ ] Is there an official SDK or code examples?
|
||||
- [ ] Does Aster support testnet for development?
|
||||
- [ ] What are the API rate limits?
|
||||
- [ ] What symbols/markets are available?
|
||||
- [ ] Are there any unique features or limitations?
|
||||
|
||||
**Share your findings in the comments!**
|
||||
|
||||
---
|
||||
|
||||
**Ready to contribute?** Comment below or start working and submit a PR!
|
||||
|
||||
**Questions?** Feel free to ask in the comments or on Telegram.
|
||||
224
docs/community/bounty-guide.md
Normal file
224
docs/community/bounty-guide.md
Normal file
@@ -0,0 +1,224 @@
|
||||
# 📝 如何在 GitHub 发布集成任务 (Bounty)
|
||||
|
||||
## 🎯 发布步骤
|
||||
|
||||
### 方法 1: 直接创建 GitHub Issue(推荐)
|
||||
|
||||
1. **访问项目 Issues 页面**
|
||||
```
|
||||
https://github.com/tinkle-community/nofx/issues
|
||||
```
|
||||
|
||||
2. **点击 "New Issue" 按钮**
|
||||
|
||||
3. **选择 "Feature Request" 模板**(如果可用)
|
||||
|
||||
4. **填写 Issue 内容**
|
||||
|
||||
#### Hyperliquid 集成 Issue:
|
||||
|
||||
```markdown
|
||||
标题:[BOUNTY] Integrate Hyperliquid Exchange Support 🚀
|
||||
|
||||
内容:复制 INTEGRATION_BOUNTY_HYPERLIQUID.md 的全部内容
|
||||
```
|
||||
|
||||
#### Aster 集成 Issue:
|
||||
|
||||
```markdown
|
||||
标题:[BOUNTY] Integrate Aster Exchange Support 🚀
|
||||
|
||||
内容:复制 INTEGRATION_BOUNTY_ASTER.md 的全部内容
|
||||
```
|
||||
|
||||
5. **添加标签 (Labels)**
|
||||
- `enhancement` - 新功能
|
||||
- `bounty` - 悬赏任务
|
||||
- `help wanted` - 寻求帮助
|
||||
- `good first issue` - 适合新手(如果适用)
|
||||
|
||||
6. **点击 "Submit new issue"**
|
||||
|
||||
---
|
||||
|
||||
### 方法 2: 使用 GitHub CLI(适合命令行用户)
|
||||
|
||||
```bash
|
||||
# 安装 GitHub CLI (如果还没安装)
|
||||
brew install gh # macOS
|
||||
# 或访问 https://cli.github.com/
|
||||
|
||||
# 登录
|
||||
gh auth login
|
||||
|
||||
# 创建 Hyperliquid 集成 Issue
|
||||
gh issue create \
|
||||
--title "[BOUNTY] Integrate Hyperliquid Exchange Support 🚀" \
|
||||
--body-file INTEGRATION_BOUNTY_HYPERLIQUID.md \
|
||||
--label "enhancement,bounty,help wanted"
|
||||
|
||||
# 创建 Aster 集成 Issue
|
||||
gh issue create \
|
||||
--title "[BOUNTY] Integrate Aster Exchange Support 🚀" \
|
||||
--body-file INTEGRATION_BOUNTY_ASTER.md \
|
||||
--label "enhancement,bounty,help wanted"
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 💰 设置悬赏金额
|
||||
|
||||
### 选项 1: 直接在 GitHub Issue 说明
|
||||
在 Issue 开头写明:
|
||||
```markdown
|
||||
## 💰 Bounty Reward
|
||||
- **$500 USD** for complete Hyperliquid integration
|
||||
- **Bonus $200** for websocket real-time data support
|
||||
- **Bonus $100** for comprehensive tests and docs
|
||||
```
|
||||
|
||||
### 选项 2: 使用悬赏平台
|
||||
|
||||
**Gitcoin Bounties**
|
||||
- 网站:https://gitcoin.co/
|
||||
- 支持加密货币支付
|
||||
- 步骤:
|
||||
1. 创建 Gitcoin 账户
|
||||
2. 点击 "Post a Bounty"
|
||||
3. 链接到你的 GitHub Issue
|
||||
4. 设置奖金金额和条件
|
||||
|
||||
**Bountysource**
|
||||
- 网站:https://www.bountysource.com/
|
||||
- 支持法币和加密货币
|
||||
- 步骤:
|
||||
1. 导入 GitHub Issue
|
||||
2. 设置悬赏金额
|
||||
3. 托管资金直到完成
|
||||
|
||||
**IssueHunt**
|
||||
- 网站:https://issuehunt.io/
|
||||
- 专注于开源项目
|
||||
- 步骤:
|
||||
1. 连接 GitHub 仓库
|
||||
2. 为特定 Issue 设置悬赏
|
||||
3. 贡献者完成后自动支付
|
||||
|
||||
---
|
||||
|
||||
## 📢 推广你的 Bounty
|
||||
|
||||
### 1. 社交媒体宣传
|
||||
|
||||
**Twitter/X:**
|
||||
```
|
||||
🚀 $500 Bounty! 🚀
|
||||
|
||||
Looking for devs to integrate Hyperliquid exchange into NOFX AI Trading System
|
||||
|
||||
✅ Add perpetual contracts support
|
||||
✅ Unified API interface
|
||||
✅ Full testing & docs
|
||||
|
||||
Issue: [GitHub链接]
|
||||
Details: [详情链接]
|
||||
|
||||
#Bounty #OpenSource #Crypto #Trading
|
||||
```
|
||||
|
||||
**Telegram:**
|
||||
- 在 NOFX 开发者社区发布:https://t.me/nofx_dev_community
|
||||
- 在相关的开发者群组分享
|
||||
|
||||
### 2. 开发者社区
|
||||
|
||||
**Reddit:**
|
||||
- r/CryptoCurrency
|
||||
- r/algotrading
|
||||
- r/opensource
|
||||
- r/forhire
|
||||
|
||||
**Discord:**
|
||||
- 相关的加密货币交易社区
|
||||
- 开发者频道
|
||||
|
||||
### 3. 开发者平台
|
||||
|
||||
**Dev.to / Hashnode:**
|
||||
写一篇博客:
|
||||
- 介绍项目
|
||||
- 说明集成需求
|
||||
- 展示悬赏奖励
|
||||
- 链接到 GitHub Issue
|
||||
|
||||
---
|
||||
|
||||
## 📋 Issue 管理最佳实践
|
||||
|
||||
### 1. 及时回复
|
||||
- 在24小时内回复所有问题
|
||||
- 提供清晰的技术指导
|
||||
- 鼓励潜在贡献者
|
||||
|
||||
### 2. 更新进度
|
||||
定期更新 Issue,说明:
|
||||
- 当前进展
|
||||
- 已有贡献者
|
||||
- 剩余工作
|
||||
- 截止日期(如果有)
|
||||
|
||||
### 3. 设置里程碑
|
||||
```markdown
|
||||
## 📅 Milestones
|
||||
|
||||
**Phase 1 (Week 1-2):** API Wrapper
|
||||
- [ ] Basic API integration
|
||||
- [ ] Account & position fetching
|
||||
|
||||
**Phase 2 (Week 3):** Trading Functions
|
||||
- [ ] Order execution
|
||||
- [ ] Position management
|
||||
|
||||
**Phase 3 (Week 4):** Testing & Docs
|
||||
- [ ] Comprehensive tests
|
||||
- [ ] Documentation updates
|
||||
```
|
||||
|
||||
### 4. 评审 PR
|
||||
当有人提交 Pull Request:
|
||||
- 快速进行代码审查
|
||||
- 提供建设性反馈
|
||||
- 测试功能是否正常
|
||||
- 合并后及时支付赏金
|
||||
|
||||
---
|
||||
|
||||
## ⚠️ 注意事项
|
||||
|
||||
### 法律 & 合规
|
||||
- ✅ 明确说明这是开源贡献,不是雇佣关系
|
||||
- ✅ 确保贡献者同意 MIT License
|
||||
- ✅ 保留最终合并决定权
|
||||
|
||||
### 资金管理
|
||||
- ✅ 使用托管服务(Gitcoin、Bountysource)
|
||||
- ✅ 在 Issue 中明确支付条件
|
||||
- ✅ 完成后及时支付
|
||||
|
||||
### 质量控制
|
||||
- ✅ 要求代码审查
|
||||
- ✅ 必须有测试覆盖
|
||||
- ✅ 必须有文档更新
|
||||
- ✅ 不破坏现有功能
|
||||
|
||||
---
|
||||
|
||||
## 📞 需要帮助?
|
||||
|
||||
- **GitHub Issues**: https://github.com/tinkle-community/nofx/issues
|
||||
- **Telegram**: https://t.me/nofx_dev_community
|
||||
- **Twitter/X**: [@Web3Tinkle](https://x.com/Web3Tinkle)
|
||||
|
||||
---
|
||||
|
||||
**祝你成功招募到优秀的开发者!** 🎉
|
||||
145
docs/community/bounty-hyperliquid.md
Normal file
145
docs/community/bounty-hyperliquid.md
Normal file
@@ -0,0 +1,145 @@
|
||||
# 🚀 [BOUNTY] Integrate Hyperliquid Exchange Support
|
||||
|
||||
## 💰 Bounty Reward
|
||||
**To be discussed** - Open to proposals from contributors
|
||||
|
||||
## 📋 Overview
|
||||
We're looking for contributors to add Hyperliquid exchange support to NOFX AI Trading System. Currently supports Binance Futures, seeking to expand to Hyperliquid perpetual contracts.
|
||||
|
||||
## 🎯 Task Requirements
|
||||
|
||||
### Core Features to Implement
|
||||
|
||||
#### 1. **Hyperliquid API Integration**
|
||||
- [ ] Account management (balance, positions, margin)
|
||||
- [ ] Market data fetching (K-lines, order book, trades)
|
||||
- [ ] Order execution (market/limit orders)
|
||||
- [ ] Position management (open, close, modify)
|
||||
- [ ] Websocket real-time data stream
|
||||
|
||||
#### 2. **Adapter Layer**
|
||||
- [ ] Create `trader/hyperliquid_perpetual.go` adapter
|
||||
- [ ] Implement unified interface compatible with existing `BinanceFuturesClient`
|
||||
- [ ] Handle Hyperliquid-specific features (if any)
|
||||
|
||||
#### 3. **Configuration Support**
|
||||
```json
|
||||
{
|
||||
"traders": [
|
||||
{
|
||||
"id": "hyperliquid_trader",
|
||||
"name": "Hyperliquid AI Trader",
|
||||
"exchange": "hyperliquid", // NEW
|
||||
"hyperliquid_api_key": "xxx",
|
||||
"hyperliquid_secret_key": "xxx",
|
||||
"ai_model": "deepseek",
|
||||
"initial_balance": 1000.0
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
#### 4. **Risk Control Adaptation**
|
||||
- [ ] Adapt position limits for Hyperliquid specs
|
||||
- [ ] Handle leverage rules (may differ from Binance)
|
||||
- [ ] Implement liquidation price calculation
|
||||
- [ ] Funding rate integration
|
||||
|
||||
#### 5. **Testing & Documentation**
|
||||
- [ ] Unit tests for API wrapper
|
||||
- [ ] Integration tests with testnet
|
||||
- [ ] Update README with Hyperliquid setup guide
|
||||
- [ ] Add Hyperliquid-specific troubleshooting docs
|
||||
|
||||
## 📚 Technical References
|
||||
|
||||
**Hyperliquid Resources:**
|
||||
- Official Docs: https://hyperliquid.gitbook.io/hyperliquid-docs
|
||||
- API Documentation: https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api
|
||||
- SDK Examples: https://github.com/hyperliquid-dex
|
||||
|
||||
**NOFX Architecture:**
|
||||
- See `trader/binance_futures.go` as reference implementation
|
||||
- Main trading logic: `trader/auto_trader.go`
|
||||
- Configuration: `config.json` structure
|
||||
|
||||
## 🔧 Implementation Guidelines
|
||||
|
||||
### File Structure
|
||||
```
|
||||
trader/
|
||||
├── binance_futures.go (existing reference)
|
||||
├── hyperliquid_perpetual.go (NEW - to implement)
|
||||
└── exchange_interface.go (NEW - unified interface)
|
||||
|
||||
config/
|
||||
└── config.go (UPDATE - add Hyperliquid config)
|
||||
```
|
||||
|
||||
### Interface to Implement
|
||||
```go
|
||||
type ExchangeClient interface {
|
||||
// Account
|
||||
GetAccount() (*AccountInfo, error)
|
||||
GetPositions() ([]*Position, error)
|
||||
|
||||
// Market Data
|
||||
GetKlines(symbol, interval string, limit int) ([]*Kline, error)
|
||||
GetTicker(symbol string) (*Ticker, error)
|
||||
|
||||
// Trading
|
||||
CreateOrder(params *OrderParams) (*Order, error)
|
||||
ClosePosition(symbol, side string) error
|
||||
|
||||
// Risk Management
|
||||
SetLeverage(symbol string, leverage int) error
|
||||
GetLiquidationPrice(position *Position) (float64, error)
|
||||
}
|
||||
```
|
||||
|
||||
## ✅ Acceptance Criteria
|
||||
|
||||
**Minimum Requirements:**
|
||||
- [ ] Can connect to Hyperliquid testnet/mainnet
|
||||
- [ ] Fetch real-time account balance and positions
|
||||
- [ ] Execute market orders successfully
|
||||
- [ ] Close positions correctly
|
||||
- [ ] Calculate accurate P/L
|
||||
- [ ] No breaking changes to existing Binance integration
|
||||
|
||||
**Bonus Points:**
|
||||
- [ ] Websocket streaming for real-time data
|
||||
- [ ] Support for limit orders and stop-loss/take-profit
|
||||
- [ ] Multi-exchange competition mode (Binance vs Hyperliquid)
|
||||
- [ ] Performance comparison dashboard
|
||||
|
||||
## 📝 How to Contribute
|
||||
|
||||
1. **Comment on this issue** to express interest
|
||||
2. **Fork the repository** and create a feature branch
|
||||
3. **Implement the integration** following guidelines above
|
||||
4. **Test thoroughly** on testnet before mainnet
|
||||
5. **Submit a Pull Request** with:
|
||||
- Code changes
|
||||
- Tests
|
||||
- Documentation updates
|
||||
- Demo video/screenshots
|
||||
|
||||
## 🤝 Support & Questions
|
||||
|
||||
- Ask questions in this issue's comments
|
||||
- Join our Telegram: [NOFX Developer Community](https://t.me/nofx_dev_community)
|
||||
- Reference existing code: `trader/binance_futures.go`
|
||||
|
||||
## ⚠️ Important Notes
|
||||
|
||||
- **Test on testnet first** - Do NOT test with real funds initially
|
||||
- **Maintain backward compatibility** - Existing Binance users should not be affected
|
||||
- **Code quality** - Follow existing code style and patterns
|
||||
- **Security** - Handle API keys securely, no hardcoded credentials
|
||||
|
||||
---
|
||||
|
||||
**Ready to contribute?** Comment below or start working and submit a PR!
|
||||
|
||||
**Questions?** Feel free to ask in the comments or on Telegram.
|
||||
Reference in New Issue
Block a user