{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cryptodataapi-com/json-schema/cryptodataapi-com-coin-depth-history-response-schema.json",
  "title": "CoinDepthHistoryResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cryptodataapi-com-liquidity-market-depth-api-openapi.yml#/components/schemas/CoinDepthHistoryResponse",
  "properties": {
    "coin": {
      "type": "string",
      "title": "Coin"
    },
    "minutes": {
      "type": "integer",
      "title": "Minutes"
    },
    "count": {
      "type": "integer",
      "title": "Count"
    },
    "history": {
      "items": {
        "$ref": "#/$defs/CoinDepthSnapshot"
      },
      "type": "array",
      "title": "History"
    }
  },
  "type": "object",
  "required": [
    "coin",
    "minutes",
    "count",
    "history"
  ],
  "$defs": {
    "CoinDepthSnapshot": {
      "properties": {
        "coin": {
          "type": "string",
          "title": "Coin"
        },
        "ts": {
          "type": "integer",
          "title": "Ts"
        },
        "mid_price": {
          "type": "number",
          "title": "Mid Price"
        },
        "spread_bps": {
          "title": "Spread Bps",
          "type": [
            "number",
            "null"
          ]
        },
        "bid_levels": {
          "type": "integer",
          "title": "Bid Levels"
        },
        "ask_levels": {
          "type": "integer",
          "title": "Ask Levels"
        },
        "depth_usd": {
          "$ref": "#/$defs/DepthBuckets"
        },
        "levels_truncated": {
          "title": "Levels Truncated",
          "description": "{bid: {10bps: bool, ...}, ask: {...}} — band saturated the returned book levels; its depth_usd is a lower bound",
          "additionalProperties": {
            "additionalProperties": {
              "type": "boolean"
            },
            "type": "object"
          },
          "type": [
            "object",
            "null"
          ]
        },
        "total_depth_25bps_usd": {
          "title": "Total Depth 25Bps Usd",
          "type": [
            "number",
            "null"
          ]
        },
        "imbalance_10bps": {
          "title": "Imbalance 10Bps",
          "type": [
            "number",
            "null"
          ]
        },
        "open_interest_usd": {
          "title": "Open Interest Usd",
          "type": [
            "number",
            "null"
          ]
        }
      },
      "type": "object",
      "required": [
        "coin",
        "ts",
        "mid_price",
        "bid_levels",
        "ask_levels"
      ],
      "title": "CoinDepthSnapshot"
    },
    "DepthBuckets": {
      "properties": {
        "bid": {
          "additionalProperties": {
            "type": "number"
          },
          "type": "object",
          "title": "Bid"
        },
        "ask": {
          "additionalProperties": {
            "type": "number"
          },
          "type": "object",
          "title": "Ask"
        }
      },
      "type": "object",
      "title": "DepthBuckets",
      "description": "Cumulative bid/ask notional within bps buckets from mid."
    }
  }
}