Agent Skillskrakenfx/kraken-cli › kraken-futures-risk

kraken-futures-risk

GitHub

Kraken期货交易风险管理技能,涵盖杠杆设置、资金费率监控、保证金健康检查、头寸规模控制及清算风险评估。提供交易前风险核查与紧急平仓流程,保障账户安全。

skills/kraken-futures-risk/SKILL.md krakenfx/kraken-cli

Trigger Scenarios

查询或设置期货杠杆比例 监控资金费率以评估持仓成本 检查账户保证金状况和未实现盈亏 评估头寸规模相对于可用保证金的合理性 交易前进行风险控制检查 处理接近清算的头寸

Install

npx skills add krakenfx/kraken-cli --skill kraken-futures-risk -g -y
More Options

Use without installing

npx skills use krakenfx/kraken-cli@kraken-futures-risk

指定 Agent (Claude Code)

npx skills add krakenfx/kraken-cli --skill kraken-futures-risk -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": "kraken-futures-risk",
    "version": "1.0.0",
    "metadata": {
        "openclaw": {
            "category": "finance"
        },
        "requires": {
            "bins": [
                "kraken"
            ]
        }
    },
    "description": "Futures-specific risk management: leverage, funding rates, margin, and liquidation awareness."
}

kraken-futures-risk

Use this skill for:

  • checking and setting leverage
  • monitoring funding rates for carry cost
  • tracking margin and account health
  • position sizing relative to available margin
  • understanding liquidation risk

Leverage Management

Check current leverage preferences:

kraken futures leverage -o json 2>/dev/null

Check leverage for a specific symbol:

kraken futures leverage --symbol PF_XBTUSD -o json 2>/dev/null

Set maximum leverage (requires human approval):

kraken futures set-leverage PF_XBTUSD 5 -o json 2>/dev/null

Lower leverage reduces liquidation risk but requires more margin per position.

Funding Rate Monitoring

Check historical funding rates:

kraken futures historical-funding-rates PF_XBTUSD -o json 2>/dev/null

Funding rates are periodic payments between longs and shorts. Positive rates mean longs pay shorts; negative rates mean shorts pay longs. High sustained rates increase carry cost for directional positions.

Use funding rates to:

  • Estimate holding cost for a position over time.
  • Identify crowded trades (extreme funding rates).
  • Time entries when funding flips direction.

Account and Margin Health

Check account balances and margin:

kraken futures accounts -o json 2>/dev/null

Key fields: availableFunds, initialMargin, maintenanceMargin, unrealizedFunding, pnl.

Margin ratio = maintenanceMargin / equity. When this approaches 1.0, liquidation risk is high.

Position Monitoring

View all open positions:

kraken futures positions -o json 2>/dev/null

Stream position updates in real time:

kraken futures ws open-positions -o json 2>/dev/null

Monitor P&L and size continuously. Set agent-side thresholds for:

  • Maximum unrealized loss per position
  • Maximum total portfolio loss
  • Maximum position size

PnL Preferences

Check P&L calculation method:

kraken futures pnl-preferences -o json 2>/dev/null

Set preference for a specific symbol:

kraken futures set-pnl-preference PF_XBTUSD FIFO -o json 2>/dev/null

Unwind Queue

Check if any positions are in the unwind queue (approaching liquidation):

kraken futures unwind-queue -o json 2>/dev/null

If positions appear here, the agent should alert immediately and consider reducing exposure.

Pre-Trade Risk Check

Before placing a futures order, always:

  1. Check available margin:
    kraken futures accounts -o json 2>/dev/null
    
  2. Check current positions:
    kraken futures positions -o json 2>/dev/null
    
  3. Check current leverage:
    kraken futures leverage --symbol PF_XBTUSD -o json 2>/dev/null
    
  4. Estimate position margin requirement based on order size and leverage.
  5. Confirm available funds exceed the required margin with a safety buffer.

Emergency Procedures

Close all positions:

kraken futures cancel-all -o json 2>/dev/null
# Then close each position with a reduce-only market order
kraken futures order sell PF_XBTUSD <POSITION_SIZE> --reduce-only -o json 2>/dev/null

Dead man's switch:

kraken futures cancel-after 300 -o json 2>/dev/null

Hard Rules

  • futures set-leverage and futures set-pnl-preference are flagged dangerous. Never change either without explicit human approval — a leverage change also alters the margin requirement on open positions, in both directions.
  • Monitor margin ratio continuously during live sessions.
  • Alert when margin ratio exceeds 0.7 (conservative threshold).
  • Alert when unrealized loss exceeds a pre-defined stop-loss level.
  • Check funding rates before opening new positions to understand carry cost.
  • Use --reduce-only when closing positions to prevent accidental reversals.
  • 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:44
  • aa32814 2026-07-25 10:28

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-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-futures-hedge-spot/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
ad88a21c
Indexed
2026-07-25 10:28

Главная - Вики-сайт
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-20 10:42
浙ICP备14020137号-1 $Гость$