case study · cartolaoddsapi

Building an odds-based draft engine for fantasy football.

// java · spring-boot · docker · 2024
~12klines of java
87%test coverage
2msp50 latency
1weekend, mostly

The problem

Every Brazilian dev wants to win Cartola FC. Most pick by gut. I wanted to pick by math — combining public match odds, player form, and team context into a single ranked draft.

The approach

A Spring Boot service with a scheduler that pulls public odds nightly, normalizes them per position, and exposes a clean REST API. Heuristics are pluggable — strategies live behind an interface so I can A/B them across rounds.

What I learned

The hardest part wasn't the math. It was the data hygiene — players change clubs mid-season, odds providers shift formats, the API breaks every other Monday. Idempotent ingestion plus a careful retry strategy saved me.