{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://optionapi.com/assets/data/option-record.schema.json",
  "title": "OptionAPI.com illustrative contract record",
  "description": "A minimal educational schema, not an industry standard or production trading specification.",
  "type": "object",
  "required": [
    "data_mode",
    "schema_version",
    "contract_id",
    "underlying_id",
    "option_type",
    "strike",
    "strike_currency",
    "expiration_date",
    "exercise_style",
    "settlement_method",
    "premium_currency",
    "premium_multiplier",
    "deliverable"
  ],
  "properties": {
    "data_mode": {
      "const": "synthetic"
    },
    "schema_version": {
      "const": "1.0"
    },
    "contract_id": {
      "type": "string",
      "minLength": 1
    },
    "underlying_id": {
      "type": "string",
      "minLength": 1
    },
    "option_type": {
      "enum": [
        "call",
        "put"
      ]
    },
    "strike": {
      "type": "number",
      "exclusiveMinimum": 0
    },
    "strike_currency": {
      "type": "string",
      "pattern": "^[A-Z]{3}$"
    },
    "expiration_date": {
      "type": "string",
      "format": "date"
    },
    "exercise_style": {
      "enum": [
        "american",
        "european",
        "other",
        "unknown"
      ]
    },
    "settlement_method": {
      "enum": [
        "physical",
        "cash",
        "other",
        "unknown"
      ]
    },
    "premium_currency": {
      "type": "string",
      "minLength": 1
    },
    "premium_multiplier": {
      "type": "number",
      "exclusiveMinimum": 0
    },
    "deliverable": {
      "type": "object",
      "required": [
        "asset",
        "units"
      ],
      "properties": {
        "asset": {
          "type": "string"
        },
        "units": {
          "type": "number",
          "exclusiveMinimum": 0
        }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}
