No configuration overhead. No sales pipeline before you can test. This guide walks you through account setup, API key creation, SDK installation, and your first authenticated request — with working code you can copy and run immediately.
Most sports data providers bury their setup behind procurement, custom quotes, and NDAs before you can test a single endpoint. We give you full sandbox access from minute one — live data schema, real response structure, no waiting.
Head to techmagnetics.io/signup and create a free account with your work email. No credit card is required — the sandbox tier is free permanently and gives you access to the full API schema against live-delayed data.
After submitting your email you'll receive a verification link within 30 seconds. Click it and your developer dashboard is ready immediately.
Use a work email if you plan to invite teammates to your dashboard later. You can always change it, but team invitations are domain-matched by default.
Inside your dashboard, navigate to API Keys → New Key. Give it a descriptive name (e.g. my-football-app-dev), choose your scope, and click Generate. Your key is shown once — copy it immediately.
Never commit your API key to a public repository. Store it in an environment variable (TM_API_KEY) or a secrets manager like Vault, AWS Secrets Manager, or GitHub Actions secrets.
You can create multiple keys per project, scope them to specific endpoints or sports, and set expiry dates. All key activity is logged in your dashboard with per-endpoint call counts.
We publish official SDKs for six languages. Each SDK wraps the full REST and WebSocket API, ships with TypeScript definitions (even for non-TS packages), and is semantically versioned. Install the one that matches your stack:
# Install with npm (JavaScript / TypeScript) $ npm install @techmagnetics/sports-sdk # Or with yarn $ yarn add @techmagnetics/sports-sdk ✓ added 1 package · 0.9s
# Install with pip (Python 3.8+) $ pip install techmagnetics-sdk # Or with pipenv $ pipenv install techmagnetics-sdk Successfully installed techmagnetics-sdk-3.8.2
# Install with Composer (PHP 8.0+) $ composer require techmagnetics/sports-sdk ✓ Package operations: 1 install · 0 updates · 0 removals
# No SDK needed — use cURL directly $ curl -s -H "Authorization: Bearer YOUR_API_KEY" \ "https://api.techmagnetics.io/v1/livescores?sport=football" # The REST API follows standard HTTP conventions. # All responses are JSON. See the API reference for parameters.
All SDKs ship with full TypeScript definitions, JSDoc/docstring coverage, and match the same API surface. Switching languages later requires only changing the import — the method names and parameters are consistent across all SDK languages.
The example below fetches live prematch football odds for the Premier League — returning available markets, current prices, and fixture metadata in a single call. Replace YOUR_API_KEY with your sandbox key from Step 2.
import { TechMagnetics } from '@techmagnetics/sports-sdk'; const client = new TechMagnetics({ apiKey: process.env.TM_API_KEY, region: 'eu-west-1' }); // Fetch prematch odds — Premier League, 1X2 + Over/Under markets const response = await client.odds.prematch({ sport: 'football', competition: 'premier_league', markets: ['1x2', 'over_under_2_5'], limit: 10 }); console.log(`Found ${response.events.length} fixtures`); console.log(response.events[0]); /* Output: { id: "prem_ars_che_20260628", home: "Arsenal", away: "Chelsea", kickoff: "2026-06-28T15:00:00Z", odds: { home: 2.15, draw: 3.40, away: 3.10 }, markets: { over_2_5: 1.85, under_2_5: 2.00 } } */
import os from techmagnetics import TechMagnetics client = TechMagnetics( api_key=os.environ["TM_API_KEY"], region="eu-west-1" ) # Fetch prematch football odds — Premier League response = client.odds.prematch( sport="football", competition="premier_league", markets=["1x2", "over_under_2_5"], limit=10 ) print(f"Found {len(response.events)} fixtures") print(response.events[0]) # Output: # TmEvent(id='prem_ars_che_20260628', home='Arsenal', # away='Chelsea', odds=TmOdds(home=2.15, draw=3.40, away=3.10))
<?php use TechMagnetics\Client; $client = new Client([ 'api_key' => $_ENV['TM_API_KEY'], 'region' => 'eu-west-1' ]); // Fetch prematch football odds $response = $client->odds()->prematch([ 'sport' => 'football', 'competition' => 'premier_league', 'markets' => ['1x2', 'over_under_2_5'], 'limit' => 10 ]); echo count($response->events) . " fixtures found\n"; var_dump($response->events[0]);
# Fetch prematch Premier League odds via raw cURL $ curl -s \ -H "Authorization: Bearer $TM_API_KEY" \ -H "Accept: application/json" \ "https://api.techmagnetics.io/v1/odds/prematch ?sport=football&competition=premier_league &markets=1x2,over_under_2_5&limit=10" | jq . # Response (truncated): { "status": 200, "latency_ms": 148, "events": [ { "id": "prem_ars_che_20260628", "home": "Arsenal", "away": "Chelsea", "odds": { "home": 2.15, "draw": 3.40, "away": 3.10 } } ] }
A 200 OK with event data means you're fully connected. If you see a 401 Unauthorized, double-check that your TM_API_KEY environment variable is set and the key hasn't expired.
For live scores, in-play odds, and real-time match events, use our WebSocket feed instead of polling. One persistent connection delivers all event updates for your subscribed fixtures — no repeated HTTP overhead.
import { TechMagnetics } from '@techmagnetics/sports-sdk'; const client = new TechMagnetics({ apiKey: process.env.TM_API_KEY }); // Subscribe to live football events — Premier League only const stream = client.stream.connect({ sport: 'football', competition: 'premier_league', channels: ['livescore', 'odds', 'events'] }); // Goal scored stream.on('goal', (event) => { console.log(`⚽ GOAL: ${event.scorer} (${event.team}) — ${event.minute}'`); }); // Odds update (fires on any market movement) stream.on('odds_update', (update) => { console.log(`📊 Odds updated: home now ${update.odds.home}`); }); // Auto-reconnects on disconnect — no extra setup needed stream.on('reconnect', () => console.log('Reconnected to stream'));
The SDK handles reconnection, exponential back-off, and message ordering automatically. In the sandbox environment, stream events are replayed from a recent live match to give you realistic testing conditions without waiting for a real fixture.
All API errors return standard HTTP status codes with a structured JSON body. The SDK also surfaces typed error classes so you can catch specific failure modes without parsing raw response text.
import { TechMagnetics, TmAuthError, TmRateLimitError, TmNotFoundError } from '@techmagnetics/sports-sdk'; try { const data = await client.odds.prematch({ sport: 'cricket' }); } catch (err) { if (err instanceof TmAuthError) { // 401 — invalid or expired API key console.error('Check your TM_API_KEY environment variable'); } else if (err instanceof TmRateLimitError) { // 429 — slow down; retry after err.retryAfter seconds await sleep(err.retryAfter * 1000); } else if (err instanceof TmNotFoundError) { // 404 — competition or fixture not found console.warn('Competition not found — check your coverage plan'); } else { // 5xx — transient server error, safe to retry with back-off throw err; } }
When you're ready to go live, upgrade your account to a paid plan, generate a production key (prefix tm_live_sk_), and swap the environment variable. No code changes required — the production endpoint is identical to sandbox, but returns real-time data without delay.
# Development / sandbox TM_API_KEY=tm_sandbox_sk_a3f8c2d9e1b7•••• # Production (swap this in when you deploy) # TM_API_KEY=tm_live_sk_•••••••••••••••• # Optional: set preferred region for lower latency TM_REGION=eu-west-1 # eu-west-1 | us-east-1 | ap-southeast-1
You're production-ready. Your sandbox API key continues working for testing and staging environments — it never expires and doesn't count toward your production quota.
Once your integration is live, every connected stadium display, mobile app, and web widget updates in lockstep with the action on the pitch. Our sub-200ms delivery pipeline means your users see the same moment fans at the ground do.
Once you understand the authentication and response structure, these are the five endpoints that power the majority of what developers build with our API.
Get upcoming fixture odds with all available markets before the match starts. Filter by sport, competition, or specific teams.
GET /v1/odds/prematchSubscribe via WebSocket for push-based score updates, goal events, yellow cards, and match status changes in real time.
WS /v1/livescores/streamSeason-to-date and career statistics for any player in a supported league — goals, assists, minutes played, and advanced metrics.
GET /v1/stats/player/{id}Query the full fixture calendar for any sport and competition, with venue, broadcaster, and estimated attendance data included.
GET /v1/fixturesPull years of past results, head-to-head records, and historical odds for training models or building analytics dashboards.
GET /v1/historical/resultsPOST a URL to receive push notifications for events you care about — goal alerts, odds movements, match start/end, and more.
POST /v1/webhooks/subscribeOur OpenAPI 3.1 specification is always in sync with the deployed API. Import it into Postman, generate typed clients automatically, or browse the interactive explorer in your dashboard — every endpoint, parameter, and response field is documented and versioned.
Switch the sport parameter and the same code that fetched Premier League odds now returns IPL cricket markets or NBA live scores — no new authentication, no new endpoint pattern.
With working code samples for every endpoint and SDK wrappers that handle auth, retries, and connection management, most developers ship a working proof-of-concept in hours — not days. The same data that powers enterprise platforms is available to you from the free sandbox tier.
Our developer relations team responds in our public Slack within the same business day. On Growth and Enterprise plans, you get a dedicated integration engineer who knows your codebase and can pair-program your setup, review your implementation, and escalate production issues directly to our infrastructure team.
Sandbox access, full schema, and six SDK languages — all available the moment you sign up. No procurement, no NDA, no credit card. Start building the sports app you've been planning and upgrade only when you go to production.
Free tier never expires · No credit card · Upgrade only when you go live