{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/resolvedmarkets-com/json-schema/resolvedmarkets-com-backtest-run-status-schema.json",
  "title": "BacktestRunStatus",
  "x-generated": "2026-10-31",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/resolvedmarkets-com-openapi.json#/components/schemas/BacktestRunStatus",
  "type": "object",
  "properties": {
    "status": {
      "type": "string",
      "enum": [
        "queued",
        "running",
        "done",
        "failed"
      ]
    },
    "progress": {
      "type": "number",
      "description": "Present while running; 0..1."
    },
    "summary": {
      "$ref": "#/$defs/BacktestSummary"
    },
    "trades": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": true
      }
    },
    "equityCurve": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": true
      }
    },
    "durationMs": {
      "type": "integer"
    },
    "marketsScanned": {
      "type": "integer"
    },
    "tradesCount": {
      "type": "integer"
    },
    "error": {
      "type": "string"
    }
  },
  "$defs": {
    "BacktestSummary": {
      "type": "object",
      "additionalProperties": true,
      "description": "Aggregate stats produced by the backtest engine (PnL, win rate, drawdown, etc.). Exact shape evolves with the engine."
    }
  }
}