Agent Skillskrakenfx/kraken-cli › kraken-portfolio-intel

kraken-portfolio-intel

GitHub

提供Kraken交易所投资组合分析技能,涵盖余额查询、组合估值、交易历史追踪、P&L计算、费用分析及报告导出。

skills/kraken-portfolio-intel/SKILL.md krakenfx/kraken-cli

Trigger Scenarios

查询账户余额或资产状况 计算投资组合总价值及权重 分析交易历史与盈亏情况 检查手续费率或交易量等级 导出交易或账本报告

Install

npx skills add krakenfx/kraken-cli --skill kraken-portfolio-intel -g -y
More Options

Use without installing

npx skills use krakenfx/kraken-cli@kraken-portfolio-intel

指定 Agent (Claude Code)

npx skills add krakenfx/kraken-cli --skill kraken-portfolio-intel -a claude-code -g -y

安装 repo 全部 skill

npx skills add krakenfx/kraken-cli --all -g -y

预览 repo 内 skill

npx skills add krakenfx/kraken-cli --list

SKILL.md

Frontmatter
{
    "name": "kraken-portfolio-intel",
    "version": "1.0.0",
    "metadata": {
        "openclaw": {
            "category": "finance"
        },
        "requires": {
            "bins": [
                "kraken"
            ]
        }
    },
    "description": "Portfolio analysis, P&L tracking, trade history, and export reports."
}

kraken-portfolio-intel

Use this skill for:

  • reading balances and computing portfolio value
  • tracking trade history and P&L
  • analyzing fee impact and volume tiers
  • exporting reports for external analysis

Balance Overview

Simple balance:

kraken balance -o json 2>/dev/null

Extended balance (includes credit and held amounts):

kraken extended-balance -o json 2>/dev/null

Trade balance (margin, equity, free margin):

kraken trade-balance --asset USD -o json 2>/dev/null

Portfolio Valuation

Combine balances with current prices to compute total portfolio value:

# Get all balances
kraken balance -o json 2>/dev/null

# Get prices for held assets
kraken ticker BTCUSD ETHUSD SOLUSD -o json 2>/dev/null

# Agent calculates:
# value_per_asset = balance * price
# total_value = sum of all values
# weight_per_asset = value / total_value

Trade History

Recent trades:

kraken trades-history -o json 2>/dev/null

With ledger entries for cost basis:

kraken trades-history --ledgers -o json 2>/dev/null

Consolidated taker trades (merge partial fills):

kraken trades-history --consolidate-taker -o json 2>/dev/null

Time-filtered:

kraken closed-orders --start 1704067200 --end 1706745600 -o json 2>/dev/null

Query specific trades by TXID:

kraken query-trades <TXID1> <TXID2> -o json 2>/dev/null

Ledger Analysis

View all ledger entries (trades, deposits, withdrawals, staking):

kraken ledgers -o json 2>/dev/null

Filter by type:

kraken ledgers --type trade -o json 2>/dev/null
kraken ledgers --type deposit -o json 2>/dev/null
kraken ledgers --type withdrawal -o json 2>/dev/null
kraken ledgers --type staking -o json 2>/dev/null

Filter by asset:

kraken ledgers --asset BTC -o json 2>/dev/null

Time range:

kraken ledgers --asset BTC --type trade --start 1704067200 --end 1706745600 -o json 2>/dev/null

Fee Analysis

Check current volume and fee tier:

kraken volume --pair BTCUSD -o json 2>/dev/null

The response includes 30-day volume and the corresponding maker/taker fee rates.

Export Reports

Request a trade or ledger export for offline analysis:

kraken export-report --report trades --description "Q1 2024 trades" --format CSV --starttm 1704067200 --endtm 1711929600 -o json 2>/dev/null

Check export status:

kraken export-status --report trades -o json 2>/dev/null

Download when ready:

kraken export-retrieve <REPORT_ID> -o json 2>/dev/null

