API v3.8 — Latest Stable Release v3.8.2

Sports Betting API
Documentation Hub

Complete reference for Tech Magnetics REST and WebSocket APIs. Live scores, odds, player statistics, fixtures, and historical data across 30+ sports.

  • Developer-first documentation
  • REST & WebSocket APIs
  • Fast integration
  • Real-time sports data
  • Enterprise-grade reliability
REST & WebSocket
6 Official SDKs
OpenAPI 3.1 Schema
Postman Collection
terminal — tech-magnetics-api
$ curl -X GET \
  "https://api.techmagnetics.io/v3/livescores" \
  -H "X-API-Key: YOUR_API_KEY" \
  -G -d "sport=football&status=live"
HTTP/2 200 OK
// Response (application/json)
{
  "meta": { "total": 48, "latency_ms": 121 },
  "data": [
    {
      "fixture_id": "EPL-2026-38847",
      "home": "Arsenal",
      "away": "Chelsea",
      "score": { "home": 2, "away": 1 },
      "minute": 67,
      "status": "live"
    } ... 47 more fixtures
  ]
}
340+API Endpoints
34+Sports Covered
600+Competitions & Leagues
<200msAvg. Response Time
6Official SDKs
Quick Start

First API Call in Under
5 Minutes

Pick your language, copy the snippet, and you're pulling live sports data before your coffee gets cold. Full SDK docs follow below.

JS Livescore Feed — Node.js / Browser
// npm install @techmagnetics/sdk
import { TechMagnetics } from '@techmagnetics/sdk';

const tm = new TechMagnetics({
  apiKey: 'YOUR_API_KEY'
});

// Fetch all live football matches
const scores = await tm.livescores.list({
  sport: 'football',
  status: 'live'
});

console.log(scores.data); // Array of live fixtures

// Subscribe to real-time events via WebSocket
tm.ws.subscribe('livescores:football', (event) => {
  console.log(`Goal! ${event.team} scored`);
});
WS WebSocket — Real-Time Event Stream
// Connect to live event push stream
const ws = new WebSocket(
  'wss://live.techmagnetics.io/v3/stream'
);

ws.onopen = () => {
  ws.send(JSON.stringify({
    type: 'auth',
    api_key: 'YOUR_API_KEY'
  }));
  ws.send(JSON.stringify({
    type: 'subscribe',
    channels: ['livescores:cricket',
               'odds:tennis']
  }));
};

ws.onmessage = ({ data }) => {
  const event = JSON.parse(data);
  // { type:'wicket', player:'Kohli'... }
};
PY Livescore Feed — Python
# pip install techmagnetics
from techmagnetics import TechMagnetics

tm = TechMagnetics(api_key="YOUR_API_KEY")

# Fetch live cricket scores
scores = tm.livescores.list(
    sport="cricket",
    status="live"
)

for match in scores["data"]:
    print(
        match["home"], "vs",
        match["away"], "—",
        match["score"]
    )
PHP Prematch Odds — PHP

use TechMagnetics\Client;

$tm = new Client([
    'api_key' => 'YOUR_API_KEY'
]);

// Get prematch odds for football
$odds = $tm->prematch->odds([
    'sport'    => 'football',
    'market'   => '1x2',
    'date_from'=> '2026-06-28'
]);

foreach ($odds['data'] as $fixture) {
    echo $fixture['home'] .' vs ' .
         $fixture['away'] . PHP_EOL;
}
cURL Player Stats — cURL
# Get player stats for a specific fixture
curl -X GET \
  "https://api.techmagnetics.io/v3/stats \
   /players?fixture_id=EPL-2026-38847 \
   &include=shots,passes,tackles" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Accept: application/json"

# Example Response:
# {
#   "data": [{
#     "player_id": "p-10834",
#     "name": "Bukayo Saka",
#     "shots": 4, "on_target": 2,
#     "key_passes": 3, "rating": 8.4
#   }]
# }
Developer-First

Everything a Developer
Needs. Nothing They Don't.

Clean REST endpoints, predictable response shapes, comprehensive error codes, and SDKs in six languages. Our documentation is built by engineers who have integrated sports data APIs and know exactly where the friction points are.

OpenAPI 3.1 schema Interactive Postman collection Rate limit dashboard Webhook event log
API Reference

340+ Endpoints Across
Every Sports Data Domain

Organised by resource type. Every endpoint includes request parameters, response schema, code examples, and live sandbox testing.

Livescores & Live Events

Real-time match scores, event timelines, and in-play statistics

