{
  "openapi": "3.1.0",
  "info": {
    "title": "FATE — World Cup 2026 API",
    "version": "1.2.0",
    "description": "Public sealed archive artifacts plus supporting match, market, rating, share-card, and River Score compatibility surfaces for FATE. The finished /wc/ page replays historical probabilities; replay values are not automatically signed.",
    "contact": {
      "name": "Omair Shahid",
      "email": "omairshahid21@gmail.com",
      "url": "https://os1221.com"
    }
  },
  "x-service-info": {
    "categories": [
      "sports",
      "data",
      "probability",
      "provenance"
    ],
    "provider": "os1221.com",
    "public_gets": true,
    "archive_state": "sealed",
    "final_authority": "/wc/final-ledger.v1.json",
    "river_score_capture": "sealed-read-only"
  },
  "x-webmcp-tools": [
    "get_group_standings",
    "get_championship_probabilities",
    "get_draft_standings",
    "get_live_matches",
    "get_river_moments",
    "get_river_snapshot",
    "get_river_capture_bundle"
  ],
  "servers": [
    {
      "url": "https://os1221.com",
      "description": "Public archive and compatibility surfaces"
    }
  ],
  "paths": {
    "/wc/final-ledger.v1.json": {
      "get": {
        "operationId": "getFateFinalLedger",
        "summary": "Read the sealed World Cup final ledger",
        "description": "Authoritative, versioned final-result ledger for the finished FATE World Cup 2026 archive.",
        "tags": [
          "public",
          "archive",
          "provenance"
        ],
        "responses": {
          "200": {
            "description": "Sealed final ledger",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        }
      }
    },
    "/wc/draft-order-receipt.v1.json": {
      "get": {
        "operationId": "getFateDraftOrderReceipt",
        "summary": "Read the sealed fantasy draft-order receipt",
        "description": "Versioned 1.01–1.12 World Cup group order with rule, ledger, and engine hashes.",
        "tags": [
          "public",
          "archive",
          "provenance"
        ],
        "responses": {
          "200": {
            "description": "Sealed draft-order receipt",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        }
      }
    },
    "/wc/river-score.v1.json": {
      "get": {
        "operationId": "getFateRiverArchive",
        "summary": "Read the sealed probability-river replay",
        "description": "Versioned 42-checkpoint archive: 1 captured-origin checkpoint and 41 reconstructed checkpoints. Hash checks establish artifact integrity, not contemporaneous observation.",
        "tags": [
          "public",
          "archive",
          "provenance"
        ],
        "responses": {
          "200": {
            "description": "Sealed River Score archive",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        }
      }
    },
    "/wc/api/results": {
      "get": {
        "operationId": "getWorldCupResults",
        "summary": "Read the sealed result ledger in the historical feed shape",
        "description": "Compatibility-shaped read view over /wc/final-ledger.v1.json. It returns separate final, live, scheduled, and unmapped arrays plus coverage counts without consulting ESPN at runtime. The versioned ledger remains final authority.",
        "tags": [
          "public",
          "compatibility"
        ],
        "responses": {
          "200": {
            "description": "Sealed result view",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultsResponse"
                }
              }
            }
          }
        }
      }
    },
    "/wc/api/markets": {
      "get": {
        "operationId": "getMarkets",
        "summary": "Get labeled market checks",
        "description": "Retained Polymarket, Kalshi, and Manifold comparison route. Source timestamps and availability vary; values never alter the sealed archive and are not hidden simulation inputs.",
        "tags": [
          "public",
          "compatibility"
        ],
        "responses": {
          "200": {
            "description": "Market values and source metadata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "source": {
                      "type": "string"
                    },
                    "counts": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "integer"
                      }
                    },
                    "title": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "groupWin": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": true
                }
              }
            }
          }
        }
      }
    },
    "/wc/api/parallax/lebron": {
      "get": {
        "operationId": "getParallaxLebron",
        "summary": "LeBron next-team multi-venue sensor board (CFI Parallax)",
        "description": "Sensor-only Contested Futures Instrument for NBA free-agency destination. Polymarket + Kalshi + Manifold (research prior), multi-horizon Poly CLOB windows, Kalshi hourly candles, entropy/TV/shocks. No StructureLaw.",
        "tags": [
          "public"
        ],
        "responses": {
          "200": {
            "description": "Parallax board with ranked outcomes, windows, metrics, sr_summary",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        }
      }
    },
    "/wc/api/parallax/wc-title": {
      "get": {
        "operationId": "getParallaxWcTitle",
        "summary": "WC champion multi-venue sensors + Poly path windows",
        "description": "Historical WC2026 CFI structure-domain companion: Poly+Kalshi+Manifold title observations and multi-horizon Polymarket CLOB deltas. Standalone sensor data for StructureLaw G.P residual R=G−O; not attached to the sealed FATE replay and never fed the engine.",
        "tags": [
          "public"
        ],
        "responses": {
          "200": {
            "description": "Ranked fused sensors + windows for residual attach",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        }
      }
    },
    "/wc/api/pele": {
      "get": {
        "operationId": "getPeleRatings",
        "summary": "Read the retained Nate Silver PELE rating source",
        "tags": [
          "public",
          "compatibility"
        ],
        "responses": {
          "200": {
            "description": "Code-keyed PELE ratings and ranks",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RatingsResponse"
                }
              }
            }
          }
        }
      }
    },
    "/wc/api/elo": {
      "get": {
        "operationId": "getWorldElo",
        "summary": "Read the retained World Football Elo source",
        "tags": [
          "public",
          "compatibility"
        ],
        "responses": {
          "200": {
            "description": "Code-keyed World Elo ratings and ranks",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RatingsResponse"
                }
              }
            }
          }
        }
      }
    },
    "/wc/api/og": {
      "get": {
        "operationId": "getOwnerCard",
        "summary": "Get a static owner/group SVG share card",
        "description": "Returns a 1200×630 SVG archive identity card. It deliberately contains no fabricated teams, bars, or probabilities; open /wc/ to inspect the sealed replay.",
        "tags": [
          "public"
        ],
        "parameters": [
          {
            "name": "owner",
            "in": "query",
            "description": "Group letter A–L or owner name",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Static SVG card",
            "content": {
              "image/svg+xml": {}
            }
          }
        }
      }
    },
    "/wc/api/draft-race-history": {
      "get": {
        "operationId": "getRiverScoreHistory",
        "summary": "Read the sealed River archive in the historical route shape",
        "description": "Compatibility-shaped read view over /wc/river-score.v1.json: 1 captured-origin checkpoint and 41 reconstructed checkpoints with explicit provenance. The versioned River artifact remains replay authority.",
        "tags": [
          "public",
          "compatibility",
          "provenance"
        ],
        "responses": {
          "200": {
            "description": "River Score history",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RiverScoreHistory"
                }
              }
            }
          },
          "503": {
            "description": "Sealed River archive asset unavailable; no empty-history claim is made",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RiverScoreHistory"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "captureRiverScore",
        "summary": "Sealed archive write boundary",
        "description": "Compatibility method retained to fail closed. Every request returns 410 Gone; no credential or payload can append to the versioned archive.",
        "tags": [
          "retired",
          "archive",
          "provenance"
        ],
        "responses": {
          "410": {
            "description": "Archive sealed; capturePolicy is sealed-read-only"
          }
        }
      }
    },
    "/wc/api/premium": {
      "get": {
        "operationId": "getRetiredPremiumExperiment",
        "summary": "Retired premium experiment",
        "description": "Permanently retired. No payment is accepted; historical FATE data remains public and free.",
        "tags": [
          "retired"
        ],
        "responses": {
          "410": {
            "description": "Paid product permanently retired"
          }
        }
      }
    },
    "/wc/api/checkout": {
      "get": {
        "operationId": "getRetiredCheckout",
        "summary": "Retired checkout status",
        "description": "Permanently retired. No subscription or payment is accepted.",
        "tags": [
          "retired"
        ],
        "responses": {
          "410": {
            "description": "Checkout permanently retired"
          }
        }
      },
      "post": {
        "operationId": "postRetiredCheckout",
        "summary": "Retired checkout",
        "description": "Permanently retired. Environment configuration cannot reactivate checkout.",
        "tags": [
          "retired"
        ],
        "responses": {
          "410": {
            "description": "Checkout permanently retired"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Match": {
        "type": "object",
        "required": [
          "id",
          "h",
          "a",
          "date",
          "status"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "h": {
            "type": "string",
            "description": "Home team code"
          },
          "a": {
            "type": "string",
            "description": "Away team code"
          },
          "hg": {
            "type": [
              "integer",
              "null"
            ]
          },
          "ag": {
            "type": [
              "integer",
              "null"
            ]
          },
          "winner": {
            "type": [
              "string",
              "null"
            ]
          },
          "shootout": {
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": true
          },
          "kickoff": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "date": {
            "type": "string",
            "format": "date"
          },
          "status": {
            "type": "string"
          },
          "detail": {
            "type": [
              "string",
              "null"
            ]
          },
          "clock": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "additionalProperties": true
      },
      "ResultsResponse": {
        "type": "object",
        "required": [
          "ts",
          "source",
          "status",
          "coverage",
          "failedUpstreams",
          "final",
          "live",
          "scheduled",
          "counts",
          "unmapped"
        ],
        "properties": {
          "schema": {
            "type": "string"
          },
          "archiveStatus": {
            "const": "sealed"
          },
          "ledgerHash": {
            "type": "string",
            "pattern": "^sha256:[0-9a-f]{64}$"
          },
          "ts": {
            "type": "integer"
          },
          "synced": {
            "type": "string"
          },
          "source": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "ok",
              "degraded"
            ]
          },
          "failedUpstreams": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "coverage": {
            "type": "object",
            "required": [
              "requestedDays",
              "successfulDays",
              "failedDays",
              "complete",
              "windowStart",
              "windowEnd",
              "synced"
            ],
            "properties": {
              "requestedDays": {
                "type": "integer"
              },
              "successfulDays": {
                "type": "integer"
              },
              "failedDays": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "complete": {
                "type": "boolean"
              },
              "windowStart": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "windowEnd": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "synced": {
                "type": "string"
              }
            },
            "additionalProperties": false
          },
          "final": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Match"
            }
          },
          "live": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Match"
            }
          },
          "scheduled": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Match"
            }
          },
          "counts": {
            "type": "object",
            "properties": {
              "final": {
                "type": "integer"
              },
              "live": {
                "type": "integer"
              }
            },
            "additionalProperties": true
          },
          "unmapped": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "additionalProperties": false
      },
      "RatingsResponse": {
        "type": "object",
        "properties": {
          "source": {
            "type": "string"
          },
          "metric": {
            "type": "string"
          },
          "version": {
            "type": "string"
          },
          "ratings": {
            "type": "object",
            "additionalProperties": {
              "type": "number"
            }
          },
          "ranks": {
            "type": "object",
            "additionalProperties": {
              "type": "integer"
            }
          }
        },
        "additionalProperties": true
      },
      "RiverScoreHistory": {
        "type": "object",
        "required": [
          "schema",
          "status",
          "capturePolicy",
          "snapshots"
        ],
        "properties": {
          "schema": {
            "const": "os1221.fate-river-score.v1"
          },
          "status": {
            "type": "string",
            "enum": [
              "sealed",
              "ok",
              "degraded",
              "unavailable"
            ]
          },
          "error": {
            "type": "string"
          },
          "capturePolicy": {
            "const": "sealed-read-only"
          },
          "verification": {
            "type": "object",
            "properties": {
              "checked": {
                "type": "integer",
                "minimum": 0
              },
              "accepted": {
                "type": "integer",
                "minimum": 0
              },
              "rejected": {
                "type": "integer",
                "minimum": 0
              },
              "rejectedCheckpointIds": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "chainComplete": {
                "type": "boolean"
              }
            },
            "additionalProperties": true
          },
          "snapshots": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RiverScore"
            }
          },
          "legacy": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true
            }
          }
        },
        "additionalProperties": true
      },
      "RiverScore": {
        "type": "object",
        "required": [
          "schema",
          "checkpointId",
          "seq",
          "label",
          "observedAt",
          "squad",
          "river",
          "event",
          "engine",
          "seed",
          "sims",
          "provenance"
        ],
        "properties": {
          "schema": {
            "const": "os1221.fate-river-score.v1"
          },
          "checkpointId": {
            "type": "string"
          },
          "seq": {
            "type": "integer",
            "minimum": 0
          },
          "label": {
            "type": "string"
          },
          "observedAt": {
            "type": "string"
          },
          "capturedAt": {
            "type": [
              "integer",
              "null"
            ]
          },
          "squad": {
            "type": "object",
            "additionalProperties": {
              "type": "number",
              "minimum": 0,
              "maximum": 1
            }
          },
          "river": {
            "type": "object",
            "description": "48 team-code keys, each holding seven monotone round probabilities",
            "additionalProperties": {
              "type": "array",
              "minItems": 7,
              "maxItems": 7,
              "items": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              }
            }
          },
          "event": {
            "type": "object",
            "additionalProperties": true
          },
          "engine": {
            "type": "string"
          },
          "seed": {
            "type": "integer"
          },
          "sims": {
            "type": "integer",
            "minimum": 1
          },
          "provenance": {
            "type": "object",
            "additionalProperties": true
          },
          "integrity": {
            "type": "string",
            "enum": [
              "hashed",
              "legacy-unhashed"
            ]
          }
        },
        "additionalProperties": true
      }
    }
  }
}
