{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/sharpapi/json-schema/sharpapi-account-schema.json",
  "title": "Account",
  "description": "Flat account shape returned by `GET /api/v1/account`. All fields are always present.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/sharpapi-account-api-openapi.yml#/components/schemas/Account",
  "type": "object",
  "required": [
    "key_id",
    "tier",
    "rate_limit",
    "features",
    "streaming"
  ],
  "properties": {
    "key_id": {
      "type": "string",
      "description": "Identifier for the API key used in this request."
    },
    "tier": {
      "type": "string",
      "description": "Subscription tier.",
      "enum": [
        "free",
        "hobby",
        "pro",
        "sharp",
        "enterprise"
      ]
    },
    "rate_limit": {
      "type": "object",
      "required": [
        "requests_per_minute",
        "max_books"
      ],
      "properties": {
        "requests_per_minute": {
          "type": "integer",
          "description": "Maximum API requests allowed per minute on this tier."
        },
        "max_books": {
          "type": "integer",
          "description": "Maximum sportsbooks accessible on this tier (999 = unlimited)."
        }
      }
    },
    "features": {
      "type": "array",
      "description": "Capabilities enabled on this tier.",
      "items": {
        "type": "string",
        "enum": [
          "odds",
          "schedule",
          "ev",
          "arbitrage",
          "middles",
          "low_hold",
          "history",
          "futures",
          "closing_line",
          "splits",
          "injuries"
        ]
      }
    },
    "streaming": {
      "type": "object",
      "required": [
        "enabled",
        "max_connections"
      ],
      "properties": {
        "enabled": {
          "type": "boolean",
          "description": "Whether SSE/WebSocket streaming is available (via tier, add-on, or trial)."
        },
        "max_connections": {
          "type": "integer",
          "description": "Maximum concurrent SSE/WebSocket connections (0 if streaming not enabled)."
        }
      }
    }
  }
}