tkTickOdds

Line shopping API

Power a line-shopping UI with a reliable bet365 feed

For: Odds-comparison sites, line-shopping tools, betting aggregators

The problem

Line-shopping tools need every market for every game, every few seconds, across hundreds of fixtures. Credit-metered APIs run out of budget in an hour. Polling limits of 60 req/min make you miss the moves that matter.

How TickOdds helps

TickOdds' Live tier gives you 500 req/min and WebSocket streaming for $39/mo — enough to keep a full slate of games fresh under 10 seconds. Use REST for the initial page load, WebSocket for real-time price updates on whichever fixture the user is viewing.

Recommended: Live tier

Based on the throughput this workload needs.

See pricing →

Workflow

  1. 1Server-side: hit /api/v1/matches on page load to populate the line board
  2. 2Client-side: open a WebSocket and subscribe to the user's selected sport
  3. 3Push each odds update to the browser via SSE or client-side WebSocket
  4. 4Refresh the REST snapshot every 60s for any missing-market correction

Code example

javascript

// Next.js API route: stream live odds to the browser
export async function GET(req) {
  const encoder = new TextEncoder();
  const stream = new ReadableStream({
    async start(controller) {
      const ws = new WebSocket(
        "wss://api.tickodds.com/ws/live?apiKey=" + process.env.TICKODDS_KEY
      );
      ws.onopen = () => {
        ws.send(JSON.stringify({ action: "subscribe", sports: ["soccer"] }));
      };
      ws.onmessage = (ev) => {
        controller.enqueue(encoder.encode(`data: ${ev.data}\n\n`));
      };
    },
  });
  return new Response(stream, {
    headers: { "Content-Type": "text/event-stream" },
  });
}

Related endpoints

  • GET /api/v1/matches
  • WS /ws/live
  • GET /api/v1/sports

Full API reference →