{"openapi":"3.1.0","info":{"title":"Crosswire","version":"0.6.1"},"paths":{"/v1/health":{"get":{"summary":"Health","operationId":"health_v1_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponse"}}}},"503":{"description":"Snapshots are stale (status: stale)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponse"}}}}}}},"/v1/live":{"get":{"summary":"Live","operationId":"live_v1_live_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LivenessResponse"}}}},"503":{"description":"This machine's refresher has stalled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LivenessResponse"}}}}}}},"/v1/events":{"get":{"summary":"Events","operationId":"events_v1_events_get","parameters":[{"name":"include_settled","in":"query","required":false,"schema":{"type":"boolean","description":"Include events whose markets have already resolved. They stay auditable either way — this only controls the listing.","default":false,"title":"Include Settled"},"description":"Include events whose markets have already resolved. They stay auditable either way — this only controls the listing."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/EventInfo"},"title":"Response Events V1 Events Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/adoption":{"get":{"summary":"Adoption","operationId":"adoption_v1_adoption_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/audit":{"post":{"summary":"Audit Pair","operationId":"audit_pair_v1_audit_post","parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$defs":{"Venue":{"enum":["polymarket","kalshi"],"title":"Venue","type":"string"},"VenueMarketRef":{"description":"A pointer to one outcome leg on one venue.","properties":{"venue":{"$ref":"#/$defs/Venue"},"market_id":{"title":"Market Id","type":"string"},"outcome":{"title":"Outcome","type":"string"},"side":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Side"}},"required":["venue","market_id","outcome"],"title":"VenueMarketRef","type":"object"}},"description":"Either supply two legs to compare, or a canonical_event_id for a\nprecomputed pair.","properties":{"market_a":{"anyOf":[{"$ref":"#/$defs/VenueMarketRef"},{"type":"null"}]},"market_b":{"anyOf":[{"$ref":"#/$defs/VenueMarketRef"},{"type":"null"}]},"canonical_event_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Canonical Event Id"},"notional_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"optional; sizes the thin-liquidity check","title":"Notional Usd"},"mode":{"default":"advisory","description":"advisory | strict","title":"Mode","type":"string"}},"title":"AuditRequest","type":"object"}}},"required":true}}}},"components":{"schemas":{"EventInfo":{"properties":{"canonical_event_id":{"type":"string","title":"Canonical Event Id"},"venues":{"items":{"$ref":"#/components/schemas/Venue"},"type":"array","title":"Venues"},"kickoff_utc":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Kickoff Utc"},"pairs":{"anyOf":[{"items":{"$ref":"#/components/schemas/PairInfo"},"type":"array"},{"type":"null"}],"title":"Pairs"},"match_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Match Date"},"settled":{"type":"boolean","title":"Settled","default":false}},"type":"object","required":["canonical_event_id","venues"],"title":"EventInfo","description":"One row of `/v1/events`: a covered canonical event and its venues."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HealthResponse":{"properties":{"status":{"type":"string","title":"Status"},"ruleset_sha":{"type":"string","title":"Ruleset Sha"},"snapshot_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Snapshot Ts"},"snapshot_age_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Snapshot Age Seconds"},"coverage":{"additionalProperties":{"type":"integer"},"type":"object","title":"Coverage"},"version":{"type":"string","title":"Version"},"refresher":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Refresher"},"audit_log_records":{"type":"integer","title":"Audit Log Records","default":0},"audit_log_errors":{"type":"integer","title":"Audit Log Errors","default":0}},"type":"object","required":["status","ruleset_sha","snapshot_ts","coverage","version"],"title":"HealthResponse","description":"[FIX-OPS-04] `status` is tri-valued and derived from snapshot age at\nresponse time — it used to be the literal string \"ok\"."},"LivenessResponse":{"properties":{"live":{"type":"boolean","title":"Live"},"reason":{"type":"string","title":"Reason"},"thread_running":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Thread Running"},"progressing":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Progressing"},"last_progress_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Last Progress Seconds"},"progress_window_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Progress Window Seconds"},"cycle_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Cycle Count"}},"type":"object","required":["live","reason"],"title":"LivenessResponse","description":"[FIX-OPS-04] `GET /v1/live` — the PER-MACHINE liveness probe the Fly\nhealthcheck keys off. It reports one thing: is this machine's refresher\nstill completing cycles? Data freshness is deliberately NOT part of it —\nsee the fly.toml comment and app/health_state.py."},"PairInfo":{"properties":{"pair_id":{"type":"string","title":"Pair Id"},"outcome_leg":{"type":"string","title":"Outcome Leg"},"polymarket_market_id":{"type":"string","title":"Polymarket Market Id"},"kalshi_market_id":{"type":"string","title":"Kalshi Market Id"},"polymarket_outcome_label":{"type":"string","title":"Polymarket Outcome Label"},"kalshi_outcome_label":{"type":"string","title":"Kalshi Outcome Label"}},"type":"object","required":["pair_id","outcome_leg","polymarket_market_id","kalshi_market_id","polymarket_outcome_label","kalshi_outcome_label"],"title":"PairInfo","description":"One per-outcome leg-pair under a canonical event (CP-05). `pair_id` is the\noutcome-suffixed canonical id (`…:result#home`) `/v1/audit` accepts as\n`canonical_event_id`."},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"Venue":{"type":"string","enum":["polymarket","kalshi"],"title":"Venue"}}}}