{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/degenhedge-com/json-schema/degenhedge-com-fee-quote-schema.json",
  "title": "FeeQuote",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/degenhedge-com-openapi.yml#/components/schemas/FeeQuote",
  "type": "object",
  "required": [
    "input",
    "fee_cents",
    "total_cost_cents",
    "breakeven_win_rate_pct",
    "fee_schedule",
    "disclaimer"
  ],
  "properties": {
    "input": {
      "type": "object",
      "required": [
        "price_cents",
        "contracts",
        "order"
      ],
      "properties": {
        "price_cents": {
          "type": "number",
          "description": "Normalised price (tenths of a cent; whole cents between 10 and 90)"
        },
        "contracts": {
          "type": "integer"
        },
        "order": {
          "type": "string",
          "enum": [
            "taker",
            "maker"
          ]
        },
        "balance_precision_dollars": {
          "type": "string",
          "enum": [
            "0.01",
            "0.0001"
          ]
        }
      }
    },
    "fee_cents": {
      "type": "number",
      "description": "Model fee plus balance rounding, in cents; may be fractional."
    },
    "fee_per_contract_cents": {
      "type": "number"
    },
    "total_cost_cents": {
      "type": "number"
    },
    "profit_if_win_cents": {
      "type": "number"
    },
    "loss_if_lose_cents": {
      "type": "number"
    },
    "breakeven_win_rate_pct": {
      "type": "number",
      "description": "Win rate needed to break even after the fee"
    },
    "breakeven_before_fees_pct": {
      "type": "number"
    },
    "wins_needed_per_loss": {
      "type": [
        "number",
        "null"
      ],
      "description": "null when the fee takes the whole profit"
    },
    "entry_price_bucket": {
      "type": [
        "string",
        "null"
      ]
    },
    "notes": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "fee_rule": {
      "type": "string"
    },
    "fee_schedule": {
      "type": "object",
      "required": [
        "fee_type",
        "fee_multiplier",
        "live"
      ],
      "properties": {
        "fee_type": {
          "type": "string"
        },
        "fee_multiplier": {
          "type": [
            "number",
            "string"
          ]
        },
        "checked_at": {
          "type": [
            "string",
            "null"
          ]
        },
        "source": {
          "type": "string"
        },
        "live": {
          "type": "boolean"
        },
        "stale": {
          "type": "boolean"
        }
      }
    },
    "matches": {
      "type": "string",
      "format": "uri"
    },
    "record_at_this_price": {
      "type": "string",
      "format": "uri"
    },
    "disclaimer": {
      "type": "string"
    }
  }
}