Wave 2A: offseason data feeds — news wire + quota-disciplined futures
FREE ESPN news wire + championship-winner futures for the never-dark
offseason hub. Both graceful/empty, never fabricate a market value.
- newsService (mirrors injuryService): per-sport ESPN /news FEEDS, pure
parseNews → { sport, items:[{id,headline,description,published,type,
athlete?{name,key},team?,href}] }; athlete/team from categories[] only
(absent when not present). Cache 15m, injectable, offline-tested.
- oddsNormalizer.normalizeOutrights: NEW branch — outrights outcomes are
{name,price} with no point, so normalizeProps drops them; keeps them with
best-price-across-allowed-books per selection. + americanToDecimal.
- oddsService.FUTURES_KEYS: separate map (mlb/nba/wnba championship winner),
OUT of the daily SPORT_KEYS/snapshot budget.
- futuresService: getFutures(sport,deps) → { sport, updated_at, markets:
[{key,title,selections:[{name,price,prevPrice?,move?}]}] }. One outrights
call per 12h TTL (quota-disciplined), FUTURES_ENABLED gate. Price-move
(shortening/drifting/flat) mirrors computeLineDeltas SHAPE on odds not
line; prev prices persisted inside the futures:{sport} value (no new key).
linkNewsToMoves pure causal-tie helper.
- Routes /api/news/:sport + /api/futures/:sport (registered) + Next proxies.
- Tests: newsService, futuresService, oddsNormalizerOutrights (fail→pass,
no network). Full suite green.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -184,6 +184,10 @@ const streaksRoutes = require('./routes/streaks');
|
||||
app.use('/api/streaks', streaksRoutes);
|
||||
const hotListRoutes = require('./routes/hotlist');
|
||||
app.use('/api/hotlist', hotListRoutes);
|
||||
// Wave 2A — offseason/never-dark hub feeds. FREE ESPN news wire + quota-
|
||||
// disciplined championship futures (both graceful/empty; never error).
|
||||
app.use('/api/news', require('./routes/news'));
|
||||
app.use('/api/futures', require('./routes/futures'));
|
||||
// Session 28 — parlay builder, line-movement views, book comparison.
|
||||
// All three are zero-credit: parlay math is pure, lines read a Redis
|
||||
// snapshot history, books read the cached odds props.
|
||||
|
||||
Reference in New Issue
Block a user