🔮Madjik docs

Personal metrics

Sync your portfolio to Madjik and get metrics computed on YOUR book, not the market's.

Most Madjik metrics describe the market. Personal metrics describe your portfolio: you submit your positions, the Black Belt Labs engine computes portfolio-level metrics from them every hour, and only your API key can read the results.

How it works

  1. You POST your positions to /v1/portfolio. Each submission replaces the previous snapshot - send your full book each time, not deltas.
  2. Madjik stores your portfolio under an opaque owner id (a one-way hash of your API key) and forwards positions-only to the Black Belt Labs engine. BBL never sees your API key, your identity, or anything but symbols and quantities.
  3. The engine recomputes your personal metrics hourly from your latest snapshot and live market data.
  4. You read your values at GET /v1/metrics/personal. No other key can see them.

1. Submit your portfolio

curl -X POST "https://api.madjik.io/v1/portfolio" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "positions": [
      {"symbol": "BTC",  "qty": 0.5},
      {"symbol": "ETH",  "qty": 4.2},
      {"symbol": "USDT", "qty": 20000},
      {"symbol": "MSTR", "qty": 15}
    ]
  }'

Rules: 1-100 positions, positive quantities, symbols as plain tickers (BTC, ETH, USDT, USDC, MSTR, COIN, ...). Assets the engine cannot price are ignored in valuation; unrecognized crypto assets default to beta 1.0 (declared approximation, not an estimate).

{
  "success": true,
  "owner_id": "b464...",
  "stored": 4,
  "note": "personal metrics compute hourly; GET /v1/metrics/personal"
}

2. Read your personal metrics

curl -H "X-API-Key: YOUR_API_KEY" "https://api.madjik.io/v1/metrics/personal"
{
  "success": true,
  "owner_id": "b464...",
  "metrics": [
    {"metric_id": "M10034", "metric_name": "Portfolio Depeg Exposure",
     "value": 1.8, "value_normalized": 9.0, "signal": "neutral", "provenance": "live"},
    {"metric_id": "M10043", "metric_name": "Portfolio Concentration",
     "value": 52.3, "value_normalized": 52.3, "signal": "neutral", "provenance": "live"},
    {"metric_id": "M10044", "metric_name": "Portfolio BTC Beta",
     "value": 0.39, "value_normalized": 19.7, "signal": "neutral", "provenance": "live"}
  ],
  "total": 3
}

An empty list means either no portfolio has been submitted from this key yet, or the first hourly compute has not run since your submission.

The personal metrics

IDNameWhat it tells you
M10034Portfolio Depeg ExposureShare of your portfolio in USDT/USDC multiplied by BBL's live USDT de-peg probability - the expected portfolio impact of a peg break.
M10043Portfolio ConcentrationHerfindahl index of your position weights: 0 = fully diversified, 100 = a single asset.
M10044Portfolio BTC BetaWeighted BTC beta of your portfolio using declared per-asset approximations (BTC/WBTC 1.0, ETH 0.8, MSTR 2.0, COIN 1.5, USDT/USDC 0, anything else 1.0).
M10050Rebalance Efficiency GapComputed per customer from the submitted portfolio.
M10051Hedge Coverage ScoreComputed per customer from the submitted portfolio.
M10052Cardinality Frontier DistanceComputed per customer from the submitted portfolio.
M10053Harvestable Loss EstimateComputed per customer from the submitted portfolio.
M10054Proxy Substitution SignalComputed per customer from the submitted portfolio.
M10055Liquidation Cost EstimateComputed per customer from the submitted portfolio.
M10056Regime Allocation GapComputed per customer from the submitted portfolio.
M10057Stable Sleeve Risk BalanceComputed per customer from the submitted portfolio.
M10058Portfolio CVaR 95Computed per customer from the submitted portfolio.
M10059Stress Survival ScoreComputed per customer from the submitted portfolio.
M10060Depeg Cascade LossComputed per customer from the submitted portfolio.
M1006112-Month NAV Cone P5Computed per customer from the submitted portfolio.
M10062Protective Put BudgetComputed per customer from the submitted portfolio.
M10063Effective BetsComputed per customer from the submitted portfolio.
M10064Crash-Correlation BetaComputed per customer from the submitted portfolio.
M10065Counterparty Contagion NodeComputed per customer from the submitted portfolio.
M10066Redundancy IndexComputed per customer from the submitted portfolio.
M10067Adverse-Regime SensitivityComputed per customer from the submitted portfolio.

Keeping it in sync

Re-POST your book whenever it changes - after each rebalance, or on a schedule (a daily cron is plenty; the engine computes hourly from whatever snapshot is latest). Automated desks typically post right after their own execution runs.

Honesty notes

  • Betas are declared constants, not fitted estimates - the approximation is the method, and it is stated on each metric page.
  • Valuation uses BBL's latest ingested prices; assets without a price are excluded from weights rather than guessed (deliberately absent rather than fabricated).
  • Personal metric values carry data_quality_score 60: your inputs are self-reported and unverifiable by the engine.