Delta-Neutral Hedging Executor for JLP Tokens
JLP Hedge Trading is an automated delta-neutral hedging system for JLP (Jupiter Liquidity Pool) tokens. It hedges your JLP exposure by opening short positions on AsterDex, allowing you to earn JLP APR yield while minimizing directional risk.
# 1. Create directories
mkdir -p ~/jlp-hedge/{config,data,logs}
cd ~/jlp-hedge
# 2. Download docker-compose.yml
curl -fsSL https://raw.githubusercontent.com/Cz07cring/jlp-hedge-trading/main/docker-compose.yml -o docker-compose.yml
# 3. Create config file (use Config Generator at jlp.finance/download)
# Edit config/accounts.json with your credentials
# 4. Create .env file
echo "LICENSE_KEY=JLP-XXXX-XXXX-XXXX-XXXX" > .env
# 5. Start service
docker compose up -d
# View logs
docker compose logs -f
curl -fsSL https://jlp.finance/install.sh | bash
git clone https://github.com/Cz07cring/jlp-hedge-trading.git
cd jlp-hedge-trading
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -r requirements.txt
cp config/accounts.example.json config/accounts.json
# Edit config/accounts.json
python main.py
| Variable | Required | Default | Description |
|---|---|---|---|
LICENSE_KEY | ✅ | - | License key from jlp.finance |
CLOUD_API_URL | ❌ | https://jlp.finance | SaaS platform URL (for license, data sync) |
HEDGE_API_URL | ❌ | https://api.jlp.finance | Hedge calculation API endpoint |
CLOUD_ENABLED | ❌ | true | Enable cloud features |
REPORT_INTERVAL | ❌ | 300 | Data reporting interval (seconds) |
LOG_LEVEL | ❌ | INFO | Log level (DEBUG/INFO/WARNING/ERROR) |
TZ | ❌ | Asia/Shanghai | Timezone |
SPLIT_ORDER_ENABLED | ❌ | true | Enable order splitting |
SPLIT_ORDER_THRESHOLD | ❌ | 1500 | Split threshold in USD |
SPLIT_ORDER_MIN_VALUE | ❌ | 300 | Minimum order value in USD |
SPLIT_ORDER_MAX_VALUE | ❌ | 800 | Maximum order value in USD |
MIN_ORDER_SIZE_SOL | ❌ | 8.0 | Minimum SOL order quantity |
MIN_ORDER_SIZE_ETH | ❌ | 0.1 | Minimum ETH order quantity |
MIN_ORDER_SIZE_BTC | ❌ | 0.01 | Minimum BTC order quantity |
{
"accounts": [{
"name": "Main Account",
"enabled": true,
"asterdex": {
"chain": "solana",
"user_address": "YOUR_WALLET_ADDRESS",
"api_key": "YOUR_API_KEY",
"api_secret": "YOUR_API_SECRET"
},
"trading": {
"leverage": 1,
"slippage": 0.001,
"maker_order": {
"enabled": true,
"order_timeout": 1.0
}
}
}],
"cloud": {
"enabled": true,
"api_url": "https://jlp.finance",
"license_key": "YOUR_LICENSE_KEY"
}
}
💡 Tip: Use the Config Generator to easily create your configuration.
Connect to JLP Hedge SaaS for:
| Feature | Description |
|---|---|
| 📊 Real-time Dashboard | Monitor equity, profits, and positions online |
| 🔔 Notifications | Telegram / WeChat alerts |
| ⚙️ Remote Config | Adjust strategy parameters online |
| 📈 Historical Data | Equity curves and rebalance history |
| 🔄 Multi-Account | Lifetime plan supports up to 100 accounts |
| Plan | Price | Accounts | Description |
|---|---|---|---|
| Pro (Monthly) | $29/mo | 1 | Individual users |
| Pro (Yearly) | $288/yr | 1 | Save money |
| Lifetime | $688 | 100 | Multi-account support |
JLP Hedge Trading 是一个 JLP (Jupiter Liquidity Pool) 代币的 Delta 中性对冲系统。通过在 AsterDex 做空对冲 JLP 的风险敞口,让您在降低方向性风险的同时赚取 JLP APR 收益。
# 1. 创建目录
mkdir -p ~/jlp-hedge/{config,data,logs}
cd ~/jlp-hedge
# 2. 下载 docker-compose.yml
curl -fsSL https://raw.githubusercontent.com/Cz07cring/jlp-hedge-trading/main/docker-compose.yml -o docker-compose.yml
# 3. 创建配置文件(推荐使用 jlp.finance/download 的配置生成器)
# 编辑 config/accounts.json 填入你的凭证
# 4. 创建 .env 文件
echo "LICENSE_KEY=JLP-XXXX-XXXX-XXXX-XXXX" > .env
# 5. 启动服务
docker compose up -d
# 查看日志
docker compose logs -f
curl -fsSL https://jlp.finance/install.sh | bash
脚本会自动:检查 Docker → 创建目录 → 下载配置 → 引导填写凭证 → 启动服务
git clone https://github.com/Cz07cring/jlp-hedge-trading.git
cd jlp-hedge-trading
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -r requirements.txt
cp config/accounts.example.json config/accounts.json
# 编辑 config/accounts.json
python main.py
| 变量 | 必填 | 默认值 | 说明 |
|---|---|---|---|
LICENSE_KEY | ✅ | - | License Key(从 SaaS 获取) |
CLOUD_API_URL | ❌ | https://jlp.finance | SaaS 平台地址(License 验证、数据同步) |
HEDGE_API_URL | ❌ | https://api.jlp.finance | 对冲计算 API 地址 |
CLOUD_ENABLED | ❌ | true | 启用云端功能 |
REPORT_INTERVAL | ❌ | 300 | 数据上报间隔(秒) |
LOG_LEVEL | ❌ | INFO | 日志级别 |
TZ | ❌ | Asia/Shanghai | 时区 |
SPLIT_ORDER_ENABLED | ❌ | true | 是否启用拆单 |
SPLIT_ORDER_THRESHOLD | ❌ | 1500 | 拆单阈值(USD) |
SPLIT_ORDER_MIN_VALUE | ❌ | 300 | 单笔最小金额(USD) |
SPLIT_ORDER_MAX_VALUE | ❌ | 800 | 单笔最大金额(USD) |
MIN_ORDER_SIZE_SOL | ❌ | 8.0 | SOL 最小下单数量 |
MIN_ORDER_SIZE_ETH | ❌ | 0.1 | ETH 最小下单数量 |
MIN_ORDER_SIZE_BTC | ❌ | 0.01 | BTC 最小下单数量 |
{
"accounts": [{
"name": "主账户",
"enabled": true,
"asterdex": {
"chain": "solana",
"user_address": "你的钱包地址",
"api_key": "你的 API Key",
"api_secret": "你的 API Secret"
},
"trading": {
"leverage": 1,
"slippage": 0.001,
"maker_order": {
"enabled": true,
"order_timeout": 1.0
}
}
}],
"cloud": {
"enabled": true,
"api_url": "https://jlp.finance",
"license_key": "你的 License Key"
}
}
💡 提示:访问 配置生成器 一键生成完整配置。
| 参数 | 说明 |
|---|---|
rebalance_interval | 调仓检查间隔(秒),默认 600 |
rebalance_threshold | 触发调仓的偏差阈值,默认 0.02 (2%) |
max_funding_rate | 最大资金费率限制,默认 0.001 (0.1%) |
min_margin_ratio | 最低保证金率警告,默认 0.5 (50%) |
maker_order.enabled | 是否使用 Maker 挂单模式 |
split_order_enabled | 是否启用大单拆分 |
split_order_threshold | 拆单阈值(USD) |
连接 JLP Hedge SaaS 获得:
| 功能 | 说明 |
|---|---|
| 📊 实时仪表盘 | 在线查看净值、收益、持仓 |
| 🔔 通知推送 | Telegram / 企业微信告警 |
| ⚙️ 远程配置 | 在线调整策略参数 |
| 📈 历史数据 | 净值曲线、调仓记录 |
| 🔄 多账户管理 | 终身版支持多账户 |
| 计划 | 价格 | 账户数 | 说明 |
|---|---|---|---|
| 专业版(月付) | $29/月 | 1 | 个人用户 |
| 专业版(年付) | $288/年 | 1 | 个人用户(省钱) |
| 终身版 | $688 | 100 | 多账户支持 |
License 验证失败
数据不上报
cloud.enabled 是否为 trueLICENSE_KEY 环境变量jlp-hedge-trading/
├── clients/ # API clients | API 客户端
│ └── asterdex_client.py # AsterDex API
├── cloud/ # Cloud module | 云端模块
│ ├── client.py # Cloud API client | 云端 API 客户端
│ ├── license_manager.py # License management | License 管理
│ ├── data_reporter.py # Data reporting | 数据上报
│ └── config_sync.py # Config sync | 配置同步
├── services/ # Business services | 业务服务
│ ├── order_executor.py # Order execution | 订单执行
│ └── maker_order_executor.py
├── strategies/ # Trading strategies | 交易策略
│ └── delta_neutral.py # Delta Neutral strategy
├── config/ # Configuration | 配置文件
│ └── accounts.example.json
├── main.py # Main entry | 主程序
├── Dockerfile
├── docker-compose.yml
└── requirements.txt
MIT
© 2024 JLP Hedge. All rights reserved.
Content type
Image
Digest
sha256:b7a6de36a…
Size
134.5 MB
Last updated
4 months ago
docker pull ring07c/jlphedge