18 endpoints
  • GET /v3/livescores All live matches across selected sports & competitions
  • GET /v3/livescores/{fixture_id} Detailed live data for a single fixture
  • WS /v3/stream/livescores WebSocket — real-time push stream for goals, cards, wickets, substitutions
  • GET /v3/livescores/{fixture_id}/timeline Full in-match event timeline with timestamps New
  • GET /v3/livescores/{fixture_id}/lineups Starting XIs, formation, and live substitutions
  • GET /v3/odds/prematch All available prematch markets for upcoming fixtures
  • GET /v3/odds/prematch/{fixture_id} Full odds card for a specific fixture including all markets
  • GET /v3/odds/prematch/{fixture_id}/movement Odds movement history from opening line to current
  • GET /v3/odds/markets List of all supported market types per sport
  • GET /v3/odds/inplay All live odds across active matches right now
  • WS /v3/stream/odds WebSocket push — odds updates as they happen (<250ms)
  • GET /v3/odds/inplay/{fixture_id} All in-play markets for a specific active fixture
  • GET /v3/odds/inplay/{fixture_id}/suspended Currently suspended markets with reason codes New
  • GET /v3/stats/players/{player_id} Full player profile with career and season statistics
  • GET /v3/stats/teams/{team_id} Team statistics, form, and season performance breakdown
  • GET /v3/stats/h2h/{team_a}/{team_b} Head-to-head history, results, and goals data
  • GET /v3/stats/fixture/{fixture_id} Post-match player ratings, xG, and full match stats
  • GET /v3/fixtures Upcoming fixtures with filters for sport, league, date range
  • GET /v3/standings/{league_id} Current league standings with points, GD, form
  • GET /v3/fixtures/{fixture_id} Fixture detail — venue, referee, weather, broadcast info
  • GET /v3/results Historical match results with filters by sport, league, date
  • GET /v3/results/{fixture_id} Full result detail including scorers, bookings, and stats
  • GET /v3/results/export Bulk CSV/JSON export for model training datasets New
  • POST /v3/webhooks Register a new webhook endpoint with event filter
  • GET /v3/webhooks List all active webhook subscriptions on your account
  • GET /v3/webhooks/{id}/deliveries Delivery log with status codes and retry history
API Sports Coverage

One API Key. Every Sport.
Uniform Data Structure.

Whether you're building for football or Formula 1, the same predictable JSON response structure applies — reducing integration effort across every sport you add.

Infrastructure

99.98% Uptime SLA.
Globally Distributed.

Our API infrastructure runs across multiple regions with automatic failover, CDN-cached static endpoints, and dedicated WebSocket nodes for live streaming. Your integration stays online even on World Cup final day.

Auto-scaling architecture Multi-region failover Edge-cached responses Rate limit dashboard
Response Reference

Predictable Schemas.
Consistent JSON. Every Time.

Every endpoint returns the same meta envelope. Only the data field changes shape depending on the resource.

GET /v3/livescores/{fixture_id} — 200 OK
{ "meta": { "request_id": "req_9f3a1b", "latency_ms": 98, "version": "3.8.2", "rate_limit_remaining": 4821 }, "data": { "fixture_id": "EPL-2026-38847", "sport": "football", "competition": "Premier League", "home_team": "Arsenal", "away_team": "Chelsea", "score": { "home": 2, "away": 1, "ht": { "home": 1, "away": 0 } }, "minute": 67, "status": "live", "events": [ { "type": "goal", "minute": 34, "player": "Saka", "team": "Arsenal" } ... more events ] } }
Query Parameters — GET /v3/livescores
sport string Filter by sport slug: football, cricket, tennis required
status string One of: live, upcoming, finished
league_id integer Filter to a specific league or competition by ID
date string ISO 8601 date: 2026-06-28. Defaults to today.
include string Comma-separated expansions: lineups,events,odds
page integer Page number for paginated results (default: 1)
per_page integer Results per page. Max 100, default 20.
Error Response Example
{ "error": { "code": "RATE_LIMIT_EXCEEDED", "status": 429, "message": "Limit: 5000 req/min", "retry_after": 12 } }
Official SDKs

Six Languages. Zero
Boilerplate.

Our officially maintained SDKs handle authentication, retries, rate limiting, WebSocket reconnection, and response parsing so your team can focus on building features.

JavaScript / TypeScript

Works in Node.js, browser, React, Vue, and Next.js. Full TypeScript types included.

Stable v2.4
npm install @techmagnetics/sdk
View docs & changelog
🐍
Python

Supports sync and async usage. Compatible with Django, Flask, FastAPI and data science workflows.

Stable v2.2
pip install techmagnetics
View docs & changelog
🐘
PHP

Composer-compatible. Integrates cleanly with Laravel, Symfony, and WordPress environments.

Stable v1.9
composer require techmagnetics/sdk
View docs & changelog
Java / Kotlin

Maven and Gradle compatible. Ideal for Android apps and enterprise backend systems.

Stable v1.7
implementation 'io.techmagnetics:sdk:1.7'
View docs & changelog
🦀
Go

Lightweight, performant Go module for high-throughput data pipelines and microservices.

Beta v0.9
go get github.com/techmagnetics/go-sdk
View docs & changelog
💎
Ruby

RubyGem for Rails and Sinatra applications. Clean DSL for querying odds and scores.

Beta v0.8
gem install techmagnetics
View docs & changelog
All SDKs are open-source on GitHub
Postman Collection available
OpenAPI 3.1 schema download
Insomnia workspace export
Developer Support

