# Margin of Safety – Record Ranking

> Margin of Safety – Record Ranking is a paid API for AI agents from market.datapackvibe.com, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-18).

Ranks up to 200 supplied records by their calculated margin of safety, preserving original row indices and returning results with formula, units, and limitations.

## Facts

- Endpoint: POST https://market.datapackvibe.com/x402/assistant-finance-margin-safety-rank?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-18
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/margin-of-safety-record-ranking-6849d80b
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_hfYAs-MdUyGCVdDcpNLdf

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 margin-of-safety-record-ranking-6849d80b -d '<json body>'
```

Example prompt: I have 8 business units — can you rank them by margin of safety? Their actual sales and break-even sales are: Unit A: $120,000 actual, $80,000 break-even; Unit B: $95,000 actual, $75,000 break-even; Unit C: $200,000 actual, $110,000 break-even; Unit D: $60,000 actual, $50,000 break-even; Unit E: $180,000 actual, $140,000 break-even; Unit F: $300,000 actual, $150,000 break-even; Unit G: $75,000 actual, $60,000 break-even; Unit H: $110,000 actual, $90,000 break-even.

## When to prefer this

Choose this endpoint when you need to rank a batch of records (2–200) by margin of safety in a single call, with row indices preserved and formula/units documentation included in the response. It is purpose-built for margin of safety ranking, unlike generic statistical ranking endpoints. Prefer it when you have user-supplied actual_sales and break_even_sales figures and need a bounded, auditable ranking report without live market data or financial advice.

## Known failure modes

- Fewer than 2 rows supplied — minimum of 2 records required
- actual_sales of 0 or omitted — field is required and must be greater than 0 (exclusiveMinimum)
- break_even_sales missing — required field
- More than 200 rows submitted — maxItems limit exceeded
- Non-numeric values passed in numeric fields — schema validation failure
- break_even_sales exceeds actual_sales — ranking still computed but margin of safety will be negative, indicating operating below break-even

## How this service works

Margin of safety - Record ranking: Rank up to 200 supplied records by calculated value, preserving row indices; higher is not necessarily better. Metric: Margin of safety. Supplied figures only; returns JSON with formula, units and limitations. One of 50 calculators with 20 analysis modes. No live feed, financial advice or trade execution. 0.01 USDC includes one bounded record ranking report.

## Output

A JSON response containing the supplied records re-ordered by their calculated margin of safety score, with original row indices preserved. Includes the formula used (margin of safety = (actual_sales − break_even_sales) / actual_sales), the units assumed, and a limitations section describing caveats such as reliance on supplied figures only and no live data.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "rows": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "actual_sales",
     "break_even_sales"
    ],
    "properties": {
     "actual_sales": {
      "type": "number",
      "default": 10000,
      "maximum": 1000000000000,
      "minimum": 0,
      "description": "Amount in a consistent supplied currency and reporting period",
      "exclusiveMinimum": 0
     },
     "break_even_sales": {
      "type": "number",
      "default": 7000,
      "maximum": 1000000000000,
      "minimum": 0,
      "description": "Amount in a consistent supplied currency and reporting period"
     }
    },
    "additionalProperties": false
   },
   "default": [
    {
     "actual_sales": 10000,
     "break_even_sales": 7000
    },
    {
     "actual_sales": 11000,
     "break_even_sales": 7700.000000000001
    },
    {
     "actual_sales": 10000,
     "break_even_sales": 7000
    },
    {
     "actual_sales": 11000,
     "break_even_sales": 7700.000000000001
    }
   ],
   "maxItems": 200,
   "minItems": 2
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/margin-of-safety-record-ranking-6849d80b/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from market.datapackvibe.com](https://www.zero.xyz/host/market.datapackvibe.com/llms.txt)
