{"openapi":"3.1.0","info":{"title":"Confidence Signal API","description":"Prediction-market signals above a confidence threshold. x402-gated.","version":"0.1.0"},"paths":{"/health":{"get":{"summary":"Health","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[]}},"/v1/signals":{"get":{"summary":"Get Signals","operationId":"get_signals_v1_signals_get","parameters":[{"name":"min_confidence","in":"query","required":false,"schema":{"type":"number","maximum":0.99,"minimum":0.5,"default":0.88,"title":"Min Confidence"}},{"name":"asset","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"BTC, ETH, SOL, or 'all'","title":"Asset"},"description":"BTC, ETH, SOL, or 'all'"},{"name":"platform","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"kalshi, polymarket, or 'all'","title":"Platform"},"description":"kalshi, polymarket, or 'all'"},{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"crypto, macro, politics, weather, sports, tech, all","title":"Category"},"description":"crypto, macro, politics, weather, sports, tech, all"},{"name":"max_ttl_seconds","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}],"description":"Drop signals settling further out than this. Default 86400 (24h).","default":86400,"title":"Max Ttl Seconds"},"description":"Drop signals settling further out than this. Default 86400 (24h)."},{"name":"min_ttl_seconds","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"title":"Min Ttl Seconds"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignalsResponse"}}}},"402":{"description":"Payment required. Pay $0.005 USDC on Base mainnet (asset 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913) to 0x6476D35895ACd991a798291CdC55bbCf39aE9DaB. Resend with the X-PAYMENT header containing the signed payment payload. See the `payment-required` response header for the full x402 v2 challenge.","content":{"application/json":{"schema":{"type":"object","description":"Empty body; payment challenge is in the `payment-required` header."}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/calibration":{"get":{"summary":"Track record: per-confidence-bucket hit rate over settled markets.","description":"Empirical calibration: for predictions we made at confidence X, what fraction won?\n\nEach settled market contributes one sample with the last confidence we\nobserved before settlement. Buckets are 2-percentage-point wide.","operationId":"get_calibration_v1_calibration_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"description":"Window in days for settled-market lookback. Default 30.","default":30,"title":"Days"},"description":"Window in days for settled-market lookback. Default 30."},{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter to one category. Default: all.","title":"Category"},"description":"Filter to one category. Default: all."},{"name":"min_confidence","in":"query","required":false,"schema":{"type":"number","maximum":0.99,"minimum":0.5,"description":"Only include samples at this confidence or higher.","default":0.5,"title":"Min Confidence"},"description":"Only include samples at this confidence or higher."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"402":{"description":"Payment required. Pay $0.005 USDC on Base mainnet (asset 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913) to 0x6476D35895ACd991a798291CdC55bbCf39aE9DaB. Resend with the X-PAYMENT header containing the signed payment payload. See the `payment-required` response header for the full x402 v2 challenge.","content":{"application/json":{"schema":{"type":"object","description":"Empty body; payment challenge is in the `payment-required` header."}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/live":{"get":{"summary":"Signals from markets settling soon — sorted by time-to-settle, ascending.","operationId":"get_live_v1_live_get","parameters":[{"name":"within_minutes","in":"query","required":false,"schema":{"type":"integer","maximum":525600,"minimum":1,"description":"Time window in minutes. Default 240 (4h). Use 30 for ultra-fresh closing-soon feed.","default":240,"title":"Within Minutes"},"description":"Time window in minutes. Default 240 (4h). Use 30 for ultra-fresh closing-soon feed."},{"name":"min_confidence","in":"query","required":false,"schema":{"type":"number","maximum":0.99,"minimum":0.5,"description":"Default 0.85 (vs 0.88 on /v1/signals).","default":0.85,"title":"Min Confidence"},"description":"Default 0.85 (vs 0.88 on /v1/signals)."},{"name":"asset","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Asset"}},{"name":"platform","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Platform"}},{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"}},{"name":"min_liquidity_dollars","in":"query","required":false,"schema":{"type":"number","minimum":0.0,"default":0.0,"title":"Min Liquidity Dollars"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignalsResponse"}}}},"402":{"description":"Payment required. Pay $0.005 USDC on Base mainnet (asset 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913) to 0x6476D35895ACd991a798291CdC55bbCf39aE9DaB. Resend with the X-PAYMENT header containing the signed payment payload. See the `payment-required` response header for the full x402 v2 challenge.","content":{"application/json":{"schema":{"type":"object","description":"Empty body; payment challenge is in the `payment-required` header."}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"Signal":{"properties":{"market_id":{"type":"string","title":"Market Id"},"platform":{"type":"string","enum":["kalshi","polymarket"],"title":"Platform"},"question":{"type":"string","title":"Question"},"confidence":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Confidence"},"direction":{"type":"string","enum":["yes","no"],"title":"Direction"},"mid_price":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Mid Price"},"seconds_to_settle":{"type":"integer","title":"Seconds To Settle"},"asset":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Asset"},"category":{"type":"string","enum":["crypto","macro","politics","weather","sports","tech","unknown"],"title":"Category"},"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"liquidity_dollars":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Liquidity Dollars"},"volume_24h":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Volume 24H"}},"type":"object","required":["market_id","platform","question","confidence","direction","mid_price","seconds_to_settle","category","timestamp"],"title":"Signal"},"SignalsResponse":{"properties":{"count":{"type":"integer","title":"Count"},"poll_timestamp":{"type":"string","format":"date-time","title":"Poll Timestamp"},"signals":{"items":{"$ref":"#/components/schemas/Signal"},"type":"array","title":"Signals"}},"type":"object","required":["count","poll_timestamp","signals"],"title":"SignalsResponse"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}