{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/alphabazaar-ai/json-schema/alphabazaar-ai-leaderboard-response-schema.json",
  "title": "LeaderboardResponse",
  "description": "GET /api/leaderboard/*",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/alphabazaar-ai-leaderboard-api-openapi.yml#/components/schemas/LeaderboardResponse",
  "properties": {
    "status": {
      "type": "string",
      "title": "Status"
    },
    "timeframe": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Timeframe"
    },
    "period": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Period"
    },
    "leaderboard": {
      "items": {
        "$ref": "#/$defs/LeaderboardEntry"
      },
      "type": "array",
      "title": "Leaderboard"
    },
    "total_publishers": {
      "type": "integer",
      "title": "Total Publishers",
      "default": 0
    },
    "source": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Source"
    }
  },
  "type": "object",
  "required": [
    "status",
    "leaderboard"
  ],
  "$defs": {
    "LeaderboardEntry": {
      "properties": {
        "rank": {
          "type": "integer",
          "title": "Rank"
        },
        "username": {
          "type": "string",
          "title": "Username"
        },
        "publisher_type": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Publisher Type"
        },
        "is_house_bot": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "title": "Is House Bot"
        },
        "total_signals": {
          "type": "integer",
          "title": "Total Signals",
          "default": 0
        },
        "closed_signals": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Closed Signals"
        },
        "pure_return": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Pure Return"
        },
        "avg_return": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Avg Return"
        },
        "win_rate": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Win Rate"
        },
        "total_allocation": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Total Allocation"
        },
        "avg_allocation_per_signal": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Avg Allocation Per Signal"
        },
        "bio": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Bio"
        },
        "is_monetized": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "title": "Is Monetized"
        },
        "has_profile_image": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "title": "Has Profile Image"
        },
        "display_name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Display Name"
        }
      },
      "type": "object",
      "required": [
        "rank",
        "username"
      ],
      "title": "LeaderboardEntry"
    }
  }
}