Risk Metrics

(legacy) Portfolio risk snapshot (bundled PDF or JSON)

Per Snapshot Architecture v3, prefer POST /snapshot (JSON) for new clients. This endpoint remains the canonical surface for the bundled PDF report; for JSON, /snapshot returns the same shape with stronger v3 contract guarantees. One bundled report for a weighted portfolio: L3 explained-risk decomposition, per-name hedge ratios, and volatility. Uses internal data access only (no separate charges for underlying metrics calls). format=json returns structured data; format=pdf returns application/pdf. format=png is not implemented yet (501). Identical requests are cached 24 hours per user; cache hits return X-Cache: HIT and X-API-Cost-USD: 0. Billing: $1.25 per successful response (not charged on cache hit).

post/portfolio/risk-snapshot

Request

  • Base URL: https://riskmodels.app/api
  • URL: https://riskmodels.app/api/portfolio/risk-snapshot
  • Auth: one of:
    • HTTP bearer
    • OAuth 2 (authorization code, authorization URL https://riskmodels.app/oauth/authorize, token URL https://riskmodels.app/api/oauth/token, scopes: mcp:read)

Request body

titlestring

Optional report title.

as_of_datestring date

Optional label date (YYYY-MM-DD); data is still latest available from V3.

format'pdf' | 'json' | 'png'
include_diversificationboolean

When true, adds a diversification block to portfolio_risk_index with correlation-adjusted ER, credits, and chart-friendly layers[].

window_daysinteger

Rolling window (trading days) for ETF return correlations. Only used when include_diversification=true.

Response

JSON snapshot or PDF bytes.

object required

Changes