cdcx-portfolio-intel
Read-only portfolio analysis — balances, positions, P&L, sub-accounts, fee rates, transaction history
- License 许可
- AGPL-3.0
- 最近更新
- 2026-11-11
- Stars
- ★ 80
- Forks
- 17
01 前言 Front Matter
- name
- cdcx-portfolio-intel
- description
- Read-only portfolio analysis — balances, positions, P&L, sub-accounts, fee rates, transaction history
02 资源文件 2
- 参考文档SOURCE.md364 B
- 参考文档TRUST.auto.yaml2.2 KB
03 SKILL.md 正文
Portfolio Intelligence
When to Use
- User asks "what's my balance" / "what do I hold" / "how much PnL"
- Portfolio report or daily wrap-up
- Sub-account overview
- Fee tier or transaction history lookup
Requires authentication (CDCX_API_KEY/CDCX_API_SECRET or a configured profile).
Tools Used
| Tool | Purpose | Tier |
|---|---|---|
| cdcx_account_summary | Wallet balances (cash per currency) | sensitive_read |
| cdcx_account_balance_history | Historical balance snapshots | sensitive_read |
| cdcx_account_positions | Open positions with unrealized P&L | sensitive_read |
| cdcx_account_info | Master account + sub-accounts | sensitive_read |
| cdcx_account_subaccount_balances | Per-sub-account balances | sensitive_read |
| cdcx_trade_fee_rate | Account fee tier | sensitive_read |
| cdcx_trade_instrument_fee_rate | Instrument-specific fee rate | sensitive_read |
| cdcx_account_orders | Historical orders | sensitive_read |
| cdcx_account_trades | Historical fills | sensitive_read |
| cdcx_account_transactions | All transactions (fills, funding, etc) | sensitive_read |
| cdcx_market_ticker | Mark prices for P&L valuation | read |
Note: MCP tool names beginning with cdcx_account_orders/cdcx_account_trades/cdcx_account_transactions correspond to the history schema group which the account MCP service group also exposes.
Workflow
Quick Balance Check
cdcx account summary -o json
Returns per-currency balance with balance, available, reserved_qty, collateral_amount.
Full Portfolio Report
# 1. Cash
cdcx account summary -o json
# 2. Open positions (derivatives + margin)
cdcx account positions -o json
# 3. Mark prices for valuation
cdcx market ticker -o json
Combine: total equity = cash + Σ (position size × mark price) + Σ unrealized P&L. Break down by instrument; call out largest winners/losers.
Position Detail for One Instrument
cdcx account positions BTCUSD-PERP -o json
Historical Trades and Orders
cdcx history orders BTC_USDT --limit 50 -o json
cdcx history trades BTC_USDT --limit 50 -o json
cdcx history transactions --limit 100 -o json
Time windows via --start-time / --end-time (ms since epoch).
Fee Analysis
cdcx trade fee-rate -o json # Account tier
cdcx trade instrument-fee-rate --instrument-name BTC_USDT -o json
Note: fee-rate commands live under trade, not account.
Sub-Account Management
cdcx account info -o json # List master + sub-accounts
cdcx account subaccount-balances -o json # Balances per sub-account
cdcx account subaccount-transfer \
--from <sub_uuid_a> --to <sub_uuid_b> \
--currency USDT --amount 1000 # Transfer (mutate)
subaccount-transfer is tier mutate — requires acknowledged=true in MCP mode.
Balance History (Equity Curve)
cdcx account balance-history --timeframe D1 -o json
Returns daily snapshots for building an equity curve chart.
Notes
account summaryshows cash;account positionsshows open derivatives/margin positions — both are needed for a full equity view- All read endpoints are safe to call repeatedly; no write effects
subaccount-transfermoves real funds — treat as a mutate- Fee-rate commands were moved to the
tradegroup by the upstream API; don't expect them underaccount
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.