Skip to main content

Documentation Index

Fetch the complete documentation index at: https://txline-docs.txodds.com/llms.txt

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

Fetch Fixtures Snapshot

Get all fixtures for a specific competition or all competitions.
import axios from "axios";

const httpClient = axios.create({
  timeout: 30000,
  headers: {
    "Content-Type": "application/json",
    "Authorization": `Bearer ${jwt}`,
    "X-Api-Token": apiToken
  },
  baseURL: "https://oracle-dev.txodds.com",
});

// Get fixtures for specific competition
const fixturesResponse = await httpClient.get("/api/fixtures/snapshot", {
  params: {
    competitionId: 500005, // NCAA Division I FBS
  },
});
const fixtures = fixturesResponse.data;

console.log(`Retrieved ${fixtures.length} fixtures`);
fixtures.slice(0, 3).forEach((fixture, index) => {
  console.log(`${index + 1}. ${fixture.Participant1} vs ${fixture.Participant2}`);
  console.log(`   ID: ${fixture.FixtureId}, Start: ${new Date(fixture.StartTime).toISOString()}`);
});

// Get all fixtures
const allFixturesResponse = await httpClient.get("/api/fixtures/snapshot");
const allFixtures = allFixturesResponse.data;

console.log(`Retrieved ${allFixtures.length} total fixtures`);

Fetch Odds Snapshot

Get odds data for a specific fixture or time period.
const fixtureId = 17271370;

// Get odds for specific fixture
const fixtureOddsResponse = await httpClient.get(
  `/api/odds/snapshot/${fixtureId}`
);
const fixtureOdds = fixtureOddsResponse.data;

console.log(`Retrieved ${fixtureOdds.length} odds entries`);

// Get odds for time period
const epochDay = 20085;
const hourOfDay = 15;
const interval = 0;

const updatesResponse = await httpClient.get(
  `/api/odds/updates/${epochDay}/${hourOfDay}/${interval}`
);
const updates = updatesResponse.data;

console.log(`Retrieved ${updates.length} odds updates`);

Fetch Scores Snapshot

Get scores data for a specific fixture or time period.
const fixtureId = 17271370;

// Get scores snapshot for fixture
const snapshotScoresResponse = await httpClient.get(
  `/api/scores/snapshot/${fixtureId}`
);
const snapshotScores = snapshotScoresResponse.data;

console.log(`Retrieved ${snapshotScores.length} snapshot scores entries`);

// Get live scores updates
const liveScoresResponse = await httpClient.get(
  `/api/scores/updates/${fixtureId}`
);
const liveScores = liveScoresResponse.data;

console.log(`Retrieved ${liveScores.length} live scores updates`);

// Get scores for time period
const epochDay = 20085;
const hourOfDay = 15;
const interval = 0;

const historicalUpdatesResponse = await httpClient.get(
  `/api/scores/updates/${epochDay}/${hourOfDay}/${interval}`
);
const historicalUpdates = historicalUpdatesResponse.data;

console.log(`Retrieved ${historicalUpdates.length} historical scores updates`);