Agent Skillskrakenfx/kraken-cli › recipe-futures-hedge-spot

recipe-futures-hedge-spot

GitHub

通过做空等量期货对冲现货BTC持仓以锁定价值,防止下行风险。流程包括检查余额、获取价格、计算仓位、下单及监控保证金。

skills/recipe-futures-hedge-spot/SKILL.md krakenfx/kraken-cli

Trigger Scenarios

需要对冲现货持仓风险 执行期货对冲策略

Install

npx skills add krakenfx/kraken-cli --skill recipe-futures-hedge-spot -g -y
More Options

Use without installing

npx skills use krakenfx/kraken-cli@recipe-futures-hedge-spot

指定 Agent (Claude Code)

npx skills add krakenfx/kraken-cli --skill recipe-futures-hedge-spot -a claude-code -g -y

安装 repo 全部 skill

npx skills add krakenfx/kraken-cli --all -g -y

预览 repo 内 skill

npx skills add krakenfx/kraken-cli --list

SKILL.md

Frontmatter
{
    "name": "recipe-futures-hedge-spot",
    "version": "1.0.0",
    "metadata": {
        "openclaw": {
            "domain": "strategy",
            "category": "recipe"
        },
        "requires": {
            "bins": [
                "kraken"
            ],
            "skills": [
                "kraken-spot-execution",
                "kraken-futures-trading",
                "kraken-futures-risk"
            ]
        }
    },
    "description": "Hedge a spot holding with a short futures position to lock in value."
}

Hedge Spot with Futures

PREREQUISITE: Load the following skills to execute this recipe: kraken-spot-execution, kraken-futures-trading, kraken-futures-risk

Protect a spot BTC holding from downside by shorting an equivalent futures position.

CAUTION: This locks in current value but also caps upside. Futures margin requirements apply.

Steps

  1. Check spot balance: kraken balance -o json 2>/dev/null
  2. Get spot price: kraken ticker BTCUSD -o json 2>/dev/null
  3. Get futures price: kraken futures ticker PF_XBTUSD -o json 2>/dev/null
  4. Check futures margin availability: kraken futures accounts -o json 2>/dev/null
  5. Calculate matching futures size: BTC_BAL=$(kraken balance -o json 2>/dev/null | jq -r '.BTC // "0"') and FUT_PRICE=$(kraken futures ticker PF_XBTUSD -o json 2>/dev/null | jq -r '.ticker.last')
  6. Open short futures position (requires human approval): kraken futures order sell PF_XBTUSD $BTC_BAL --type limit --price $FUT_PRICE -o json 2>/dev/null
  7. Verify the position: kraken futures positions -o json 2>/dev/null
  8. Enable dead man's switch: kraken futures cancel-after 3600 -o json 2>/dev/null
  9. Monitor margin: kraken futures accounts -o json 2>/dev/null
  10. To remove hedge, close futures: kraken futures order buy PF_XBTUSD $BTC_BAL --reduce-only -o json 2>/dev/null

If you hit a mismatch between what you are trying to do and the CLI's interface or responses — including a mismatch between this skill and the installed CLI version's contract — feel free to submit feedback with kraken feedback.

Version History

  • aa56e59 Current 2026-08-20 04:46

    修复了版本0.4.0中比特币余额JSON字段从XXBT到BTC的兼容性问题,并集成了反馈命令与MCP安全更新。

  • aa32814 2026-07-25 10:29

Same Skill Collection

skills/kraken-alert-patterns/SKILL.md
skills/kraken-autonomy-levels/SKILL.md
skills/kraken-basis-trading/SKILL.md
skills/kraken-dca-strategy/SKILL.md
skills/kraken-earn-staking/SKILL.md
skills/kraken-error-recovery/SKILL.md
skills/kraken-fee-optimization/SKILL.md
skills/kraken-funding-carry/SKILL.md
skills/kraken-funding-ops/SKILL.md
skills/kraken-futures-risk/SKILL.md
skills/kraken-grid-trading/SKILL.md
skills/kraken-lab-experiment/SKILL.md
skills/kraken-liquidation-guard/SKILL.md
skills/kraken-market-intel/SKILL.md
skills/kraken-mcp-integration/SKILL.md
skills/kraken-multi-pair/SKILL.md
skills/kraken-order-types/SKILL.md
skills/kraken-paper-strategy/SKILL.md
skills/kraken-paper-to-live/SKILL.md
skills/kraken-playground/SKILL.md
skills/kraken-portfolio-intel/SKILL.md
skills/kraken-rate-limits/SKILL.md
skills/kraken-rebalancing/SKILL.md
skills/kraken-risk-operations/SKILL.md
skills/kraken-setup/SKILL.md
skills/kraken-spot-execution/SKILL.md
skills/kraken-stop-take-profit/SKILL.md
skills/kraken-subaccount-ops/SKILL.md
skills/kraken-tax-export/SKILL.md
skills/kraken-twap-execution/SKILL.md
skills/kraken-ws-streaming/SKILL.md
skills/recipe-basis-trade-entry/SKILL.md
skills/recipe-daily-pnl-report/SKILL.md
skills/recipe-drawdown-circuit-breaker/SKILL.md
skills/recipe-earn-yield-compare/SKILL.md
skills/recipe-emergency-flatten/SKILL.md
skills/recipe-fee-tier-progress/SKILL.md
skills/recipe-funding-rate-scan/SKILL.md
skills/recipe-launch-grid-bot/SKILL.md
skills/recipe-morning-market-brief/SKILL.md
skills/recipe-multi-pair-breakout-watch/SKILL.md
skills/recipe-paper-strategy-backtest/SKILL.md
skills/recipe-playground-dca-triggered/SKILL.md
skills/recipe-playground-dca/SKILL.md
skills/recipe-playground-price-alert/SKILL.md
skills/recipe-playground-rebalance/SKILL.md
skills/recipe-playground-webhook/SKILL.md
skills/recipe-portfolio-snapshot-csv/SKILL.md
skills/recipe-price-level-alerts/SKILL.md

Metadata

Files
0
Version
aa56e59
Hash
a4acc1e2
Indexed
2026-07-25 10:29

- 위키
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-21 07:04
浙ICP备14020137号-1 $방문자$