{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cubesphere-xyz/json-schema/cubesphere-xyz-events-response-schema.json",
  "title": "EventsResponse",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cubesphere-xyz-openapi.yml#/components/schemas/EventsResponse",
  "properties": {
    "items": {
      "items": {
        "$ref": "#/$defs/EventItem"
      },
      "type": "array",
      "title": "Items"
    },
    "next_cursor": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Next Cursor",
      "description": "다음 페이지의 `cursor` 파라미터. null = 마지막 페이지."
    },
    "limitations": {
      "additionalProperties": {
        "type": "string"
      },
      "type": "object",
      "title": "Limitations"
    }
  },
  "additionalProperties": false,
  "type": "object",
  "required": [
    "items",
    "limitations"
  ],
  "$defs": {
    "EventItem": {
      "properties": {
        "event_id": {
          "type": "string",
          "title": "Event Id"
        },
        "event_revision": {
          "type": "integer",
          "title": "Event Revision"
        },
        "event_type": {
          "type": "string",
          "title": "Event Type"
        },
        "quality_status": {
          "type": "string",
          "title": "Quality Status"
        },
        "rule_10b5_1_status": {
          "type": "string",
          "title": "Rule 10B5 1 Status"
        },
        "transaction_date": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "title": "Transaction Date"
        },
        "issuer_cik": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Issuer Cik"
        },
        "ticker": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Ticker",
          "description": "null = 대표 티커 미확정."
        },
        "issuer_name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Issuer Name"
        },
        "owner_cik": {
          "type": "string",
          "title": "Owner Cik"
        },
        "owner_name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Owner Name"
        },
        "gross_acquired_shares": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Gross Acquired Shares"
        },
        "gross_disposed_shares": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Gross Disposed Shares"
        },
        "net_share_change": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Net Share Change"
        },
        "cash_purchase_value": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Cash Purchase Value"
        },
        "cash_sale_value": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Cash Sale Value"
        },
        "trade_value": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Trade Value",
          "description": "COALESCE(cash_purchase_value, cash_sale_value) — `min_value` 필터가 비교하는 값."
        },
        "holding_change_pct": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Holding Change Pct"
        },
        "accession_no": {
          "type": "string",
          "title": "Accession No",
          "description": "이 이벤트의 앵커 공시."
        },
        "known_at": {
          "type": "string",
          "format": "date-time",
          "title": "Known At",
          "description": "공시 접수 시각(UTC). 무료 티어 24시간 지연 게이트의 기준."
        },
        "recorded_at": {
          "type": "string",
          "format": "date-time",
          "title": "Recorded At",
          "description": "우리 시스템이 이 이벤트를 기록한 시각. known_at 과 다를 수 있다(처리 지연)."
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "event_id",
        "event_revision",
        "event_type",
        "quality_status",
        "rule_10b5_1_status",
        "owner_cik",
        "accession_no",
        "known_at",
        "recorded_at"
      ],
      "title": "EventItem",
      "description": "`GET /v1/events` 행 1건 — Form 4 해석 이벤트.\n\n**공통 계약**(#303): `event_revision`·`known_at`·`accession_no` 는 모든 행에 있다.\n가격에서 파생된 값은 여기 없다(라이선스 — README 참조)."
    }
  }
}