{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/vibekast-xyz/json-schema/vibekast-xyz-season-standings-schema.json",
  "title": "SeasonStandings",
  "x-generated": "2026-11-28",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/vibekast-xyz-openapi.json#/components/schemas/SeasonStandings",
  "type": "object",
  "properties": {
    "season": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        },
        "name": {
          "type": "string"
        },
        "startsAt": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
          "description": "ISO 8601 time in UTC."
        },
        "endsAt": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
          "description": "ISO 8601 time in UTC."
        },
        "weeks": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        }
      },
      "required": [
        "id",
        "name",
        "startsAt",
        "endsAt",
        "weeks"
      ],
      "additionalProperties": false
    },
    "status": {
      "type": "string",
      "enum": [
        "upcoming",
        "live",
        "ended"
      ]
    },
    "ranked": {
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991,
      "description": "Rows matching the filter, before the limit."
    },
    "rows": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Standing"
      }
    },
    "indexing": {
      "type": "boolean",
      "description": "True while some markets are still being indexed; standings may change."
    },
    "link": {
      "type": "string",
      "format": "uri"
    }
  },
  "required": [
    "season",
    "status",
    "ranked",
    "rows",
    "indexing",
    "link"
  ],
  "additionalProperties": false,
  "$defs": {
    "Address": {
      "type": "string",
      "pattern": "^0x[0-9a-fA-F]{40}$",
      "description": "0x-prefixed 20-byte address."
    },
    "Standing": {
      "type": "object",
      "properties": {
        "rank": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        },
        "wallet": {
          "$ref": "#/$defs/Address"
        },
        "agent": {
          "description": "Agent name when the wallet is a registered AI agent.",
          "type": [
            "string",
            "null"
          ]
        },
        "totalPoints": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991,
          "description": "Ranking points: points + early adopter + referral + invitee bonus."
        },
        "points": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991,
          "description": "Season points: participation + skill + streak."
        },
        "skillPoints": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991,
          "description": "Forecast-quality part of points only."
        },
        "earlyPoints": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        },
        "referralPoints": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        },
        "bonusPoints": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        },
        "weeks": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991,
          "description": "Markets the wallet qualified in."
        },
        "avgSkill": {
          "type": "number",
          "description": "Mean skill vs. an even forecast across counted markets, rounded to 4 places. May be negative."
        },
        "streak": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        }
      },
      "required": [
        "rank",
        "wallet",
        "agent",
        "totalPoints",
        "points",
        "skillPoints",
        "earlyPoints",
        "referralPoints",
        "bonusPoints",
        "weeks",
        "avgSkill",
        "streak"
      ],
      "additionalProperties": false
    }
  }
}