API Overview

High-level overview of ScorePlay's API endpoints

Last updated: October 20, 2018

ScorePlay provides REST API endpoints for accessing platform data. This is a high-level overview - full API reference coming soon.

Base URL

https://scoreplay.xyz/api

Authentication

Most user-specific endpoints expect a JWT in cookies after you sign in (e.g. Google or wallet and sign message, depending on path). Treat unauthenticated responses as normal for public reads where applicable.

Main Endpoints

Events

  • GET /api/available-events - List available matches/events
  • GET /api/events/[id] - Get event details
  • GET /api/events/[id]/odds - Get odds data for an event

Predictions

  • GET /api/user/predictions - Get user's prediction history
  • POST /api/pred2earn/bet-placed - Submit V1 bet placement
  • POST /api/pred2earn/bet-placed-v2 - Submit V2 bet placement
  • POST /api/pred2earn/claim-payout - Claim winnings from a bet

Leaderboard

  • GET /api/leaderboard - Get leaderboard rankings
  • GET /api/leaderboard/user-row - Get specific user's rank
  • GET /api/leaderboard/top-points - Get top players by points

Score Champions (competition)

  • GET /api/competition/meta - Week rail, countdown, champions enabled flags
  • GET /api/competition/leaderboard?week=&type=qualification|champions&offset= - Competition ladders
  • GET /api/competition/me - Authenticated user’s Score Qualification / Score Champions status
  • GET /api/competition/prize-pool-estimate?week= (optional week) — estimated Score Champions USDC prize from on-chain house fees (same number as the leaderboard card’s week Prize): for competition period W (default: current period index), fees are summed over period W−1 ([start, min(end, now)) in UTC). W = 0 returns zero protocol fees (no prior period). Response includes estimatedUsdc, selectedWeek, fundingWeekIndex, feeWindowStart / feeWindowEnd, and sources (protocolFeesWeek, protocolIncentiveUsdc, entries placeholder). In-app Prize sources on the card reflects this breakdown.
  • POST /api/competition/finalize?week=N - Internal finalize (requires x-competition-finalize-secret)

See Score Champions.

User

  • GET /api/user/profile-stats - Get user statistics
  • GET /api/referrals - Get referral stats
  • POST /api/referrals - Redeem referral rewards

Daily Rewards

  • GET /api/daily-raffle - Check daily raffle eligibility
  • GET /api/reclaim/info - Get daily claim information
  • POST /api/reclaim - Claim daily free credits

Rate Limiting

API endpoints are rate-limited. Check response headers for rate limit information.

Response Format

Most endpoints return JSON:

{
  "success": true,
  "data": { ... }
}

Error responses:

{
  "error": "Error message",
  "status": 400
}

Full Documentation

Full API reference documentation with detailed request/response schemas coming soon.

For integration questions, contact: [email protected]