Paper Ondo Hedge
БесплатноБез исполняемых скриптовНе проверенUse when the user asks to run the PaperTrade + ONDO neutral hedge bot, configure hedging parameters, check account status, close all positions, or register a…
от 0xcii293 установки в других каталогахОб этом скилле
PaperTrade + ONDO Perps 中性对冲机器人
A neutral hedging bot that mines PAPER tokens on PaperTrade while hedging with ONDO Perps.
When to use
Use this skill when:
- The user wants to run or start the hedge bot
- The user asks to check PaperTrade or ONDO account status
- The user wants to close all positions (emergency)
- The user wants to register a PaperTrade Session Key
- The user wants to adjust hedging parameters (position size, leverage, target move)
- The user wants to launch the web control panel
- The user wants to switch between mock and real mode
- The user asks about loss mining or PAPER token farming on PaperTrade
Do NOT use this skill for:
- General crypto trading advice
- Other exchanges (Binance, OKX direct trading)
- Non-hedging strategies
Prerequisites
Platforms
- PaperTrade — Perps exchange on Hyperliquid, loss = mint PAPER
- ONDO — Perps exchange for the hedge leg
Getting API Keys
- PaperTrade: Import or create a HyperEVM wallet. The wallet private key is used directly.
- ONDO API Key: Create at ONDO App → Settings → API Keys
For New Users
Dependencies
pip install -r requirements.txt
Instructions
Project Path
/Users/caroline/Desktop/源代码/demo/paper中性脚本/
Method 1: Web Control Panel (Recommended)
cd /Users/caroline/Desktop/源代码/demo/paper中性脚本
python web_server.py
Open http://localhost:8765/ in browser.
Panel features:
- 🧪 Mock / 💰 Real mode switch (default: mock)
- 🌐 Chinese / English language switch
- ▶ Start / ■ Stop bot
- 📊 Real-time runtime logs (refresh every 3s)
Method 2: Command Line
1. Configure .env
cp .env.example .env
Edit .env:
# Run mode: mock (no real trades) or real
HEDGE_MODE=mock
# PaperTrade wallet private key (0x-prefixed 64-char hex)
PAPER_WALLET_PRIVATE_KEY=0x...
# PaperTrade Session Key (optional, auto-registered if empty)
PAPER_SESSION_KEY=
# ONDO API credentials
ONDO_KEY_ID=ondoKeyId_xxx
ONDO_API_SECRET=ondoApiSecret_xxx
# Strategy parameters
HEDGE_SYMBOL=BTC
HEDGE_POSITION_SIZE=50
HEDGE_PAPER_LEVERAGE=10
HEDGE_ONDO_LEVERAGE=10
HEDGE_TARGET_MOVE_PCT=1.0
HEDGE_MAX_HOLD_SECONDS=3600
HEDGE_POLL_INTERVAL=10
HEDGE_MAX_CYCLES=200
HEDGE_DIRECTION=random
2. Register Session Key (Real mode only)
cd /Users/caroline/Desktop/源代码/demo/paper中性脚本
python main.py register
Copy the output PAPER_SESSION_KEY into .env.
3. Check Account Status
python main.py status
4. Run the Bot
python main.py
5. Emergency Close All
python main.py close-all
Mode Explanation
| Mode | HEDGE_MODE |
Behavior |
|---|---|---|
| Mock | mock |
Uses built-in mock clients, no real trades, no credentials needed |
| Real | real |
Real trading, requires wallet key and ONDO API credentials |
Mock mode uses a fixed test wallet and outputs identical log format to real mode. Good for demos and learning.
Strategy Parameters
| Parameter | Default | Description |
|---|---|---|
HEDGE_SYMBOL |
BTC | Trading pair (BTC/ETH) |
HEDGE_POSITION_SIZE |
50 | Notional position size per side (USD) |
HEDGE_PAPER_LEVERAGE |
10 | PaperTrade leverage |
HEDGE_ONDO_LEVERAGE |
10 | ONDO leverage (BTC/ETH max 25) |
HEDGE_TARGET_MOVE_PCT |
1.0 | Price move % to trigger close |
HEDGE_MAX_HOLD_SECONDS |
3600 | Max hold time before forced close |
HEDGE_DIRECTION |
random | Direction: random / paper_long / paper_short |
Strategy Logic
- Open opposite positions on PaperTrade and ONDO simultaneously
- PaperTrade side always loses → mints PAPER tokens (~95 PAPER/$1 loss)
- ONDO side always wins → earns points + USDC
- Net PnL ≈ 0 (minus ONDO fees ~0.05% round-trip)
- Profit = PAPER tokens + ONDO points
Examples
Example 1: Quick mock mode demo
cd /Users/caroline/Desktop/源代码/demo/paper中性脚本
HEDGE_MODE=mock HEDGE_MAX_CYCLES=1 HEDGE_MAX_HOLD_SECONDS=10 python main.py
Example 2: Start web panel and run via browser
python web_server.py
# Open http://localhost:8765, click "Start Bot"
Example 3: Real mode with BTC, $100 position, 10x leverage
HEDGE_MODE=real
HEDGE_SYMBOL=BTC
HEDGE_POSITION_SIZE=100
HEDGE_PAPER_LEVERAGE=10
HEDGE_ONDO_LEVERAGE=10
python main.py
Error Handling
Session Key Expired
RuntimeError: Session Key 已过期,请重新注册
Run python main.py register to re-register.
ONDO Signature Error
ONDO API 错误: signature invalid
Verify ONDO_KEY_ID and ONDO_API_SECRET. If still failing, the ONDO API signature forma
Установить Paper Ondo Hedge в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Bash(python *)Bash(curl *)Bash(git *)ReadWriteFAQ
Что делает скилл Paper Ondo Hedge?
Use when the user asks to run the PaperTrade + ONDO neutral hedge bot, configure hedging parameters, check account status, close all positions, or register a PaperTrade Session Key. Also use for loss mining, PAPER token farming, or setting up the web control panel.
Как установить скилл Paper Ondo Hedge?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл Paper Ondo Hedge запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
agent-skill-stack
Find, evaluate, and assemble the smallest compatible set of AI Agent Skills for an end-to-end natural-language goal. Use when a user wants Skills for a…
от GitHubbuild-evidence-map
Build an auditable evidence map for a contested technical choice, research synthesis, proposal review, or consequential decision. Use when Copilot must…
от GitHubpinecone-rag
Build production RAG pipelines and persistent agent memory using Pinecone as the vector database backend. ALWAYS USE THIS SKILL when the user mentions…
от GitHubqdrant-monitoring-debugging
Diagnoses Qdrant production issues using metrics and observability tools. Use when someone reports 'optimizer stuck', 'indexing too slow', 'memory too high'…
от GitHub