{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/emidlabs-com/json-schema/emidlabs-com-get-backtest-id-response-schema.json",
  "title": "GetBacktestIdResponse",
  "x-generated": "2026-11-06",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_ae-authored/emidlabs-com-openapi-generated.yml#/components/schemas/GetBacktestIdResponse",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "UUID of the backtest."
    },
    "status": {
      "type": "string",
      "description": "\"Running\", \"Completed\", or \"Failed\"."
    },
    "strategySnapshotJson": {
      "type": "string",
      "description": "The strategy used, serialized."
    },
    "assetPair": {
      "type": "string",
      "description": "Asset pair."
    },
    "initialDate": {
      "type": "string",
      "description": "Date range start."
    },
    "finalDate": {
      "type": "string",
      "description": "Date range end."
    },
    "createdAtUtc": {
      "type": "string",
      "description": "Creation timestamp (UTC)."
    },
    "errorMessage": {
      "type": "string",
      "description": "Error details if status is \"Failed\"."
    },
    "canViewResult": {
      "type": "boolean",
      "description": "Whether the result is accessible."
    },
    "logsJson": {
      "type": "string",
      "description": "Execution logs serialized as JSON string."
    },
    "result": {
      "type": "object",
      "description": "Aggregate performance metrics when Completed."
    },
    "recentTradeCount": {
      "type": "number",
      "description": "How many of the most recent closed trades recentAvgPnlR/recentOutcomes are based on (up to 5)."
    },
    "recentAvgPnlR": {
      "type": "number",
      "description": "Average pnlR of the most recent recentTradeCount trades."
    },
    "recentOutcomes": {
      "type": "array",
      "description": "\"Win\"/\"Loss\" per recent trade, chronological."
    }
  }
}