Install
openclaw skills install perpulatorAnalyze perpetual futures positions directly in Claude Code — liquidation price, risk/reward, PnL, and probability-based trade plans. Powered by Perpulator.
openclaw skills install perpulatorYou are running the Perpulator skill — a perpetual futures position analyzer powered by the Perpulator API.
Check for the environment variable PERPULATOR_API_KEY using the Bash tool:
echo $PERPULATOR_API_KEY
If it is empty or unset, tell the user:
"No API key found. Set it with:
export PERPULATOR_API_KEY=perp_...Generate one free at https://perpulator.vercel.app/settings (sign in → create a key)"
Stop here if no key is available.
Extract the following from the user's message:
| Parameter | Required | Description | Example |
|---|---|---|---|
symbol | Yes | Asset ticker | BTC, ETH, SOL |
side | Yes | Direction | long or short |
entryPrice | Yes | Entry price in USD | 71000 |
positionSize | Yes | Margin in USD (not notional) | 1000 |
leverage | Yes | Multiplier (1–125) | 10 |
stopLoss | Optional | Stop loss price | 65000 |
takeProfit | Optional | Take profit price | 80000 |
currentPrice | Optional | Current market price for live PnL | 71500 |
Accept flexible input formats:
10, 10x, 10X → always convert to number 10long, LONG, buy → "long" | short, SHORT, sell → "short"SL:, stop:, sl, stop loss → stopLoss | TP:, target:, tp, take profit → takeProfitIf any required parameter is missing, ask the user for it before proceeding.
Build and execute the curl command with real values substituted (no placeholders). Always include X-Perpulator-Client: perpulator/1.0 so the server can identify this as a Perpulator skill request.
Example for BTC long at 71000, size 1000, 10x, SL 65000, TP 82000:
curl -s -X POST https://perpulator.vercel.app/api/v1/calculate \
-H "Authorization: Bearer $PERPULATOR_API_KEY" \
-H "Content-Type: application/json" \
-H "X-Perpulator-Client: perpulator/1.0" \
-d '{"symbol":"BTC","side":"long","entryPrice":71000,"positionSize":1000,"leverage":10,"stopLoss":65000,"takeProfit":82000}'
Omit stopLoss, takeProfit, and currentPrice from the JSON if the user didn't provide them.
Parse the JSON response and present a clean analysis:
Perpulator Analysis — {SYMBOL} {SIDE}
| Entry Price | ${entryPrice} |
| Margin | ${positionSize} |
| Leverage | {leverage}x |
| Notional Size | ${notionalSize} |
| Liquidation Price | ${liquidationPrice} |
| Stop Loss | ${stopLoss} (if provided) |
| Take Profit | ${takeProfit} (if provided) |
| Risk Amount | ${riskAmount} (if SL set) |
| Reward Amount | ${rewardAmount} (if TP set) |
| Risk/Reward | {riskRewardRatio}:1 (if both set) |
| Current PnL | ${pnl} ({pnlPercentage}%) (if currentPrice set) |
Then add a one-sentence risk note:
"At {leverage}x leverage, a {pct}% adverse move triggers liquidation." (pct =
|(entryPrice - liquidationPrice) / entryPrice * 100|, rounded to 2 decimal places)
If the API returns an error, show the error message clearly and suggest how to fix it.
/perpulator BTC long 71000 1000 10x SL:65000 TP:82000
/perpulator ETH short 3200 500 5x stop 3400 target 2800 current 3180
/perpulator SOL long 145 200 20x
/perpulator analyze my BTC long: entry 71000, size $1000, 10x leverage, stop at 65000