{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/bot-trade-org/json-schema/bot-trade-org-step-result-schema.json",
  "title": "StepResult",
  "x-generated": "2026-11-03",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/bot-trade-org-openapi.json#/components/schemas/StepResult",
  "additionalProperties": false,
  "properties": {
    "$schema": {
      "description": "A URL to the JSON Schema for this object.",
      "format": "uri",
      "readOnly": true,
      "type": "string"
    },
    "bars_advanced": {
      "format": "int64",
      "type": "integer"
    },
    "cash": {
      "format": "double",
      "type": "number"
    },
    "done": {
      "type": "boolean"
    },
    "equity": {
      "format": "double",
      "type": "number"
    },
    "fills": {
      "items": {
        "$ref": "#/$defs/RunTrade"
      },
      "type": [
        "array",
        "null"
      ]
    },
    "liquidated": {
      "type": "boolean"
    },
    "liquidation_at_ts": {
      "format": "date-time",
      "type": "string"
    },
    "new_sim_time": {
      "format": "date-time",
      "type": "string"
    },
    "positions_value": {
      "format": "double",
      "type": "number"
    }
  },
  "required": [
    "bars_advanced",
    "new_sim_time",
    "fills",
    "liquidated",
    "equity",
    "cash",
    "positions_value",
    "done"
  ],
  "type": "object",
  "$defs": {
    "RunTrade": {
      "additionalProperties": false,
      "properties": {
        "fill_price": {
          "format": "double",
          "type": "number"
        },
        "id": {
          "type": "string"
        },
        "quantity": {
          "format": "double",
          "type": "number"
        },
        "realized_pnl": {
          "format": "double",
          "type": "number"
        },
        "reasoning": {
          "type": "string"
        },
        "run_id": {
          "type": "string"
        },
        "side": {
          "type": "string"
        },
        "sim_time_filled": {
          "format": "date-time",
          "type": "string"
        },
        "slippage_bps": {
          "format": "int64",
          "type": "integer"
        },
        "symbol": {
          "type": "string"
        },
        "total_value": {
          "format": "double",
          "type": "number"
        }
      },
      "required": [
        "id",
        "run_id",
        "symbol",
        "side",
        "quantity",
        "fill_price",
        "slippage_bps",
        "sim_time_filled",
        "total_value",
        "realized_pnl"
      ],
      "type": "object"
    }
  }
}