Diamond Projections API
Same data that powers the Diamond Projections web app, available to your agents and applications over REST and MCP. OAuth 2.1 with PKCE, API keys, and Supabase JWTs all work as bearer tokens.
REST v1
Base URL: https://diamonddfs.com/api/v1
GET /healthGET /slatesGET /slates/{date}/playersPOST /optimizePOST /lineup/swapGET /players/{id}/projectionGET /weights/presetsGET /opponent-pappi
Lineup strategies
POST /optimize and POST /lineup/swap accept two optional construction flags that compose with locks and excludes:
stackStrategy: true— builds a primary 4-5 hitter stack plus a 2-3 hitter mini-stack from the highest implied-total teams. UsestackTeams: { primary, mini }to lock specific team abbreviations (e.g."LAD"). Tune sizes withstackPrimarySize(4-5) andstackMiniSize(2-3).cashGame: true— switches scoring to a floor projection (consistency) instead of mean. Best for 50/50s, double-ups, and head-to-heads.
Both flags can be combined. Responses include scoringMode (mean or floor) and, when stacking succeeded, stackInfo with the chosen primary/mini teams and hitter counts.
MCP
Endpoint: https://diamonddfs.com/api/mcp (Streamable HTTP).
Tools: get_slates, get_player_pool, get_player_projection, build_optimal_lineup, build_stack_lineup, swap_player, apply_weight_preset, customize_weights, list_weight_presets, explain_projection, explain_lineup.
Auth
- Personal API keys —
Authorization: Bearer dp_live_... - OAuth 2.1 —
POST /api/oauth/register(RFC 7591), authorize at/api/oauth/authorize, exchange at/api/oauth/token. Metadata at /.well-known/oauth-authorization-server.