{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/snaptrade/main/json-schema/snaptrade-partner-stats-schema.json",
  "title": "PartnerStats",
  "description": "User, connection, and connected asset totals for your SnapTrade Client ID.",
  "x-generated": "2026-10-21",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/snaptrade-openapi.yml#/components/schemas/PartnerStats",
  "type": "object",
  "required": [
    "total_users",
    "total_connected_users",
    "total_active_connections",
    "total_disabled_connections",
    "oauth_total_users",
    "oauth_total_connected_users",
    "oauth_total_active_connections",
    "oauth_total_disabled_connections",
    "assets_under_management",
    "disabled_assets_under_management",
    "oauth_assets_under_management",
    "oauth_disabled_assets_under_management",
    "assets_under_management_currency",
    "assets_under_management_calculated_at"
  ],
  "properties": {
    "total_users": {
      "type": "integer",
      "description": "Number of users registered with your Client ID."
    },
    "total_connected_users": {
      "type": "integer",
      "description": "Number of users registered with your Client ID that have at least one connection, active or disabled."
    },
    "total_active_connections": {
      "type": "integer",
      "description": "Number of active connections across users registered with your Client ID."
    },
    "total_disabled_connections": {
      "type": "integer",
      "description": "Number of disabled connections across users registered with your Client ID."
    },
    "oauth_total_users": {
      "type": [
        "integer",
        "null"
      ],
      "description": "Number of users who have authorized your OAuth application. `null` if your Client ID has no OAuth application."
    },
    "oauth_total_connected_users": {
      "type": [
        "integer",
        "null"
      ],
      "description": "Number of users who have authorized your OAuth application and have at least one connection, active or disabled. `null` if your Client ID has no OAuth application."
    },
    "oauth_total_active_connections": {
      "type": [
        "integer",
        "null"
      ],
      "description": "Number of active connections across users who have authorized your OAuth application. `null` if your Client ID has no OAuth application."
    },
    "oauth_total_disabled_connections": {
      "type": [
        "integer",
        "null"
      ],
      "description": "Number of disabled connections across users who have authorized your OAuth application. `null` if your Client ID has no OAuth application."
    },
    "assets_under_management": {
      "type": [
        "number",
        "null"
      ],
      "format": "double",
      "description": "Total latest account value across active connections of users registered with your Client ID, in `assets_under_management_currency`. `null` until the first daily snapshot has been calculated."
    },
    "disabled_assets_under_management": {
      "type": [
        "number",
        "null"
      ],
      "format": "double",
      "description": "Total account value across disabled connections of users registered with your Client ID, as of each connection's last sync, in `assets_under_management_currency`. `null` until the first daily snapshot has been calculated."
    },
    "oauth_assets_under_management": {
      "type": [
        "number",
        "null"
      ],
      "format": "double",
      "description": "Total latest account value across active connections of users who have authorized your OAuth application, in `assets_under_management_currency`. `null` if your Client ID has no OAuth application, or until the first daily snapshot after it was added."
    },
    "oauth_disabled_assets_under_management": {
      "type": [
        "number",
        "null"
      ],
      "format": "double",
      "description": "Total account value across disabled connections of users who have authorized your OAuth application, as of each connection's last sync, in `assets_under_management_currency`. `null` if your Client ID has no OAuth application, or until the first daily snapshot after it was added."
    },
    "assets_under_management_currency": {
      "type": "string",
      "description": "ISO 4217 currency code the asset values are expressed in."
    },
    "assets_under_management_calculated_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "description": "Timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format indicating when the connected asset values were last calculated. `null` until the first daily snapshot has been calculated."
    }
  }
}