From First Request
to Production. Together.

Our developer relations team answers questions, reviews integration code, and runs monthly office hours for teams building on the API. No forums, no ticket queues — real engineers helping you ship.

Discord community Monthly office hours Integration code review Sample app library
Latest Changelog

What's New in
the API

We ship API improvements every two weeks. All changes are backwards-compatible within a major version.

2026-06-20
NewBulk Historical Export Endpoint

GET /v3/results/export now supports CSV and JSON bulk download with date-range filters. Max 100,000 rows per request. Ideal for model training datasets.

2026-06-20
NewLive Event Timeline Endpoint

GET /v3/livescores/{id}/timeline returns a full chronological match event log with millisecond timestamps for all in-play incident types.

2026-06-08
ImprovedWebSocket Reconnection Logic

All WebSocket stream channels now implement exponential backoff with jitter on disconnect, reducing duplicate message delivery during reconnect windows.

2026-05-25
ImprovedOdds Response Latency

In-play odds REST polling latency reduced from avg 310ms to 98ms following infrastructure migration to regional edge nodes in APAC and EMEA.

2026-05-12
FixCricket Over Count Off-By-One

Fixed an edge-case where over count incremented one delivery early on wide balls that ended an over, affecting the current_over field on livescores.

FAQs

Common Questions from
Developers Integrating Sports APIs.

A Sports Betting API provides programmatic access to live scores, odds, player statistics, and match data. It enables developers to integrate real-time sports information into applications, websites, and trading platforms.

Authentication is handled via API keys passed in the X-API-Key request header. For WebSocket connections, authentication is performed during the initial handshake. Keys can be managed through the developer portal.

Yes. The platform provides comprehensive REST APIs for all data domains including live scores, odds, player statistics, fixtures, standings, and historical data. All REST endpoints return structured JSON responses with consistent schemas.

Yes. The platform supports WebSocket connections for real-time push delivery of live scores, match events, and odds updates. WebSocket streams provide sub-second latency for time-sensitive applications.

You can obtain an API key by registering on our platform. A sandbox key is available immediately with 5,000 free monthly calls. Production keys are available on paid plans with higher rate limits.

The API can be consumed from any language that supports HTTP requests. We provide official SDKs for JavaScript, Python, PHP, Java, Go, and Ruby. Community SDKs are available for many other languages.

Yes. A full sandbox environment is available for testing all API endpoints with simulated live data. Sandbox access is included with every account and does not count against production rate limits.

Yes. We provide official SDKs for JavaScript, Python, PHP, Java, Go, and Ruby. All SDKs are open-source and available on GitHub. They handle authentication, retries, rate limiting, and WebSocket reconnection.

Rate limits are applied per API key on a per-minute basis. Limits vary by plan — sandbox keys have higher limits for testing, while production limits are configurable based on your subscription tier.

Historical data is accessible via the /v3/results endpoints. You can filter by sport, league, date range, and fixture ID. Bulk export endpoints are available for model training and large-scale analysis.

Yes. Live odds are available via both REST polling and WebSocket push streams. The /v3/odds/inplay endpoint returns current live odds for all active matches, while WebSocket streams provide continuous updates.

Yes. Real-time updates are available through WebSocket streams and webhooks. You can subscribe to specific event types such as goals, wickets, cards, and match status changes for immediate notifications.

Yes. Webhooks allow you to receive HTTP push notifications for specific events. You can configure multiple webhook endpoints with filters for sports, leagues, and event types. Delivery logs and retry policies are available.

The API is ISO 27001 certified with enterprise-grade security including API key authentication, TLS 1.3 encryption in transit, and role-based access controls. All data processing complies with GDPR and other data protection regulations.

Yes. The REST and WebSocket APIs are fully compatible with mobile platforms. iOS and Android SDKs are available through our community libraries, and the OpenAPI schema enables easy mobile client generation.

Yes. Our API is used by sportsbook operators for odds management, liability tracking, and live data integration. The platform supports both pre-match and in-play betting workflows with ultra-low latency feeds.

Basic integration can be completed in hours with our SDKs and quick-start guide. Full production deployment typically takes 1-2 weeks, depending on the complexity of your application and integration requirements.

Yes. We provide technical support through multiple channels including documentation, Discord community, and email support. Dedicated developer support is available for enterprise customers.

Yes. You can request a personalized demo through our website. Our developer relations team will walk you through the API capabilities, sandbox environment, and integration options.

Tech Magnetics delivers an enterprise-grade sports betting API with 30+ sports coverage, sub-second latency, 99.9% uptime, and ISO 27001 certification. Our developer-first approach includes comprehensive documentation, SDKs, sandbox, and dedicated support.
Start Building Today — Free

Your API Key is
30 Seconds Away.

Register, grab a key, and hit your first live endpoint before your next meeting. Full sandbox access, 5,000 free calls/month, no credit card required.

5,000 free API calls / month
Full sandbox environment
All 6 SDKs included
OpenAPI schema download