# QuantOracle Portfolio Health

> QuantOracle Portfolio Health is a paid API for AI agents from api.quantoracle.dev, paid per call via x402, $0.04/call, status unknown (last checked 2026-09-14).

Analyzes the overall health of a financial portfolio, returning risk metrics, diversification scores, and actionable diagnostics.

## Facts

- Endpoint: POST https://api.quantoracle.dev/v1/portfolio/health
- Price: $0.04/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/api-quantoracle-dev-b912cb48
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_V41FTz4E7OcsQHz9sW5a-

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability api-quantoracle-dev-b912cb48 -d '<json body>'
```

Example prompt: Run a portfolio health check on my current holdings: 40% BTC, 30% ETH, 20% SOL, and 10% USDC — give me the health score, diversification metrics, and any concentration warnings.

## When to prefer this

Use this endpoint when you need a holistic health assessment of a portfolio rather than a single metric. It is ideal for diagnosing diversification issues, concentration risk, and overall portfolio quality in one call. Prefer this over the risk/full-analysis endpoint when you want a summarized health score with diagnostics rather than deep-dive risk decomposition.

## Known failure modes

- Invalid or missing asset identifiers returns a 400 error
- Weights that do not sum to 100% may trigger a validation error
- Unsupported asset types return an error indicating unrecognized symbols
- Empty or null portfolio payload returns a 422 unprocessable entity
- Payment failure or insufficient USDC balance returns a 402 error

## How this service works

QuantOracle: /v1/portfolio/health

## Output

Returns a portfolio health score along with risk metrics, diversification analysis, concentration flags, and actionable diagnostics highlighting weaknesses or imbalances in the submitted portfolio.

## Example request

```json
{
 "holdings": [
  {
   "asset": "AAPL",
   "value": 40000,
   "returns": [
    0.05,
    0.03,
    -0.02,
    0.07,
    0.04
   ],
   "target_weight": 0.4
  },
  {
   "asset": "TLT",
   "value": 30000,
   "returns": [
    0.02,
    0.01,
    0.03,
    -0.01,
    0.02
   ],
   "target_weight": 0.3
  },
  {
   "asset": "GLD",
   "value": 30000,
   "returns": [
    0.01,
    0.04,
    0.02,
    -0.03,
    0.05
   ],
   "target_weight": 0.3
  }
 ]
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "type": "object",
     "title": "PortfolioHealthIn",
     "required": [
      "holdings"
     ],
     "properties": {
      "holdings": {
       "type": "array",
       "items": {
        "type": "object",
        "title": "PortfolioHoldingItem",
        "required": [
         "asset",
         "value",
         "target_weight",
         "returns"
        ],
        "properties": {
         "beta": {
          "type": "number",
          "title": "Beta",
          "default": 1,
          "description": "Market beta (for stress test)"
         },
         "asset": {
          "type": "string",
          "title": "Asset",
          "description": "Asset name"
         },
         "value": {
          "type": "number",
          "title": "Value",
          "description": "Current market value"
         },
         "returns": {
          "type": "array",
          "items": {
           "type": "number"
          },
          "title": "Returns",
          "minItems": 5,
          "description": "Daily returns for this asset"
         },
         "duration": {
          "type": "number",
          "title": "Duration",
          "default": 0,
          "description": "Bond duration (for rate stress)"
         },
         "target_weight": {
          "type": "number",
          "title": "Target Weight",
          "description": "Target allocation weight (%)"
         }
        }
       },
       "title": "Holdings",
       "minItems": 2,
       "description": "Portfolio holdings"
      },
      "min_trade_usd": {
       "type": "number",
       "title": "Min Trade Usd",
       "default": 100,
       "description": "Minimum trade size in USD"
      },
      "risk_free_rate": {
       "type": "number",
       "title": "Risk Free Rate",
       "default": 0.05,
       "description": "Annual risk-free rate"
      },
      "rebalance_threshold_pct": {
       "type": "number",
       "title": "Rebalance Threshold Pct",
       "default": 5,
       "description": "Drift threshold to trigger rebalance (%)"
      }
     }
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST",
      "PUT",
      "PATCH"
     ],
     "type": "string"
    },
    "
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/api-quantoracle-dev-b912cb48/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.quantoracle.dev](https://www.zero.xyz/host/api.quantoracle.dev/llms.txt)
