kraken-futures-risk

Futures-specific risk management: leverage, funding rates, margin, and liquidation awareness.

23 stars

Best use case

kraken-futures-risk is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Futures-specific risk management: leverage, funding rates, margin, and liquidation awareness.

Teams using kraken-futures-risk should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/kraken-official-futures-risk/SKILL.md --create-dirs "https://raw.githubusercontent.com/jiayaoqijia/cryptoskill/main/skills/exchanges/kraken-official-futures-risk/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/kraken-official-futures-risk/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How kraken-futures-risk Compares

Feature / Agentkraken-futures-riskStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Futures-specific risk management: leverage, funding rates, margin, and liquidation awareness.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# 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:

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

Check leverage for a specific symbol:

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

Set maximum leverage (requires human approval):

```bash
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:

```bash
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:

```bash
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:

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

Stream position updates in real time:

```bash
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:

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

Set preference for a specific symbol:

```bash
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):

```bash
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:
   ```bash
   kraken futures accounts -o json 2>/dev/null
   ```
2. Check current positions:
   ```bash
   kraken futures positions -o json 2>/dev/null
   ```
3. Check current leverage:
   ```bash
   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:

```bash
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:

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

## Hard Rules

- Never increase leverage without explicit human approval.
- 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.

Related Skills

futures-trading

23
from jiayaoqijia/cryptoskill

KuCoin Futures trading using the KuCoin API. Futures market data, orders, positions, and funding fees. Authentication requires API Key, API Secret, and Passphrase.

Kraken Crypto Skill

23
from jiayaoqijia/cryptoskill

Use the kraken_cli.py wrapper to query your Kraken account.

openclaw_kraken

23
from jiayaoqijia/cryptoskill

Use a Bash CLI to query Kraken Spot and Futures APIs, inspect account state, run guarded trading and funding actions, and work with Kraken websocket payloads using OpenClaw-managed secrets.

kraken-ws-streaming

23
from jiayaoqijia/cryptoskill

Real-time data streaming via WebSocket for spot and futures.

kraken-twap-execution

23
from jiayaoqijia/cryptoskill

Execute large orders as time-weighted slices to reduce market impact.

kraken-tax-export

23
from jiayaoqijia/cryptoskill

Export trade history, ledgers, and cost basis data for tax reporting.

kraken-subaccount-ops

23
from jiayaoqijia/cryptoskill

Create and manage subaccounts with inter-account transfers.

kraken-stop-take-profit

23
from jiayaoqijia/cryptoskill

Manage stop-loss and take-profit orders for risk-bounded positions.

kraken-spot-execution

23
from jiayaoqijia/cryptoskill

Execute spot orders with validation, confirmation gates, and post-trade checks.

kraken-shared

23
from jiayaoqijia/cryptoskill

Shared runtime contract for kraken-cli: auth, invocation, parsing, and safety.

kraken-risk-operations

23
from jiayaoqijia/cryptoskill

Operational risk controls for live agent trading sessions.

recipe-futures-hedge-spot

23
from jiayaoqijia/cryptoskill

Hedge a spot holding with a short futures position to lock in value.