Agent Skills
› krakenfx/kraken-cli
› recipe-drawdown-circuit-breaker
recipe-drawdown-circuit-breaker
GitHub监控投资组合回撤,当超过阈值时自动取消订单并暂停交易,需人工确认恢复。
Trigger Scenarios
需要自动风控止损
投资组合大幅回撤报警
Install
npx skills add krakenfx/kraken-cli --skill recipe-drawdown-circuit-breaker -g -y
SKILL.md
Frontmatter
{
"name": "recipe-drawdown-circuit-breaker",
"version": "1.0.0",
"metadata": {
"openclaw": {
"domain": "risk",
"category": "recipe"
},
"requires": {
"bins": [
"kraken"
],
"skills": [
"kraken-risk-operations",
"kraken-alert-patterns"
]
}
},
"description": "Automatically stop trading when portfolio drawdown exceeds a threshold."
}
Drawdown Circuit Breaker
PREREQUISITE: Load the following skills to execute this recipe:
kraken-risk-operations,kraken-alert-patterns
Monitor portfolio value and halt trading if cumulative drawdown from peak exceeds a limit (e.g., 10%).
Steps
- Record starting portfolio value:
kraken balance -o json 2>/dev/null+kraken ticker BTCUSD ETHUSD SOLUSD -o json 2>/dev/null(calculate total USD value) - Set this as the high-water mark
- On each check interval (at least 5 seconds; see
kraken-rate-limitsfor tier budgets):- Recalculate total portfolio value
- Update high-water mark if value exceeds previous peak
- Calculate drawdown: (peak - current) / peak * 100
- If drawdown exceeds threshold (e.g., 10%):
- Alert the user immediately
- Cancel all open orders:
kraken order cancel-all -o json 2>/dev/null - Cancel all futures orders:
kraken futures cancel-all -o json 2>/dev/null
- Present drawdown report: peak value, current value, drawdown percentage, orders cancelled
- Cancel operations require explicit human approval unless operating at autonomy level 4+
- Wait for explicit user instruction before resuming any trading activity
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
- aa32814 2026-07-25 10:29


