Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.fieldfunded.com/llms.txt

Use this file to discover all available pages before exploring further.

Build a Soccer Odds App with Live Scores and Settlement

Get live soccer odds for Premier League, La Liga, Serie A, Bundesliga, and 100+ leagues from a single API call. This guide builds a complete soccer odds dashboard with live scores, match tracking, and automatic bet resolution.

Soccer Coverage

FieldFunded covers 100+ soccer leagues across 50+ countries:
RegionExample LeaguesCoverage
EnglandPremier League, Championship, League One, League TwoFull
SpainLa Liga, Segunda DivisionFull
ItalySerie A, Serie BFull
GermanyBundesliga, 2. BundesligaFull
FranceLigue 1, Ligue 2Full
EuropeChampions League, Europa League, Conference LeagueFull
South AmericaBrasileirao, Argentine LigaFull
InternationalWorld Cup, Euros, Copa America, Nations LeagueFull

What You’ll Use

SDK MethodEndpointPurpose
getEvents()GET /v1/eventsList soccer matches by league
getEventOdds()GET /v1/events/{id}/oddsGet all markets (1x2, BTTS, O/U, Asian HC)
getScores()GET /v1/scoresLive scores with minute tracking
getLive()GET /v1/liveCurrently in-play matches
checkBet()POST /v1/bets/checkAuto-settle soccer bets

Step 1: Fetch Today’s Matches

import { FieldFundedSDK } from '@fieldfunded/sdk';

const ff = new FieldFundedSDK({
  apiKey: process.env.FIELDFUNDED_API_KEY!,
  baseUrl: 'https://api.fieldfunded.com/v1',
});

// Get today's Premier League matches
const premierLeague = await ff.getEvents({
  sport: 'soccer',
  league: 'england-premier-league',
});

for (const match of premierLeague.events || []) {
  console.log(`${match.home_team} vs ${match.away_team}`);
  console.log(`  Kickoff: ${new Date(match.commence_time).toLocaleString()}`);
}

Step 2: Get Market Odds

Soccer events include deep market coverage — 1x2, Double Chance, Both Teams to Score, Over/Under, Asian Handicap, Correct Score, and more:
const odds = await ff.getEventOdds(eventId);

// Key soccer markets
const markets = {
  matchResult: odds.markets?.find((m: any) => m.name === 'Winner'),
  btts: odds.markets?.find((m: any) => m.name === 'Both Teams to Score'),
  overUnder: odds.markets?.find((m: any) => m.name === 'Over/Under 2.5'),
  doubleChance: odds.markets?.find((m: any) => m.name === 'Double Chance'),
};

if (markets.matchResult) {
  console.log('1x2:');
  for (const sel of markets.matchResult.selections) {
    console.log(`  ${sel.name}: ${sel.odds}`);
  }
}

if (markets.btts) {
  console.log('Both Teams to Score:');
  for (const sel of markets.btts.selections) {
    console.log(`  ${sel.name}: ${sel.odds}`);
  }
}

console.log(`Total markets available: ${odds.markets?.length}`);

Step 3: Track Live Scores

Poll live scores during matches to update your UI in real time:
async function pollLiveScores() {
  const scores = await ff.getScores({ sport: 'soccer' });

  for (const match of scores.scores || []) {
    const minute = match.score?.clock || '';
    console.log(
      `${match.home_team} ${match.score.home} - ${match.score.away} ${match.away_team} (${minute})`
    );

    // Half-time and period scores
    if (match.score.period_scores) {
      for (const period of match.score.period_scores) {
        console.log(`  ${period.period}: ${period.home} - ${period.away}`);
      }
    }
  }
}

// Poll every 30 seconds during live matches
setInterval(pollLiveScores, 30_000);

Step 4: Settle Bets Automatically

When a match ends, use the settlement API to resolve bets instantly:
const result = await ff.checkBet({
  event_id: eventId,
  market: 'Both Teams to Score',
  selection: 'Yes',
  stake: 20,
  odds: 1.90,
});

console.log(`Result: ${result.status}`);   // "won" | "lost" | "refund"
console.log(`Payout: $${result.payout}`);  // 38.00 if won

Rate Limit Math

ScenarioRequests/dayMonthly totalPlan needed
Check odds for 20 matches daily20600Free
Poll 5 live matches every 60s (2hr avg)60018,000Starter ($29)
Full matchday: 10 live + odds + scores2,00060,000Starter ($29)
Production: 50+ live + settlement8,000240,000Starter ($29)
The free tier handles casual use. For a production soccer odds app covering a full weekend of matches, the Starter plan at $29/month is sufficient.

Get Your Free API Key

Start building in 5 minutes — 100+ soccer leagues included

See Pricing

All plans compared side by side