Clean up old reports (export-delete is flagged dangerous — the report is gone and must be regenerated, so confirm with the user first):

kraken export-delete <REPORT_ID> -o json 2>/dev/null

Futures Portfolio

Futures account summary:

kraken futures accounts -o json 2>/dev/null

Futures fill history:

kraken futures fills --since 2024-01-01T00:00:00Z -o json 2>/dev/null

Futures execution history:

kraken futures history-executions --sort desc -o json 2>/dev/null

Futures account log (CSV export):

kraken futures history-account-log-csv --since 2024-01-01T00:00:00Z -o json 2>/dev/null

Open Positions

Spot margin positions:

kraken positions --show-pnl -o json 2>/dev/null

Futures positions:

kraken futures positions -o json 2>/dev/null

Context Efficiency

  • Use --offset and --limit for paginated queries.
  • Use --without-count on large history queries to skip count computation.
  • Filter by asset and time range to reduce response size.
  • Use exports for bulk data instead of paginating through REST.

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:45
  • aa32814 2026-07-25 10:28

Same Skill Collection

skills/kraken-alert-patterns/SKILL.md
skills/kraken-autonomy-levels/SKILL.md
skills/kraken-basis-trading/SKILL.md
skills/kraken-dca-strategy/SKILL.md
skills/kraken-earn-staking/SKILL.md
skills/kraken-error-recovery/SKILL.md
skills/kraken-fee-optimization/SKILL.md
skills/kraken-funding-carry/SKILL.md
skills/kraken-funding-ops/SKILL.md
skills/kraken-futures-risk/SKILL.md
skills/kraken-grid-trading/SKILL.md
skills/kraken-lab-experiment/SKILL.md
skills/kraken-liquidation-guard/SKILL.md
skills/kraken-market-intel/SKILL.md
skills/kraken-mcp-integration/SKILL.md
skills/kraken-multi-pair/SKILL.md
skills/kraken-order-types/SKILL.md
skills/kraken-paper-strategy/SKILL.md
skills/kraken-paper-to-live/SKILL.md
skills/kraken-playground/SKILL.md
skills/kraken-rate-limits/SKILL.md
skills/kraken-rebalancing/SKILL.md
skills/kraken-risk-operations/SKILL.md
skills/kraken-setup/SKILL.md
skills/kraken-spot-execution/SKILL.md
skills/kraken-stop-take-profit/SKILL.md
skills/kraken-subaccount-ops/SKILL.md
skills/kraken-tax-export/SKILL.md
skills/kraken-twap-execution/SKILL.md
skills/kraken-ws-streaming/SKILL.md
skills/recipe-basis-trade-entry/SKILL.md
skills/recipe-daily-pnl-report/SKILL.md
skills/recipe-drawdown-circuit-breaker/SKILL.md
skills/recipe-earn-yield-compare/SKILL.md
skills/recipe-emergency-flatten/SKILL.md
skills/recipe-fee-tier-progress/SKILL.md
skills/recipe-funding-rate-scan/SKILL.md
skills/recipe-futures-hedge-spot/SKILL.md
skills/recipe-launch-grid-bot/SKILL.md
skills/recipe-morning-market-brief/SKILL.md
skills/recipe-multi-pair-breakout-watch/SKILL.md
skills/recipe-paper-strategy-backtest/SKILL.md
skills/recipe-playground-dca-triggered/SKILL.md
skills/recipe-playground-dca/SKILL.md
skills/recipe-playground-price-alert/SKILL.md
skills/recipe-playground-rebalance/SKILL.md
skills/recipe-playground-webhook/SKILL.md
skills/recipe-portfolio-snapshot-csv/SKILL.md
skills/recipe-price-level-alerts/SKILL.md

Metadata

Files
0
Version
aa56e59
Hash
350b4ff9
Indexed
2026-07-25 10:28

Главная - Вики-сайт
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-20 10:34
浙ICP备14020137号-1 $Гость$