{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/gammaflip-io/json-schema/gammaflip-io-data-meta-schema.json",
  "title": "DataMeta",
  "description": "Self-describing `meta` of data responses (`/levels`, `/gex/...`). Keys are\nadditive; `exchange`, `coin` and `expiration` keep their existing values.\n",
  "x-generated": "2026-11-09",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/gammaflip-io-openapi.yml#/components/schemas/DataMeta",
  "type": "object",
  "properties": {
    "timestamp": {
      "type": "string",
      "format": "date-time"
    },
    "exchange": {
      "type": "string",
      "description": "The exchange as requested (lowercased)."
    },
    "coin": {
      "type": "string"
    },
    "expiration": {
      "type": "string",
      "description": "Expiration code as used (`TOTAL` or `DDMMMYY`). Only on expiration-scoped endpoints."
    },
    "expiration_iso": {
      "type": [
        "string",
        "null"
      ],
      "description": "Expiration as `YYYY-MM-DD`; `null` for `TOTAL`."
    },
    "exchange_resolved": {
      "type": "string",
      "description": "Canonical venue after aliasing (`tradfi`, `deribit`, `combined`, `deribit+derive`, ...)."
    },
    "market": {
      "type": "string",
      "enum": [
        "crypto",
        "tradfi"
      ]
    },
    "symbol": {
      "type": "string"
    },
    "as_of": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "description": "Time the data reflects. ISO 8601 UTC with `Z`, second precision."
    },
    "oi_as_of": {
      "type": [
        "string",
        "null"
      ],
      "description": "Session date (`YYYY-MM-DD`) of the open interest used."
    },
    "data_source": {
      "type": [
        "string",
        "null"
      ],
      "description": "`live`, `eod`, ... (crypto is always `live`)."
    },
    "is_live": {
      "type": [
        "boolean",
        "null"
      ]
    },
    "market_open": {
      "type": [
        "boolean",
        "null"
      ],
      "description": "Always `true` for crypto."
    },
    "next_open": {
      "type": [
        "string",
        "null"
      ],
      "description": "Next market open (TradFi); `null` for crypto."
    },
    "units": {
      "type": "string"
    },
    "docs_url": {
      "type": "string"
    },
    "rate_limit": {
      "$ref": "#/$defs/RateLimit"
    }
  },
  "$defs": {
    "RateLimit": {
      "type": "object",
      "properties": {
        "limit": {
          "type": "integer"
        },
        "remaining": {
          "type": "integer"
        },
        "reset": {
          "type": "string",
          "format": "date-time"
        }
      }
    }
  }
}