{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cryptodataapi-com/json-schema/cryptodataapi-com-backtest-klines-response-schema.json",
  "title": "BacktestKlinesResponse",
  "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/BacktestKlinesResponse",
  "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
    },
    "symbol": {
      "type": "string",
      "title": "Symbol"
    },
    "exchange": {
      "type": "string",
      "title": "Exchange"
    },
    "interval": {
      "type": "string",
      "title": "Interval"
    },
    "count": {
      "type": "integer",
      "title": "Count"
    },
    "klines": {
      "items": {
        "$ref": "#/$defs/BacktestKline"
      },
      "type": "array",
      "title": "Klines"
    }
  },
  "type": "object",
  "required": [
    "symbol",
    "exchange",
    "interval",
    "count",
    "klines"
  ],
  "$defs": {
    "BacktestKline": {
      "properties": {
        "t": {
          "type": "integer",
          "title": "T"
        },
        "o": {
          "type": "number",
          "title": "O"
        },
        "h": {
          "type": "number",
          "title": "H"
        },
        "l": {
          "type": "number",
          "title": "L"
        },
        "c": {
          "type": "number",
          "title": "C"
        },
        "v": {
          "type": "number",
          "title": "V"
        },
        "qv": {
          "title": "Qv",
          "type": [
            "number",
            "null"
          ]
        },
        "n": {
          "title": "N",
          "type": [
            "integer",
            "null"
          ]
        }
      },
      "type": "object",
      "required": [
        "t",
        "o",
        "h",
        "l",
        "c",
        "v"
      ],
      "title": "BacktestKline"
    },
    "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."
    }
  }
}