GET /v1/edge/{slug}

$0.1realtimetier: alphacache 60sEngine C — Weather × Markets Edge

Full divergence picture for a single weather market: model probability with the discretized model distribution, divergence history from stored signals, a half-Kelly sizing hint, and explicit risk notes (including model labeling). Find slugs via /v1/edge/weather-markets.

Parameters

NameInTypeRequiredNotes
slugpathstringyes

Example

curl "https://x402-factory.com/v1/edge/nyc-high-temp-above-95f-2026-07-24"

Example response

{
  "data": {
    "market_p": 0.329,
    "model_p": 0.0276,
    "model_distribution": [
      {
        "value": 25.1,
        "p": 0.15
      },
      {
        "value": 26.2,
        "p": 0.2
      },
      {
        "value": 27.5,
        "p": 0.3
      },
      {
        "value": 28.8,
        "p": 0.2
      },
      {
        "value": 29.9,
        "p": 0.15
      }
    ],
    "divergence_history": [
      {
        "t": "2026-07-18T12:00:00.000Z",
        "divergence": 0.3014
      }
    ],
    "kelly_fraction_hint": 0.25,
    "risk_notes": [
      "model_p comes from the deterministic stub model — placeholder numbers until the production model is wired",
      "single-venue market; no cross-venue price check"
    ]
  },
  "meta": {
    "endpoint": "/v1/edge/{slug}",
    "version": "1.0.0",
    "generated_at": "2026-08-18T22:54:16.069Z",
    "freshness": "realtime",
    "sources": [
      "kalshi",
      "polymarket",
      "stub-model"
    ],
    "request_id": "req_00000000",
    "docs": "https://x402-factory.com/docs/edge.detail",
    "data_mode": "live"
  }
}

Response schema (data payload)

{
  "type": "object",
  "properties": {
    "market_p": {
      "type": "number",
      "minimum": 0,
      "maximum": 1
    },
    "model_p": {
      "type": "number",
      "minimum": 0,
      "maximum": 1
    },
    "model_distribution": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "value": {
            "type": "number"
          },
          "p": {
            "type": "number",
            "minimum": 0,
            "maximum": 1
          }
        },
        "required": [
          "value",
          "p"
        ],
        "additionalProperties": false
      }
    },
    "divergence_history": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "t": {
            "type": "string"
          },
          "divergence": {
            "type": "number"
          }
        },
        "required": [
          "t",
          "divergence"
        ],
        "additionalProperties": false
      }
    },
    "kelly_fraction_hint": {
      "type": "number",
      "minimum": 0,
      "maximum": 0.25,
      "description": "Half-Kelly for the model-favored side; capped at 0.25"
    },
    "risk_notes": {
      "type": "array",
      "items": {
        "type": "string"
      }
    }
  },
  "required": [
    "market_p",
    "model_p",
    "model_distribution",
    "divergence_history",
    "kelly_fraction_hint",
    "risk_notes"
  ],
  "additionalProperties": false
}

The platform wraps every payload in an envelope: { "data": …, "meta": { endpoint, version, generated_at, freshness, sources, request_id, docs, data_mode } }.

Payment (x402)

Unpaid requests receive 402 with payment requirements (accepts). Pay $0.1 in USDC on Base per call via an X-PAYMENT header — see docs.x402.org. With PAYMENT_MODE=disabled (local dev) the endpoint is open.

Errors

StatusCodeMeaning
400INVALID_PARAMSInput failed validation; message lists the offending fields.
404NOT_FOUNDNo matching resource; suggestion may point to a sibling endpoint.
410RESOLVEDMarket/event settled; body includes a resolution summary.
503STALE_DATAUpstream feed down; stale data is never silently served beyond 2× cache TTL.
500INTERNALOur bug. The request_id helps us find it.