Official TypeScript SDK and multi-language integration patterns for FieldFunded API
FieldFunded is built on standard REST/JSON architecture, making it compatible with every modern programming language.
No SDK account required. You only need your API Key (X-API-Key or X-RapidAPI-Key) to start building. The SDKs and code examples below are tools to help you use your key more efficiently.
// All live soccer in Englandconst events = await client.getEvents({ sport: 'soccer', country: 'england', status: 'live',});// Games starting in the next 2 hoursconst upcoming = await client.getEvents({ starts_within: '2h', sport: 'basketball',});// Events on a specific dateconst tomorrow = await client.getEvents({ date: '2026-04-16', league: 'premier-league',});// American odds formatconst american = await client.getEvents({ sport: 'soccer', odds_format: 'american',});
const detail = await client.getEvent('12345678');console.log(detail.markets); // Full markets array (1,000+ on major events)console.log(detail.scoreboard); // Period/set/map scoresconsole.log(detail.sport_data); // Serving indicators, power play, etc.
const batch = await client.getEventsBatch(['123', '456', '789']);console.log(batch.events); // Record<id, EventDetail>console.log(batch.found); // Number of events found (e.g. 2)console.log(batch.requested); // Number of IDs you sent (e.g. 3)
Settlement is fully automatic. Markets resolve without developer intervention as soon as a game ends. Poll getSettlements() regularly after the game ends to capture all market resolutions as they arrive gradually.
// Check settlements every 60 secondsconst settlements = await client.getSettlements({ limit: 10 });for (const s of settlements.settlements) { console.log(`${s.event_id}: ${s.settlement_status} — ${s.resolved_markets_count}/${s.total_markets_count ?? '?'} markets (${s.pending_markets_count ?? '?'} pending)`);}// Get official result for a specific event (score-only)const result = await client.getEventResult('12345678');console.log(`Status: ${result.status}`); // 'ended', 'walkover', 'retired', etc.if (result.score) { console.log(`Final Score: ${result.score.home}-${result.score.away}`);}// For market-level resolutions, use getSettlements()const eventSettlements = await client.getSettlements({ event_id: '12345678' });// Outright/futures settlements (also automatic)const outrightSettlements = await client.getOutrightSettlements({ sport: 'soccer' });
If you are using a language without an official SDK yet, use standard HTTP libraries. Our API is standard REST/JSON — any language with HTTP support works.