{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/pricefeed-online/json-schema/pricefeed-online-breakdown-schema.json",
  "title": "Breakdown",
  "x-generated": "2026-11-21",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/pricefeed-online-openapi.yaml#/components/schemas/Breakdown",
  "type": "object",
  "properties": {
    "success": {
      "type": "boolean"
    },
    "base": {
      "type": "string"
    },
    "quote": {
      "type": "string"
    },
    "median": {
      "type": "number",
      "description": "Served price (weighted median)"
    },
    "plain_median": {
      "type": "number",
      "description": "Unweighted median, for reference"
    },
    "spread_percent": {
      "type": [
        "number",
        "null"
      ]
    },
    "source_count": {
      "type": "integer"
    },
    "outliers_removed": {
      "type": "integer"
    },
    "sources": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "source": {
            "type": "string"
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "type": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "type": [
              "string",
              "null"
            ]
          },
          "price": {
            "type": "number"
          },
          "bid": {
            "type": [
              "number",
              "null"
            ]
          },
          "ask": {
            "type": [
              "number",
              "null"
            ]
          },
          "change_24h": {
            "type": [
              "number",
              "null"
            ]
          },
          "volume_24h": {
            "type": [
              "number",
              "null"
            ]
          },
          "age_seconds": {
            "type": [
              "integer",
              "null"
            ]
          },
          "fetched_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "deviation_percent": {
            "type": [
              "number",
              "null"
            ]
          },
          "weight": {
            "type": "number"
          },
          "is_outlier": {
            "type": "boolean"
          }
        }
      }
    }
  }
}