{
  "data": {
    "inputs": {
      "amount_sent": "number, units of the source currency",
      "from_currency": "ISO 4217 code",
      "to_currency": "ISO 4217 code",
      "your_rate_source": "either a directly quoted rate (units of to_currency per 1 unit of from_currency), or amount_received / amount_sent when only both amounts are known"
    },
    "mid_market_rate": {
      "source": "GET https://api.frankfurter.dev/v2/rate/{from_currency}/{to_currency}",
      "field": "response.rate",
      "meaning": "ECB reference rate, the rate banks trade at with each other with no retail markup"
    },
    "formula": {
      "spread_pct": "(mid_rate - your_rate) / mid_rate * 100",
      "amount_lost": "(spread_pct / 100) * amount_sent * mid_rate",
      "units_of_amount_lost": "to_currency"
    },
    "verdict_thresholds": [
      { "spread_pct_abs_max": 0, "condition": "spread_pct <= 0", "label": "better-than-mid-market" },
      { "spread_pct_abs_max": 0.5, "label": "excellent" },
      { "spread_pct_abs_max": 1.5, "label": "reasonable" },
      { "spread_pct_abs_max": 4, "label": "high" },
      { "spread_pct_abs_max": null, "label": "very-high" }
    ],
    "thresholds_disclaimer": "These bands are a rough interpretive guide based on commonly observed retail FX markup ranges, not a verified claim about any specific named provider. They exist to give the number meaning, not to accuse anyone.",
    "history": {
      "source": "GET https://api.frankfurter.dev/v2/{start_date}..{end_date}?base={from_currency}&symbols={to_currency}",
      "window": "trailing 30 days",
      "use": "rendered as a sparkline so a user can see today's mid-market rate in the context of recent movement; not used in the spread/verdict calculation"
    }
  },
  "ui": {
    "title": "FairRate methodology",
    "message": "This is the entire calculation FairRate performs, published so it can be reproduced or audited without reading the client JS. There is no hidden step and no server-side computation — the browser does exactly this against Frankfurter's public data.",
    "navigation": [
      { "label": "Human-facing calculator", "href": "/" },
      { "label": "Discovery manifest", "href": "/.well-known/add.json" },
      { "label": "Feedback channel status", "href": "/feedback" }
    ]
  }
}
