GET /v1/climate-events/probability

$0.05realtimetier: deepcache 900sEngine C — Weather × Markets Edge

Our model's probability that a condition occurs in a future window up to 31 days out, with the method labeled. Temperature events (above/below, window_stat max or min) answer at model-covered stations only — elsewhere they return INVALID_PARAMS rather than an estimate. Precipitation, wind, and named-storm events answer for any US point (NWS-derived). When a listed prediction market covers the same event, it is cross-referenced.

Exact window_stat semantics for temperature events: temp_above + max = P(window max >= x) ('gets up to x'); temp_below + max = P(window max <= x) ('stays below x'); temp_below + min = P(window min <= x) ('gets down to x'); temp_above + min = P(window min >= x) ('stays above x'). Thresholds are half-degree bucket edges in the market-derived case; window_stat=min requires model v4.1+ and a station with fitted fall curves — elsewhere the request fails with INVALID_PARAMS rather than returning a max-based approximation.

Parameters

NameInTypeRequiredNotes
latquerynumberno
lonquerynumberno
cityquerystringnoMajor US city name as an alternative to lat/lon
conditionquerystringyes — one of "temp_above", "temp_below", "precip_above", "wind_above", "any_precip", "named_storm_landfall"
thresholdquerynumbernoMetric units: °C for temp, mm for precip, kph for wind
window_startquerystringyes
window_endquerystringyes
window_statquerystringnoBinding statistic for temperature events: max (default) or min; exact semantics in docs (default: "max") — one of "max", "min"

Example

curl "https://x402-factory.com/v1/climate-events/probability?city=nyc&condition=temp_above&threshold=35&window_start=2026-07-24T00%3A00%3A00Z&window_end=2026-07-24T23%3A59%3A59Z"

Matches a listed market — comparable_market cross-references it.

Example response

Worked example from deterministic fixture data (note meta.data_mode); live responses report their own sources and data_mode.

{
  "data": {
    "probability": 0.0276,
    "method": "stub",
    "comparable_market": {
      "slug": "nyc-high-temp-above-95f-2026-07-24",
      "market_p": 0.329
    }
  },
  "meta": {
    "endpoint": "/v1/climate-events/probability",
    "version": "1.0.0",
    "generated_at": "2026-10-05T10:15:57.800Z",
    "freshness": "realtime",
    "sources": [
      "stub-model"
    ],
    "request_id": "req_00000000",
    "docs": "https://x402-factory.com/docs/edge.climate-events-probability",
    "data_mode": "live"
  }
}

Response schema (data payload)

{
  "type": "object",
  "properties": {
    "probability": {
      "type": "number",
      "minimum": 0,
      "maximum": 1
    },
    "method": {
      "type": "string",
      "description": "What produced the number: \"runway-oracle-v4\" (calibrated model), \"nws-blend (…)\", \"nws-gridpoint (…)\" with any derivation disclosed, \"climatology (…)\", or \"stub\""
    },
    "window_stat": {
      "description": "Echoed binding statistic for temperature events (max | min)",
      "type": "string"
    },
    "comparable_market": {
      "type": "object",
      "properties": {
        "slug": {
          "type": "string"
        },
        "market_p": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        }
      },
      "required": [
        "slug",
        "market_p"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "probability",
    "method"
  ],
  "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.05 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.