recipe-portfolio-snapshot-csv
GitHub该技能用于导出投资组合快照至CSV,整合余额、价格及收益分配数据。通过调用Kraken CLI获取持仓、行情和期货头寸,计算美元价值并格式化输出,提供包含时间戳和总价值的完整财务视图。
Trigger Scenarios
Install
npx skills add krakenfx/kraken-cli --skill recipe-portfolio-snapshot-csv -g -y
SKILL.md
Frontmatter
{
"name": "recipe-portfolio-snapshot-csv",
"version": "1.0.0",
"metadata": {
"openclaw": {
"domain": "portfolio",
"category": "recipe"
},
"requires": {
"bins": [
"kraken"
],
"skills": [
"kraken-portfolio-intel"
]
}
},
"description": "Export a portfolio snapshot with balances and valuations to CSV."
}
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
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


