| name | kraken-rebalancing |
| version | 1.0.0 |
| description | Portfolio rebalancing to maintain target allocations across assets. |
| metadata | {"openclaw":{"category":"finance"},"requires":{"bins":["kraken"]}} |
kraken-rebalancing
Use this skill for:
- checking current portfolio allocation vs target weights
- calculating rebalance trades
- executing rebalance orders with minimum trade thresholds
- scheduling periodic rebalance checks
Define Target Allocation
Example target: 50% BTC, 30% ETH, 20% SOL (by USD value).
The agent maintains these weights and compares against current holdings.
Read Current Portfolio
- Get balances:
kraken balance -o json 2>/dev/null
- Get current prices for all held assets:
kraken ticker BTCUSD ETHUSD SOLUSD -o json 2>/dev/null
- Calculate USD value of each holding and total portfolio value.
- Compute current weights: asset_value / total_value for each.
Calculate Rebalance Trades
For each asset:
- Target value = total_portfolio * target_weight
- Current value = holdings * current_price
- Delta = target_value - current_value
- If delta > threshold: buy (delta / price) units
- If delta < -threshold: sell (|delta| / price) units