---
name: kraken-futures-risk-ad88a21cebd6
version: 1.0.0
description: "Futures-specific risk management: leverage, funding rates, margin, and liquidation awareness."
metadata:
  openclaw:
    category: "finance"
  requires:
    bins: ["kraken"]
---

# 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

- `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`.


---
Source attribution: jiayaoqijia
Original project: https://github.com/jiayaoqijia/cryptoskill/blob/bcc0d208deaa4f1f80aa0df7ca26c4bed6318918/skills/exchanges/kraken-official-futures-risk/SKILL.md
License: MIT
License information: https://opensource.org/license/mit
Original upstream instructions; downloaded from Mega AI Hub.

## Upstream license notice

MIT License

Copyright (c) Payward, Inc. (Kraken)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.



# Mega AI Hub resource metadata

Creator / publisher: jiayaoqijia
Original project: https://github.com/jiayaoqijia/cryptoskill/blob/bcc0d208deaa4f1f80aa0df7ca26c4bed6318918/skills/exchanges/kraken-official-futures-risk/SKILL.md
Attribution basis: Source repository record

Fields of work: Finance & Accounting, Sales
Roles: Accountant, Business Development, CFO / FP&A, Financial Analyst, Sales Operations
Specialties: API
Tools: Kraken
Country applicability: Country not specified
Classification basis: Source catalog labels
Instruction SHA-256: 3a6f58269085b442848843c706eeb5e1290aebaaccc46be03047fa50703f0116
