{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/flashodds-live/json-schema/flashodds-live-grade-request-schema.json",
  "title": "GradeRequest",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/flashodds-live-api-openapi.json#/components/schemas/GradeRequest",
  "type": "object",
  "required": [
    "outcome_id",
    "observed_at",
    "price"
  ],
  "properties": {
    "outcome_id": {
      "type": "string",
      "description": "Canonical Sorqen outcome id."
    },
    "observed_at": {
      "type": "string",
      "format": "date-time",
      "description": "When you saw the price. Must be before the scheduled start: Sorqen grades pregame prices and publishes no live-market benchmark. Only information that existed at or before this instant is used."
    },
    "price": {
      "$ref": "#/$defs/GradePrice"
    },
    "venue": {
      "type": [
        "string",
        "null"
      ],
      "description": "Optional label for where your price came from. METADATA ONLY: Sorqen never fetches the venue and no code path reads this to decide anything."
    }
  },
  "$defs": {
    "GradePrice": {
      "type": "object",
      "required": [
        "format",
        "value"
      ],
      "description": "The price you accepted, and what kind of number it is. The format is DECLARED, never inferred: a bare 1.91 is decimal odds to one caller and a nonsense probability to another, and guessing from magnitude produces a plausible wrong grade rather than an error.",
      "properties": {
        "format": {
          "type": "string",
          "enum": [
            "american",
            "decimal",
            "probability"
          ]
        },
        "value": {
          "type": "number",
          "description": "American: any non-zero integer (-150 is 0.600000). Decimal: greater than 1. Probability: strictly between 0 and 1."
        }
      }
    }
  }
}