Portfolio Snapshot to CSV
PREREQUISITE: Load the following skill to execute this recipe:
kraken-portfolio-intel
Capture a point-in-time portfolio snapshot combining balances, prices, and earn allocations.
Steps
- Get all balances:
kraken balance -o json 2>/dev/null - Identify held assets (non-zero balances)
- Get prices for all held assets:
kraken ticker BTCUSD ETHUSD SOLUSD -o json 2>/dev/null - Get earn allocations:
kraken earn allocations --hide-zero-allocations --converted-asset USD -o json 2>/dev/null - Calculate USD value per asset
- Check futures positions:
kraken futures positions -o json 2>/dev/null - Format as CSV:
asset, balance, price_usd, value_usd, earn_allocated, total_exposure - Output to stdout or write to file
- Include timestamp and total portfolio value as header row