{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cryptodataapi-com/json-schema/cryptodataapi-com-backtest-hlliquidation-bars-response-schema.json",
  "title": "BacktestHLLiquidationBarsResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cryptodataapi-com-backtesting-api-openapi.yml#/components/schemas/BacktestHLLiquidationBarsResponse",
  "properties": {
    "grain": {
      "$ref": "#/$defs/GrainDescriptor"
    },
    "coverage": {
      "$ref": "#/$defs/CoverageInfo"
    },
    "next_cursor": {
      "title": "Next Cursor",
      "type": [
        "string",
        "null"
      ]
    },
    "has_more": {
      "type": "boolean",
      "title": "Has More",
      "default": false
    },
    "coin": {
      "title": "Coin",
      "type": [
        "string",
        "null"
      ]
    },
    "interval": {
      "type": "string",
      "title": "Interval"
    },
    "count": {
      "type": "integer",
      "title": "Count"
    },
    "data": {
      "items": {
        "$ref": "#/$defs/BacktestHLLiquidationBar"
      },
      "type": "array",
      "title": "Data"
    },
    "audit": {
      "additionalProperties": {
        "type": "string"
      },
      "type": "object",
      "title": "Audit"
    }
  },
  "type": "object",
  "required": [
    "coin",
    "interval",
    "count",
    "data",
    "audit"
  ],
  "$defs": {
    "BacktestHLLiquidationBar": {
      "properties": {
        "time": {
          "type": "integer",
          "title": "Time"
        },
        "coin": {
          "title": "Coin",
          "type": [
            "string",
            "null"
          ]
        },
        "long_usd": {
          "type": "number",
          "title": "Long Usd"
        },
        "short_usd": {
          "type": "number",
          "title": "Short Usd"
        },
        "total_usd": {
          "type": "number",
          "title": "Total Usd"
        },
        "n_long": {
          "type": "integer",
          "title": "N Long"
        },
        "n_short": {
          "type": "integer",
          "title": "N Short"
        },
        "max_fill_usd": {
          "title": "Max Fill Usd",
          "type": [
            "number",
            "null"
          ]
        }
      },
      "type": "object",
      "required": [
        "time",
        "long_usd",
        "short_usd",
        "total_usd",
        "n_long",
        "n_short"
      ],
      "title": "BacktestHLLiquidationBar",
      "description": "One closed bucket of Hyperliquid liquidation flow, summed from the exact\nfills served by ``/backtesting/hl-liquidations``. ``coin`` is null on the\nmarket-wide series. Buckets with no fills are not returned."
    },
    "CoverageInfo": {
      "properties": {
        "local_first": {
          "title": "Local First",
          "type": [
            "integer",
            "null"
          ]
        },
        "local_last": {
          "title": "Local Last",
          "type": [
            "integer",
            "null"
          ]
        },
        "archive_hint": {
          "title": "Archive Hint",
          "type": [
            "string",
            "null"
          ]
        }
      },
      "type": "object",
      "title": "CoverageInfo",
      "description": "Local retention bounds (ms) for the queried scope. ``archive_hint`` is set\nwhen the window starts before ``local_first`` — those rows are not missing,\nthey live in the daily Parquet archive."
    },
    "GrainDescriptor": {
      "properties": {
        "kind": {
          "type": "string",
          "title": "Kind"
        },
        "cadence": {
          "title": "Cadence",
          "type": [
            "string",
            "null"
          ]
        },
        "is_cumulative": {
          "type": "boolean",
          "title": "Is Cumulative",
          "default": false
        },
        "sum_ok": {
          "type": "boolean",
          "title": "Sum Ok",
          "default": false
        },
        "window": {
          "title": "Window",
          "type": [
            "string",
            "null"
          ]
        },
        "settlements_per_day": {
          "title": "Settlements Per Day",
          "type": [
            "integer",
            "null"
          ]
        },
        "note": {
          "type": "string",
          "title": "Note"
        }
      },
      "type": "object",
      "required": [
        "kind",
        "note"
      ],
      "title": "GrainDescriptor",
      "description": "What ONE ROW of a series is, stated on the payload so it cannot be mis-summed.\n\n``kind``: ``event`` (one fill), ``bar`` (a closed bucket), ``rate_snapshot``\n(the live rate sampled on a timer), ``rolling_window`` (a trailing total\nsampled on a timer), ``settled_payment`` (one settlement print).\n``sum_ok`` — adding rows across time is meaningful. ``is_cumulative`` — a row\nalready contains its predecessors' flow. ``settlements_per_day`` is set for\nfunding series only."
    }
  }
}