Modular prediction market trading platform for OpenClaw bots. Trade on Polymarket and Hyperliquid, manage wallets, transfer USDC, and automate trading strategies.
Trade prediction markets directly from your OpenClaw bot.
Clawearn enables your AI agent to:
curl -fsSL https://clawearn.xyz/install.sh | bash
# or: bun link (if in repo)
clawearn wallet create
You'll see your wallet address. Save it — you'll need to fund it next.
Choose a strategy that guides how your agent makes trading decisions:
clawearn config strategy set --type moderate
Available Strategies:
The strategy tells your agent how to approach trading decisions:
Option A: Send USDC from another wallet
clawearn wallet send --to YOUR_AGENT_ADDRESS --amount 100
Option B: Bridge USDC to Arbitrum yourself
clawearn wallet showThen search for markets:
clawearn polymarket market search --query "bitcoin price 2025"
Keep your trading bot running smoothly with periodic checks.
Add Clawearn to your agent's heartbeat routine so you don't forget to monitor positions and update market data.
Add this to your HEARTBEAT.md (or equivalent periodic task list):
## Clawearn Trading Checks (every 5 minutes)
If 5 minutes since last Clawearn check:
1. Check wallet balance: `clawearn polymarket balance check`
2. Monitor open orders: `clawearn polymarket order list-open`
3. Review active positions on Polymarket
4. Update lastClawEarnCheck timestamp in memory
5. Alert on critical thresholds (low balance, pending fills, etc.)
# Create skill directory
mkdir -p ~/.openclaw/skills/clawearn
# Install main files
curl -s https://clawearn.xyz/skills/SKILL.md > ~/.openclaw/skills/clawearn/SKILL.md
curl -s https://clawearn.xyz/skills/HEARTBEAT.md > ~/.openclaw/skills/clawearn/HEARTBEAT.md
# Install core skills
mkdir -p ~/.openclaw/skills/clawearn/core/{wallet,security}
curl -s https://clawearn.xyz/skills/core/wallet/SKILL.md > ~/.openclaw/skills/clawearn/core/wallet/SKILL.md
curl -s https://clawearn.xyz/skills/core/security/SKILL.md > ~/.openclaw/skills/clawearn/core/security/SKILL.md
# Install market skills
mkdir -p ~/.openclaw/skills/clawearn/markets/polymarket
curl -s https://clawearn.xyz/skills/markets/polymarket/SKILL.md > ~/.openclaw/skills/clawearn/markets/polymarket/SKILL.md
curl -s https://clawearn.xyz/skills/markets/polymarket/HEARTBEAT.md > ~/.openclaw/skills/clawearn/markets/polymarket/HEARTBEAT.md
# Install market skills for futures
mkdir -p ~/.openclaw/skills/clawearn/markets/hyperliquid
curl -s https://clawearn.xyz/skills/markets/hyperliquid/SKILL.md > ~/.openclaw/skills/clawearn/markets/hyperliquid/SKILL.md
| Market | Status | Features | Installation |
|---|---|---|---|
| Polymarket | ✅ Production | Full trading, order management, market discovery | See above |
| Hyperliquid | ✅ Production | Perpetual futures trading, deposits, withdrawals, position management | See above |
# Create a new wallet
clawearn wallet create
# Show your wallet address
clawearn wallet show
# Send USDC to another address (on Arbitrum)
clawearn wallet send --to 0x... --amount 100
# Search for markets
clawearn polymarket market search --query "bitcoin price 2025"
# Get market details
clawearn polymarket market info --market-id MARKET_ID
# Check your balance
clawearn polymarket balance check
# Place a buy order
clawearn polymarket order buy --token-id TOKEN_ID --price 0.50 --size 10
# View open orders
clawearn polymarket order list-open
# Cancel an order
clawearn polymarket order cancel --order-id ORDER_ID
# List available coins
clawearn hyperliquid market list
# Check market price
clawearn hyperliquid price --coin ETH
# Check your balance and positions
clawearn hyperliquid balance
# Place a buy order
clawearn hyperliquid order buy --coin ETH --price 3000 --size 0.1
# View open orders
clawearn hyperliquid order list-open
# Deposit USDC to trading account
clawearn hyperliquid deposit --amount 100
# Withdraw USDC from trading account
clawearn hyperliquid withdraw --amount 50
Create an optional config file to track settings:
~/.clawearn/config.json (optional)
{
"version": "1.2.0",
"enabled_markets": ["polymarket", "hyperliquid"],
"default_network": "arbitrum",
"strategy": {
"type": "moderate",
"description": "Balanced risk/reward approach"
},
"wallet": {
"network": "arbitrum",
"auto_fund_threshold": 50
},
"trading": {
"signature_type": 0,
"default_slippage_pct": 0.5
},
"risk_limits": {
"max_position_size_pct": 25,
"max_total_exposure_pct": 50,
"min_balance_alert": 10,
"daily_loss_limit": 200
}
}
How Strategies Affect Agent Behavior:
| Strategy | Trade Selection | Position Sizing | Market Filter |
|---|---|---|---|
| aggressive | Takes more opportunities | Larger positions | Lower confidence threshold |
| moderate | Selective opportunities | Medium positions | Medium confidence threshold |
| conservative | Only high-conviction trades | Smaller positions | High confidence threshold |
ls ~/.clawearn/skills/markets/
# Update core
curl -s http://localhost:3000/skills/SKILL.md > ~/.clawearn/skills/SKILL.md
# Update each enabled market
for market in $(cat ~/.clawearn/config.json | grep -o '"polymarket"'); do
curl -s http://localhost:3000/skills/markets/$market/SKILL.md > ~/.clawearn/skills/markets/$market/SKILL.md
done
# 1. Install the skill files
mkdir -p ~/.clawearn/skills/markets/NEW_MARKET
curl -s http://localhost:3000/skills/markets/NEW_MARKET/SKILL.md > ~/.clawearn/skills/markets/NEW_MARKET/SKILL.md
# 2. Update your config.json to add "NEW_MARKET" to enabled_markets
# 3. Set up credentials following the market's SETUP.md
🔒 CRITICAL:
core/SECURITY.md before trading| File | URL |
|---|---|
| SKILL.md (this file) | https://clawearn.xyz/skills/SKILL.md |
| HEARTBEAT.md | https://clawearn.xyz/skills/HEARTBEAT.md |
| core/wallet/SKILL.md | https://clawearn.xyz/skills/core/wallet/SKILL.md |
| core/security/SKILL.md | https://clawearn.xyz/skills/core/security/SKILL.md |
| markets/polymarket/SKILL.md | https://clawearn.xyz/skills/markets/polymarket/SKILL.md |
| markets/polymarket/HEARTBEAT.md | https://clawearn.xyz/skills/markets/polymarket/HEARTBEAT.md |
| markets/hyperliquid/SKILL.md | https://clawearn.xyz/skills/markets/hyperliquid/SKILL.md |
core/wallet/SKILL.mdcore/security/SKILL.mdmarkets/polymarket/SKILL.mdmarkets/hyperliquid/SKILL.mdHEARTBEAT.md for routine checksCheck for updates: Re-fetch this file anytime to see newly supported markets!
curl -s https://clawearn.xyz/skills/SKILL.md | grep '^version:'
Ready to start? Install the core skills, choose your markets, and begin trading! 🚀