{
  "openapi": "3.1.0",
  "info": {
    "title": "SML Evidence-Bounded Market Events API",
    "version": "1.0.0",
    "description": "Free V1 machine interface for evidence-bounded market-event artifacts sourced from live Alpha Sentinel observations. No synthetic market events. Read-only; no brokerage execution."
  },
  "servers": [{"url":"https://squeezeos-api.onrender.com"}],
  "paths": {
    "/api/market-event-preview": {
      "get": {
        "operationId": "getMarketEventPreview",
        "summary": "Get current evidence-bounded market-event artifacts",
        "responses": {
          "200": {
            "description": "Current live artifacts, or an explicit empty event set when no usable candidate is supplied upstream.",
            "content": {"application/json":{"schema":{"type":"object","required":["status","product","version","read_only","trade_execution","event_count","events","truth"],"properties":{"status":{"type":"string","enum":["ready","no_usable_event"]},"product":{"type":"string"},"version":{"type":"string"},"read_only":{"type":"boolean","const":true},"trade_execution":{"type":"boolean","const":false},"source":{"type":"object"},"event_count":{"type":"integer","minimum":0},"events":{"type":"array","items":{"$ref":"https://scriptmasterlabs.com/.well-known/market-event.schema.json"}},"truth":{"type":"object"}}}}}
          },
          "503": {
            "description":"Runtime source unavailable; no synthetic event returned and no charge occurs.",
            "content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"unavailable"},"events":{"type":"array","maxItems":0},"event_count":{"type":"integer","const":0},"synthetic_events":{"type":"boolean","const":false},"charged":{"type":"boolean","const":false},"reason":{"type":"string"}}}}}
          }
        }
      }
    },
    "/api/market-events-stream": {
      "get": {
        "operationId": "getMarketEventSnapshotStream",
        "summary": "Receive an SSE market-event snapshot",
        "description": "V1 emits a snapshot event and a transport-contract event per connection. It is explicitly not represented as a persistent continuous socket.",
        "responses": {
          "200": {"description":"text/event-stream containing event: snapshot followed by event: contract with mode snapshot_sse_v1 and continuous_socket=false.","content":{"text/event-stream":{"schema":{"type":"string"}}}}
        }
      }
    }
  },
  "externalDocs": {"description":"SML Evidence-Bounded Market Events","url":"https://scriptmasterlabs.com/market-events"}
}
