{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "HyperCore economic backtest",
  "description": "A HyperCore perp backtest over the venue's own /info history (blueprint 30, decision D4).",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "window": {
      "$ref": "uniswap-economic.schema.json#/properties/window"
    },
    "inventory": {
      "$ref": "uniswap-economic.schema.json#/properties/inventory"
    },
    "mode": {
      "const": "economic"
    },
    "execution": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "latency": {
          "$ref": "strategy.schema.json#/$defs/Duration"
        },
        "decision_interval": {
          "$ref": "strategy.schema.json#/$defs/Duration"
        },
        "models": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "position_model": {
              "const": "hypercore_trade_candles"
            }
          },
          "required": [
            "position_model"
          ]
        }
      },
      "required": [
        "latency",
        "models"
      ]
    },
    "data": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "source": {
          "const": "hyperliquid_info"
        },
        "candles": {
          "enum": [
            "1m",
            "3m",
            "5m",
            "15m",
            "30m",
            "1h",
            "2h",
            "4h",
            "8h",
            "12h",
            "1d"
          ]
        },
        "max_age_seconds": {
          "$ref": "strategy.schema.json#/$defs/Duration"
        },
        "fills": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "slippage_bps": {
              "type": "string",
              "pattern": "^(0|[1-9][0-9]*)(\\.[0-9]+)?$"
            },
            "taker_fee_bps": {
              "type": "string",
              "pattern": "^(0|[1-9][0-9]*)(\\.[0-9]+)?$"
            }
          },
          "required": [
            "slippage_bps"
          ]
        }
      },
      "required": [
        "source",
        "candles",
        "max_age_seconds",
        "fills"
      ]
    },
    "costs": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "kind": {
          "const": "excluded"
        }
      },
      "required": [
        "kind"
      ]
    }
  },
  "required": [
    "window",
    "inventory",
    "mode",
    "execution",
    "data",
    "costs"
  ]
}
