mirror of
https://github.com/NoFxAiOS/nofx.git
synced 2026-07-13 15:57:01 +08:00
Docs: Add bounty templates for Hyperliquid and Aster exchange integration
Add comprehensive bounty documentation to recruit contributors for exchange integrations: **New Files:** - `.github/ISSUE_TEMPLATE/feature_request.md` - GitHub Issue template - `INTEGRATION_BOUNTY_HYPERLIQUID.md` - Complete Hyperliquid integration spec - `INTEGRATION_BOUNTY_ASTER.md` - Complete Aster integration spec - `HOW_TO_POST_BOUNTY.md` - Step-by-step guide for posting bounties **Bounty Documentation Includes:** - Clear task requirements and acceptance criteria - Technical specifications and interface definitions - File structure and implementation guidelines - Testing and documentation requirements - Contribution workflow - Support resources and community links **HOW_TO_POST_BOUNTY.md Guide:** - Two methods to post GitHub Issues (Web UI + GitHub CLI) - Bounty platform recommendations (Gitcoin, Bountysource, IssueHunt) - Social media promotion templates (Twitter, Telegram, Reddit) - Issue management best practices - Legal and quality control considerations **Benefits:** - Standardized contribution process - Clear technical requirements - Professional bounty presentation - Easy for maintainers to post and manage - Attractive for potential contributors Ready to recruit developers for multi-exchange support! 🚀 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: tinkle-community <tinklefund@gmail.com>
This commit is contained in:
27
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
27
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
---
|
||||||
|
name: Feature Request
|
||||||
|
about: Suggest a new feature for NOFX
|
||||||
|
title: '[FEATURE] '
|
||||||
|
labels: enhancement
|
||||||
|
assignees: ''
|
||||||
|
---
|
||||||
|
|
||||||
|
## 📋 Feature Description
|
||||||
|
<!-- A clear and concise description of what you want to happen -->
|
||||||
|
|
||||||
|
## 🎯 Problem to Solve
|
||||||
|
<!-- What problem does this feature solve? -->
|
||||||
|
|
||||||
|
## 💡 Proposed Solution
|
||||||
|
<!-- How should this feature work? -->
|
||||||
|
|
||||||
|
## 🔧 Technical Details
|
||||||
|
<!-- Any technical considerations or implementation ideas -->
|
||||||
|
|
||||||
|
## ✅ Acceptance Criteria
|
||||||
|
<!-- What needs to be done for this feature to be considered complete? -->
|
||||||
|
- [ ] Item 1
|
||||||
|
- [ ] Item 2
|
||||||
|
|
||||||
|
## 📚 Additional Context
|
||||||
|
<!-- Add any other context, screenshots, or references about the feature request here -->
|
||||||
224
HOW_TO_POST_BOUNTY.md
Normal file
224
HOW_TO_POST_BOUNTY.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)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**祝你成功招募到优秀的开发者!** 🎉
|
||||||
157
INTEGRATION_BOUNTY_ASTER.md
Normal file
157
INTEGRATION_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.
|
||||||
145
INTEGRATION_BOUNTY_HYPERLIQUID.md
Normal file
145
INTEGRATION_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