# RegimeShift Max-LTV Calculator

> RegimeShift Max-LTV Calculator is a paid API for AI agents from regimeshift.xyz, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-15).

Computes the maximum safe loan-to-value ratio for collateralized agent loans using volatility-regime-aware math, returning the binding constraint (mathematical vs regime cap) and supporting parameters.

## Facts

- Endpoint: GET https://regimeshift.xyz/api/v1/risk/max-ltv
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/regimeshift-xyz-89e575bf
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_YUWrDK0wWOyrXBqr7Wt4T

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 regimeshift-xyz-89e575bf
```

Example prompt: What's the maximum safe LTV I should use for an ETH-collateralized loan lasting 3600 seconds, given I can tolerate at most a 0.5% default probability? I want to know whether the math or the regime cap is the binding constraint.

## When to prefer this

Use this endpoint when an AI agent or DeFi protocol needs to set or validate a safe LTV for a collateralized crypto loan and requires both a mathematically derived cap and a regime-based ceiling, along with a clear explanation of which constraint is binding. Prefer this over generic LTV heuristics when the loan horizon is short (2 minutes to 24 hours), the collateral is ETH or BTC, and the lender needs to specify a tolerated default probability. It shares the same volatility calibrator as the Agent-SOFR rate endpoint, making it well-suited for agent lending stacks that already use that benchmark.

## Known failure modes

- Missing required asset parameter returns 400 or empty result
- duration_sec outside 120–86400 range returns validation error
- max_default_prob outside 0–0.01 range is rejected
- Unsupported asset symbol (not ETH or BTC) returns enum validation error
- Upstream volatility or regime data unavailable causes 5xx or degraded response
- Payment not attached or insufficient USDC causes 402 Payment Required

## How this service works

Maximum-safe LTV for collateralized agent loans. Computed from (cv + λ·j²)-derived variance over loan horizon + 6-mode regime cap. Lender-specifiable max_default_prob. Returns binding constraint (math vs regime_cap) so agents can see WHY the cap is what it is. Same calibrator as Agent-SOFR rate endpoint.

## Output

Returns a JSON object with ok (boolean), max_ltv (the binding maximum loan-to-value ratio as a decimal), math_max_ltv (the mathematically derived LTV), regime_cap_ltv (the 6-mode regime ceiling), binding_constraint (string: 'math' or 'regime_cap' indicating which is tighter), sigma_T (projected volatility over the loan horizon), and regime (current market regime label).

## Example request

```json
{
 "input": {
  "type": "http",
  "method": "GET",
  "queryParams": {
   "asset": "ETH",
   "duration_sec": 3600,
   "max_default_prob": 0.005
  }
 }
}
```

## 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"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [],
     "properties": {
      "asset": {
       "enum": [
        "ETH",
        "BTC"
       ],
       "type": "string",
       "description": "Collateral asset"
      },
      "duration_sec": {
       "type": "integer",
       "maximum": 86400,
       "minimum": 120,
       "description": "Loan horizon in seconds"
      },
      "max_default_prob": {
       "type": "number",
       "maximum": 0.01,
       "minimum": 0,
       "description": "Lender's tolerated default probability"
      }
     },
     "additionalProperties": false
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "ok",
      "max_ltv"
     ],
     "properties": {
      "ok": {
       "type": "boolean"
      },
      "regime": {
       "type": "string"
      },
      "max_ltv": {
       "type": "number"
      },
      "sigma_T": {
       "type": "number"
      },
      "math_max_ltv": {
       "type": "number"
      },
      "regime_cap_ltv": {
       "type": "number"
      },
      "binding_constraint": {
       "type": "string"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "regime": "NORMAL",
  "max_ltv": 0.92,
  "sigma_T": 0.0051,
  "computed_at": 1779380000,
  "math_max_ltv": 0.97,
  "regime_cap_ltv": 0.92,
  "binding_constraint": "regime_cap"
 }
}
```

## More

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