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.
Official SDKs
Language Package Status Documentation TypeScript / JS ✅ Stable View Guide Python PyPI 🛠️ Coming Soon Manual Integration Java Maven 🛠️ Coming Soon Manual Integration Go GitHub 🛠️ Coming Soon Manual Integration
TypeScript SDK
The fastest way to integrate for Web, Mobile, and Backend (Node.js/Bun/Deno).
Requirements
Node.js 18+ , Deno, Bun, or any modern browser with fetch() support
No native dependencies — works in serverless environments (AWS Lambda, Vercel, Cloudflare Workers)
Features
25 typed methods covering every API endpoint
Zero dependencies — uses native fetch()
Full TypeScript support — intellisense, autocompletion, type safety
Auto-retry on 429/500 errors with exponential backoff
Dual-mode auth — works with RapidAPI or direct API keys
Works everywhere — Node.js 18+, Deno, Bun, browsers
Installation
npm install @fieldfunded/sdk
Initialization
RapidAPI (default)
Direct API
import { FieldFundedSDK } from '@fieldfunded/sdk' ;
const client = new FieldFundedSDK ({
apiKey: 'YOUR_RAPIDAPI_KEY' ,
});
import { FieldFundedSDK } from '@fieldfunded/sdk' ;
const client = new FieldFundedSDK ({
apiKey: 'YOUR_API_KEY' ,
baseUrl: 'https://api.fieldfunded.com/v1' ,
});
Configuration
const client = new FieldFundedSDK ({
apiKey: 'YOUR_KEY' , // Required
host: 'custom-host.com' , // RapidAPI host (optional)
baseUrl: 'https://...' , // Direct API URL (overrides host)
timeout: 20000 , // Request timeout in ms (default: 20000)
retries: 2 , // Retries on 429/500 (default: 1)
});
The default timeout is 20s to accommodate server-side index construction on high-volume endpoints (like /settlements). Most requests return in <200ms.
Usage Examples
List Sports & Leagues
const sports = await client . getSports ();
console . log ( sports . sports );
// [{ key: 'soccer', name: 'Soccer', active_events: 142, is_esport: false }, ...]
const leagues = await client . getLeagues ({ sport: 'soccer' });
console . log ( leagues . leagues );
// [{ slug: 'premier-league', name: 'Premier League', country: 'England', active_events: 10, live_events: 3 }, ...]
Get Events (with filters)
// All live soccer in England
const events = await client . getEvents ({
sport: 'soccer' ,
country: 'england' ,
status: 'live' ,
});
// Games starting in the next 2 hours
const upcoming = await client . getEvents ({
starts_within: '2h' ,
sport: 'basketball' ,
});
// Events on a specific date
const tomorrow = await client . getEvents ({
date: '2026-04-16' ,
league: 'premier-league' ,
});
// American odds format
const american = await client . getEvents ({
sport: 'soccer' ,
odds_format: 'american' ,
});
Event Detail
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 scores
console . log ( detail . sport_data ); // Serving indicators, power play, etc.
Live Scores (lightweight polling)
// Optimized endpoint — use for frequent polling (every 5-10s)
const scores = await client . getScores ({ sport: 'soccer' });
for ( const game of scores . scores ) {
console . log ( ` ${ game . home_team } ${ game . score . home } - ${ game . score . away } ${ game . away_team } ` );
}
Search by Team Name
const results = await client . search ( 'Barcelona' , { limit: 5 });
console . log ( results . events ); // All upcoming/live Barcelona games
Batch Events (max 20 IDs)
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)
Bet Check
const result = await client . checkBet ({
selections: [{
event_id: '123' ,
market: 'Match Winner' ,
outcome: 'Home' ,
odds: 1.85 ,
stake: 10 , // currency-agnostic — any numeric amount
market_id: 340168 , // primary — recommended for 100% accuracy
selection_id: 1824650 , // primary — recommended for 100% accuracy
}],
});
console . log ( result . results [ 0 ]. result ); // 'won' | 'lost' | 'refund' | 'pending'
console . log ( result . results [ 0 ]. payout ); // 18.50 (when won, = stake × odds)
Parlay / Accumulator Check
const parlay = await client . checkParlay ({
legs: [
{ event_id: '123' , market: 'Match Winner' , outcome: 'Home' , odds: 1.85 , market_id: 340168 , selection_id: 1824650 },
{ event_id: '456' , market: 'Over/Under 2.5' , outcome: 'Over' , odds: 1.92 },
],
stake: 10 ,
});
console . log ( parlay . payout . combined_odds );
console . log ( parlay . payout . payout );
Settlements & Results (Fully Automatic)
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 seconds
const 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' });
Outrights / Futures
// List tournaments with outright markets
const outrights = await client . getOutrights ({ sport_id: '124' });
// Get selections and odds (supports odds_format)
const detail = await client . getOutright ( '12345' , { odds_format: 'american' });
console . log ( detail . events [ 0 ]. markets [ 0 ]. selections [ 0 ]. odds );
Usage & Quota
const usage = await client . getUsage ();
console . log ( ` ${ usage . current . this_month } / ${ usage . limits . per_month } requests used` );
console . log ( ` ${ usage . current . month_remaining } remaining` );
// Per-endpoint breakdown
const endpoints = await client . getUsageEndpoints ();
console . log ( endpoints . endpoints );
// [{ path: '/events', count: 142 }, { path: '/live', count: 58 }, ...]
// Active warnings
const warnings = await client . getUsageWarnings ();
if ( warnings . warnings . length > 0 ) {
console . warn ( '[!]' , warnings . warnings [ 0 ]. message );
}
System Health (quota-free)
These endpoints do not count against your monthly quota.
const ping = await client . ping (); // { pong: true, timestamp: 1234567890 }
const health = await client . health (); // System health, data freshness
const status = await client . status (); // Live/prematch counts
Error Handling
The SDK provides typed error classes for clean error handling:
import {
FieldFundedSDK ,
RateLimitError ,
AuthenticationError ,
NotFoundError ,
BadRequestError ,
ServiceUnavailableError ,
} from '@fieldfunded/sdk' ;
try {
const events = await client . getEvents ();
} catch ( err ) {
if ( err instanceof RateLimitError ) {
console . log ( `Rate limited. Retry in ${ err . retryAfter } s` );
} else if ( err instanceof ServiceUnavailableError ) {
console . log ( `Service degraded ( ${ err . component } ). Retry in ${ err . retryAfter } s` );
} else if ( err instanceof AuthenticationError ) {
console . log ( 'Invalid API key' );
} else if ( err instanceof NotFoundError ) {
console . log ( 'Event not found' );
} else if ( err instanceof BadRequestError ) {
console . log ( `Invalid request: ${ err . message } ` );
}
}
All Methods
Method Endpoint Description ping()GET /v1/pingLatency check (quota-free) health()GET /v1/healthSystem health (quota-free) status()GET /v1/statusAPI status (quota-free) getUsage()GET /v1/usageQuota & consumption stats getUsageEndpoints()GET /v1/usage/endpointsPer-endpoint breakdown getUsageWarnings()GET /v1/usage/warningsActive quota warnings getSports()GET /v1/sportsList sports getLeagues(opts?)GET /v1/leaguesList leagues with slugs getMarkets(opts?)GET /v1/marketsList market types getEvents(opts?)GET /v1/eventsList events (all filters) getLive(opts?)GET /v1/liveLive events getFeatured(opts?)GET /v1/featuredFeatured games getScores(opts?)GET /v1/scoresLive scores search(q, opts?)GET /v1/searchSearch by team/league getEvent(id, opts?)GET /v1/events/{id}Event detail getEventOdds(id, opts?)GET /v1/events/{id}/oddsEvent odds getEventResult(id)GET /v1/events/{id}/resultScore result getEventsBatch(ids, opts?)POST /v1/events/batchMultiple events (max 20) checkBet(req)POST /v1/bets/checkSingle bet check checkParlay(req)POST /v1/bets/check-parlayParlay check getSettlements(opts?)GET /v1/settlementsSettlement feed getOutrightSettlements(opts?)GET /v1/settlements/outrightsOutright settlements getOutrights(opts?)GET /v1/outrightsOutright markets getOutrightSports()GET /v1/outrights/sportsOutright sports getOutright(id, opts?)GET /v1/outrights/{id}Specific outright with odds
Manual Integration (Universal)
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.
Python (using requests)
import requests
def get_live_scores ( api_key ):
url = "https://api.fieldfunded.com/v1/live"
headers = { "X-API-Key" : api_key }
response = requests.get(url, headers = headers)
return response.json()
# Settlement polling
def poll_settlements ( api_key , limit = 20 ):
url = f "https://api.fieldfunded.com/v1/settlements?limit= { limit } "
headers = { "X-API-Key" : api_key }
response = requests.get(url, headers = headers)
data = response.json()
for s in data.get( "settlements" , []):
print ( f " { s[ 'event_id' ] } : { s[ 'settlement_status' ] } — { s[ 'resolved_markets_count' ] } / { s.get( 'total_markets_count' , '?' ) } markets ( { s.get( 'pending_markets_count' , '?' ) } pending)" )
return data
Go (using net/http)
package main
import (
" fmt "
" net/http "
" io/ioutil "
)
func main () {
apiKey := "YOUR_API_KEY"
url := "https://api.fieldfunded.com/v1/live"
req , _ := http . NewRequest ( "GET" , url , nil )
req . Header . Set ( "X-API-Key" , apiKey )
client := & http . Client {}
resp , _ := client . Do ( req )
defer resp . Body . Close ()
body , _ := ioutil . ReadAll ( resp . Body )
fmt . Println ( string ( body ))
}
Technical Support
Need help with a specific language or interested in early access to our Python/Java SDKs? Reach out at support@fieldfunded.com .