{"openapi":"3.1.0","info":{"title":"QuantSquawk Enterprise API","version":"1.0.0","description":"AI market-impact signals, queryable signal history, and a real-time WebSocket stream. All endpoints require an API key. Hit rates measure directional correlation, not tradable returns. AI-synthesized market data only — not investment advice.","contact":{"email":"hello@sorre.co"}},"servers":[{"url":"https://quantsquawk.com"}],"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","description":"API key issued by QuantSquawk, format qsk_live_<40 hex>. Pass as: Authorization: Bearer qsk_live_..."}},"schemas":{"Signal":{"type":"object","properties":{"headline":{"type":"string"},"source":{"type":"string"},"category":{"type":"string"},"tier":{"type":"string"},"score":{"type":"integer","minimum":-100,"maximum":100},"rationale":{"type":"string"},"instrument":{"type":"string"},"scored_at":{"type":"string","format":"date-time"},"move_30m_pct":{"type":"number","nullable":true},"move_eod_pct":{"type":"number","nullable":true},"hit_30m":{"type":"integer","nullable":true,"description":"1 = direction matched, 0 = missed, null = pending/unmeasurable"},"hit_eod":{"type":"integer","nullable":true},"status":{"type":"string","enum":["pending","t30_done","complete","excluded"]}}},"FeedItem":{"type":"object","properties":{"text":{"type":"string"},"category":{"type":"string"},"tier":{"type":"string"},"source":{"type":"string"},"impactScore":{"type":"integer","minimum":-100,"maximum":100},"rationale":{"type":"string"},"scoreMethod":{"type":"string","enum":["ai","heuristic"]}}}}},"security":[{"apiKey":[]}],"paths":{"/api/v1/analyze":{"post":{"summary":"Run a full market-impact analysis on any headline","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["headline"],"properties":{"headline":{"type":"string"}}}}}},"responses":{"200":{"description":"Structured analysis: marketImpactScore, regime, winners/losers, sector rotation, volatility, liquidity, sentiment."},"401":{"description":"Missing or invalid API key"},"429":{"description":"Daily rate limit reached"},"503":{"description":"Analysis engine temporarily unavailable"}}}},"/api/v1/ledger":{"get":{"summary":"Query the full signal accuracy ledger","parameters":[{"name":"tier","in":"query","schema":{"type":"string","enum":["1","2"]}},{"name":"category","in":"query","schema":{"type":"string"}},{"name":"from","in":"query","schema":{"type":"string","format":"date"}},{"name":"to","in":"query","schema":{"type":"string","format":"date"}},{"name":"limit","in":"query","schema":{"type":"integer","maximum":1000,"default":200}}],"responses":{"200":{"description":"Rolling 30-day stats plus matching ledger entries","content":{"application/json":{"schema":{"type":"object","properties":{"stats":{"type":"object"},"count":{"type":"integer"},"entries":{"type":"array","items":{"$ref":"#/components/schemas/Signal"}}}}}}},"401":{"description":"Missing or invalid API key"}}}},"/api/v1/feed":{"get":{"summary":"Current scored headline feed","parameters":[{"name":"category","in":"query","schema":{"type":"string"}},{"name":"tier","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Scored headlines","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer"},"items":{"type":"array","items":{"$ref":"#/components/schemas/FeedItem"}},"feedStatus":{"type":"string","enum":["live","degraded"]}}}}}}}}},"/api/v1/stream":{"get":{"summary":"WebSocket signal stream (upgrade)","description":"Connect via wss://quantsquawk.com/api/v1/stream?key=qsk_live_... (or send the key as a Bearer Authorization header). On connect the server sends {type:'hello'} then {type:'snapshot', items:[...]} with the current scored feed, followed by {type:'signals', items:[...]} messages as new headlines are scored. Invalid keys receive {type:'error'} and close code 4001.","responses":{"101":{"description":"Switching protocols"}}}}}}