# QuantOracle Risk Stress-Test

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

Runs stress-test scenarios on a financial portfolio to estimate potential losses and risk exposures under adverse market conditions

## Facts

- Endpoint: POST https://api.quantoracle.dev/v1/risk/stress-test
- Price: $0.008/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-d114d464
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_uyn0FloZC6eZPfqeeqqpK

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-d114d464 -d '<json body>'
```

Example prompt: Run a stress test on my portfolio — I'm holding 40% BTC, 30% ETH, 20% SPY, and 10% gold — and simulate what happens under a severe crypto market crash scenario with a -60% shock to crypto assets and -20% to equities.

## When to prefer this

Use this endpoint when you need to quantitatively assess portfolio downside risk under user-defined or historical adverse scenarios. Prefer it over general analytics when the specific goal is stress testing — i.e., applying hypothetical market shocks to estimate losses — rather than descriptive statistics, option pricing, or regime classification. Particularly useful for risk management workflows, pre-trade analysis, and regulatory-style scenario analysis.

## Known failure modes

- Invalid or missing portfolio weights that don't sum to 100% — returns validation error
- Unrecognized asset tickers or unsupported instruments — returns asset not found error
- Malformed stress scenario parameters or unsupported shock types — returns parameter error
- Payment not settled or insufficient USDC balance — returns 402 Payment Required
- Server overload or computation timeout for very large portfolios — returns 503 or timeout error

## How this service works

QuantOracle: risk/stress-test

## Output

Returns quantitative stress-test results including estimated portfolio loss (absolute and percentage), per-asset contribution to losses, scenario-specific P&L breakdown, and risk exposure metrics under the specified adverse market conditions.

## Example request

```json
{
 "positions": [
  {
   "beta": 1.2,
   "asset": "AAPL",
   "value": 100000
  },
  {
   "asset": "BND",
   "value": 50000,
   "duration": 5.5
  }
 ],
 "scenarios": [
  {
   "name": "market_crash",
   "vol_shock_pct": 25,
   "market_shock_pct": -15
  },
  {
   "name": "rate_shock",
   "rate_shock_bps": 50
  }
 ]
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "positions": {
   "type": "array",
   "items": {
    "type": "object",
    "title": "Position",
    "required": [
     "asset",
     "value"
    ],
    "properties": {
     "beta": {
      "type": "number",
      "title": "Beta",
      "default": 1,
      "description": "Market beta of the position"
     },
     "asset": {
      "type": "string",
      "title": "Asset",
      "description": "Asset name"
     },
     "value": {
      "type": "number",
      "title": "Value",
      "description": "Current position value in USD"
     },
     "duration": {
      "type": "number",
      "title": "Duration",
      "default": 0,
      "description": "Bond duration (for fixed income)"
     }
    }
   },
   "title": "Positions",
   "description": "Array of portfolio positions"
  },
  "scenarios": {
   "type": "array",
   "items": {
    "type": "object",
    "title": "Scenario",
    "required": [
     "name"
    ],
    "properties": {
     "name": {
      "type": "string",
      "title": "Name",
      "description": "Scenario name"
     },
     "vol_shock_pct": {
      "type": "number",
      "title": "Vol Shock Pct",
      "default": 0,
      "description": "Volatility shock as percentage"
     },
     "rate_shock_bps": {
      "type": "number",
      "title": "Rate Shock Bps",
      "default": 0,
      "description": "Interest rate shock in basis points"
     },
     "market_shock_pct": {
      "type": "number",
      "title": "Market Shock Pct",
      "default": 0,
      "description": "Equity market shock as percentage"
     }
    }
   },
   "title": "Scenarios",
   "description": "Array of stress scenarios to evaluate"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/api-quantoracle-dev-d114d464/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)
