{"openapi":"3.1.0","info":{"title":"LineAgent API","version":"1.0.0","description":"+EV verification engine. Information and tools only: no wagers, no account access. 21+. Same rules as All Star / LocalEV: EV >= 2% after fees (worst of 4 devig methods), Kalshi fee ceil(0.07*C*P*(1-P)), spreads whole-number gaps, totals/props half-point OK, one pick per game per category. Odds shown as American + raw implied %, e.g. -110 (52.4%)."},"servers":[{"url":"https://api.lineagent.app","description":"prod (not deployed)"},{"url":"http://127.0.0.1:8787","description":"wrangler dev"}],"security":[{"bearer":[]}],"paths":{"/v1/health":{"get":{"security":[],"summary":"Liveness","responses":{"200":{"description":"OK"}}}},"/v1/status":{"get":{"security":[],"summary":"Feed freshness + config status","responses":{"200":{"description":"OK"}}}},"/v1/check":{"post":{"summary":"Verify one play (+EV or skip)","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,128}$"},"description":"Replays the stored response for 24h (no quota charge); different body = 409"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckRequest"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Verdict"}}}},"4XX":{"description":"Client error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"5XX":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/plays":{"get":{"summary":"Verified +EV plays from the current snapshot (LineAgent data or BYOK)","parameters":[{"name":"sports","in":"query","schema":{"type":"string"}},{"name":"state","in":"query","schema":{"type":"string"}},{"name":"min_ev","in":"query","schema":{"type":"number"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Plays"}}}},"4XX":{"description":"Client error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"5XX":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/slip":{"post":{"summary":"Novig / ProphetX deep links (user confirms on the exchange)","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,128}$"},"description":"Replays the stored response for 24h (no quota charge); different body = 409"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlipRequest"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Slip"}}}},"4XX":{"description":"Client error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"5XX":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/boost":{"post":{"summary":"EV of a boosted price (straight or parlay)","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,128}$"},"description":"Replays the stored response for 24h (no quota charge); different body = 409"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BoostRequest"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BoostVerdict"}}}},"4XX":{"description":"Client error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"5XX":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/scorecard":{"get":{"summary":"Graded record + CLV (stub in v1, stable schema)","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Scorecard"}}}},"4XX":{"description":"Client error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"5XX":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/usage":{"get":{"summary":"Quota usage for this key","responses":{"200":{"description":"OK"}}}},"/v1/byok":{"put":{"summary":"Store your own odds-data key (encrypted at rest, never returned)","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ByokRequest"}}}},"responses":{"200":{"description":"OK"}}},"delete":{"summary":"Remove your odds-data key","responses":{"200":{"description":"OK"}}}}},"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"la_live_... / la_test_..."}},"schemas":{"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message","request_id"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}}}}},"CheckRequest":{"type":"object","required":["sport","market","side","book","price","sharp"],"properties":{"sport":{"type":"string","examples":["NFL"]},"market":{"enum":["h2h","spreads","totals","player_prop"]},"side":{"type":"string"},"book":{"type":"string","description":"novig|prophetx|kalshi|draftkings|fanduel|betmgm|caesars|fanatics|thescore (ESPN Bet = theScore Bet)"},"price":{"type":"number","description":"American odds, <= -100 or >= +100"},"point":{"type":["number","null"]},"live":{"type":"boolean"},"min_ev":{"type":"number","minimum":0,"maximum":50,"description":"Can only raise the 2% floor"},"sharp":{"type":"object","required":["prices","side_index"],"properties":{"prices":{"type":"array","items":{"type":"number","description":"American odds, <= -100 or >= +100"},"minItems":2,"maxItems":3},"side_index":{"type":"integer"},"point":{"type":["number","null"]}}},"player":{"type":"string"},"stat":{"type":"string","examples":["player_pass_yds"]},"player_status":{"enum":["active","probable","questionable","doubtful","out","unknown"]},"line_age_s":{"type":"number"}}},"Verdict":{"type":"object","required":["verdict","reasons","ev_pct","ev_pct_by_method","fair_prob","fair_american","fair_display","offered_display","price_after_fee","price_after_fee_display","line_match","min_ev","explanation","engine_version","request_id"],"properties":{"verdict":{"enum":["plus_ev","skip"]},"reasons":{"type":"array","items":{"type":"string"}},"ev_pct":{"type":"number"},"ev_pct_by_method":{"type":"object","properties":{"multiplicative":{"type":"number"},"additive":{"type":"number"},"power":{"type":"number"},"shin":{"type":"number"}},"required":["multiplicative","additive","power","shin"]},"fair_prob":{"type":"number"},"fair_american":{"type":"number"},"fair_display":{"type":"string","examples":["-110 (52.4%)"]},"offered_display":{"type":"string"},"price_after_fee":{"type":"number"},"price_after_fee_display":{"type":"string"},"line_match":{"type":["string","null"]},"min_ev":{"type":"number"},"explanation":{"type":"string"},"engine_version":{"type":"string"},"request_id":{"type":"string"}}},"BoostRequest":{"type":"object","required":["boosted_price","legs"],"properties":{"boosted_price":{"type":"number","description":"American odds, <= -100 or >= +100"},"min_ev":{"type":"number"},"legs":{"type":"array","minItems":1,"maxItems":12,"items":{"type":"object","required":["sharp_prices","side_index"],"properties":{"sharp_prices":{"type":"array","items":{"type":"number","description":"American odds, <= -100 or >= +100"}},"side_index":{"type":"integer"},"label":{"type":"string"}}}}}},"BoostVerdict":{"type":"object","required":["verdict","ev_pct","fair_prob","fair_display","offered_display","explanation","legs","request_id"],"properties":{"verdict":{"enum":["plus_ev","skip"]},"ev_pct":{"type":"number"},"fair_prob":{"type":"number"},"fair_display":{"type":"string"},"offered_display":{"type":"string"},"explanation":{"type":"string"},"legs":{"type":"integer"},"note":{"type":"string"},"request_id":{"type":"string"}}},"SlipRequest":{"type":"object","required":["book","outcome_id"],"properties":{"book":{"enum":["novig","prophetx"]},"outcome_id":{"type":"string"},"amount":{"type":"number","description":"Whole dollars (Novig prefill only)"}}},"Slip":{"type":"object","required":["book","links","request_id"],"properties":{"book":{"type":"string"},"links":{"type":"object"},"note":{"type":"string"},"request_id":{"type":"string"}}},"Play":{"type":"object","required":["event_id","sport","game","start_utc","market","side","book","price","price_display","price_after_fee","fair_prob","fair_display","ev_pct","ev_pct_by_method","explanation"],"properties":{"event_id":{"type":"string"},"sport":{"type":"string"},"game":{"type":"string"},"start_utc":{"type":"string"},"market":{"enum":["h2h","spreads","totals","player_prop"]},"stat":{"type":"string"},"player":{"type":"string"},"side":{"type":"string"},"point":{"type":["number","null"]},"fair_point":{"type":["number","null"]},"line_match":{"type":["string","null"]},"point_gap":{"type":["number","null"]},"book":{"type":"string"},"book_label":{"type":"string"},"price":{"type":"number"},"price_display":{"type":"string"},"price_after_fee":{"type":"number"},"price_after_fee_display":{"type":"string"},"fair_prob":{"type":"number"},"fair_display":{"type":"string"},"ev_pct":{"type":"number"},"ev_pct_by_method":{"type":"object","properties":{"multiplicative":{"type":"number"},"additive":{"type":"number"},"power":{"type":"number"},"shin":{"type":"number"}},"required":["multiplicative","additive","power","shin"]},"outcome_sid":{"type":"string"},"book_last_update":{"type":"string"},"explanation":{"type":"string"}}},"Plays":{"type":"object","required":["source","checked","age_s","count","plays","rules","request_id"],"properties":{"source":{"enum":["lineagent","byok"]},"checked":{"type":"string"},"age_s":{"type":"integer"},"count":{"type":"integer"},"plays":{"type":"array","items":{"$ref":"#/components/schemas/Play"}},"rules":{"type":"string"},"request_id":{"type":"string"}}},"Scorecard":{"type":"object","required":["status","schema_version","key_id","period","summary","picks","badge_url","request_id"],"properties":{"status":{"enum":["stub","live"]},"schema_version":{"const":1},"key_id":{"type":"string"},"period":{"type":"string"},"summary":{"type":"object","required":["picks","graded","wins","losses","pushes","units","roi_pct","avg_ev_pct","avg_clv_pct","beat_close_pct"],"properties":{"picks":{"type":"integer"},"graded":{"type":"integer"},"wins":{"type":"integer"},"losses":{"type":"integer"},"pushes":{"type":"integer"},"units":{"type":"number"},"roi_pct":{"type":"number"},"avg_ev_pct":{"type":"number"},"avg_clv_pct":{"type":["number","null"]},"beat_close_pct":{"type":["number","null"]}}},"picks":{"type":"array","items":{"type":"object","properties":{"pick_id":{"type":"string"},"posted_at":{"type":"string"},"play":{"$ref":"#/components/schemas/Play"},"closing_price":{"type":["number","null"]},"clv_pct":{"type":["number","null"]},"result":{"enum":["win","loss","push","void","pending"]}}}},"badge_url":{"type":["string","null"]},"note":{"type":"string"},"request_id":{"type":"string"}}},"ByokRequest":{"type":"object","required":["api_key"],"properties":{"provider":{"enum":["the-odds-api"]},"api_key":{"type":"string","writeOnly":true}}}},"headers":{"x-quota-remaining":{"schema":{"type":"integer"}},"x-ratelimit-remaining":{"schema":{"type":"integer"}},"x-byok-credits-remaining":{"schema":{"type":"integer"}},"x-request-id":{"schema":{"type":"string"}}}}}