recipe-weekly-rebalance
Run a weekly portfolio rebalance to maintain target asset allocations.
- License 许可
- MIT
- 最近更新
- 2026-11-14
- Stars
- ★ 81
- Forks
- 17
01 前言 Front Matter
- name
- recipe-weekly-rebalance
- version
- 1.0.0
- metadata
- { "openclaw": { "domain": "portfolio", "category": "recipe" }, "requires": { "bins": [ "kraken" ], "skills": [ "kraken-rebalancing" ] } }
- description
- Run a weekly portfolio rebalance to maintain target asset allocations.
02 资源文件 3
- 许可证LICENSE1.0 KB
- 参考文档SOURCE.md171 B
- 参考文档TRUST.auto.yaml2.2 KB
03 SKILL.md 正文
Weekly Rebalance
PREREQUISITE: Load the following skill to execute this recipe:
kraken-rebalancing
Check portfolio drift and rebalance to target weights once per week.
Steps
- Get balances:
kraken balance -o json 2>/dev/null - Get prices:
kraken ticker BTCUSD ETHUSD SOLUSD -o json 2>/dev/null - Calculate current weights (agent computes USD value per asset / total)
- Compare to targets (e.g., 50% BTC, 30% ETH, 20% SOL)
- If any asset drifts more than 5% from target, compute rebalance trades:
SELL_VOL=$(echo "scale=8; ($CURRENT_BTC_VALUE - $TARGET_BTC_VALUE) / $BTC_PRICE" | bc)andBUY_VOL=$(echo "scale=8; ($TARGET_SOL_VALUE - $CURRENT_SOL_VALUE) / $SOL_PRICE" | bc) - Present the rebalance plan to the user with estimated fees
- Validate sell orders:
kraken order sell BTCUSD $SELL_VOL --type market --validate -o json 2>/dev/null - Execute sells first (requires human approval):
kraken order sell BTCUSD $SELL_VOL --type market -o json 2>/dev/null - Execute buys with freed capital:
kraken order buy SOLUSD $BUY_VOL --type market -o json 2>/dev/null - Verify final allocations:
kraken balance -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.
04 同仓库更多 Skills
recipe-performance
Diagnose a specific MetaMask user flow's real-app performance and Sentry critical-user-flow telemetry with deterministic mm-harness recipes. Use for CUF boundaries, cold/warm/background-resume behavior, latency regressions, lifecycle tags, duplicate or blocking network requests, long tasks, layout/paint cost, screen redraws, React rerenders, or browser trace analysis where tests alone cannot prove the real app.
mexc-spot-websocket
MEXC Spot WebSocket workflows for public streams, protobuf handling, depth maintenance, listen keys, and private streams without exposing API keys.
mexc-spot-rest
MEXC Spot REST workflows for public data, signed account requests, orders, wallet/admin actions, and secure signing without exposing API keys.
mexc-futures-websocket
MEXC Futures WebSocket workflows for public streams, private account/order/position streams, ping/pong, subscriptions, and depth maintenance.
0xklen-version-and-refresh-sanctions-lists
暂无简介
verify-tests-cover-changed-lines
Use when a PR adds code that the existing suite may not exercise. Measures patch coverage — the share of newly changed lines hit by tests — before approving.