Start typing to search
Searching...
Delayed data Up to 10 min behind
Get Starter

Select Data to Purchase

No months available

My Downloads

Your download link is ready! Expires in

Data Purchase Date Download
Football Sample - Download
Tennis Sample - Download

Cart Summary

  • Your cart is empty.

Total

One-time payment. Keep data forever.

Historical Data Guide

What data to expect?

The historical data archives provide comprehensive insights into Betwatch data, delivered as a compressed .tar.gz file. Each archive contains detailed information about sports matches, including match details, score updates, and time-series market data.

Once unzipped, you will find a structured directory for each download:

/year
    /month
        /day
            /match_id/
                - {match_id}.json (match info)
                - {match_id}_score.parquet (match score)
                - {market_id}.parquet (market timeseries)

For example, the file 2023/12/02/32842647/32842647.json contains the main match information for game ID 32842647. This JSON file links the game information to its related market IDs, which are used to identify the corresponding .parquet time-series files.

Sample Files:

Download sample files to understand the data structure before subscribing:

How to get started and work with the data?

1. Extracting the Data:

After downloading the .tar.gz file, you'll need to extract its contents.

For Windows users:

You can use free tools like 7-Zip or WinZip to extract .tar.gz files.

For macOS/Linux users:

Open your terminal and navigate to the directory where you downloaded the file. Then, use the following command:

tar -xvzf your_downloaded_file.tar.gz

2. Understanding the File Structure and Content:

The extracted data will be organized into a hierarchical directory structure: /year/month/day/match_id/. Within each match_id directory, you will find three types of files crucial for your analysis.

a. Match Info ({match_id}.json):

This is your starting point for any match. It contains general information about the match, including:

  • Match name, date, and time.
  • A list of markets associated with the match, where each market has a name (e.g., "Match Odds", "Correct Score") and its corresponding unique market_id.
  • Details about the runners (outcomes, like "Home", "Draw", "Away") in the match, including their name and a unique runner_identifier.

You'll use the market_id from this JSON file to link to the detailed time-series data in the Parquet files. The runner_identifier is essential for understanding which data points in the market timeseries belong to which specific outcome.

b. Match Score ({match_id}_score.parquet):

This Parquet file provides minute-by-minute updates of the match score. It's useful for understanding the progression of the game and how it might have impacted market odds.

c. Market Timeseries ({market_id}.parquet):

These Parquet files contain the core Betwatch data for a specific market, updated minute by minute. Each file corresponds to a unique market_id identified in the {match_id}.json file. Within these files, you will find columns for:

  • Timestamp of the data point.
  • Odd values (last traded price).
  • Matched volume.
  • And crucially, the runner_identifier to associate the odds and volume with the specific runner in that market.

This is where you'll find the granular data for your analytical models.

3. Working with the Data (Loading and Analysis):

Parquet is a columnar storage format optimized for data analytics. We highly recommend using libraries designed for Parquet to efficiently read and process these files.

Recommended Tools:
  • Python: Use the pandas library with the pyarrow engine.

      import pandas as pd
      import json
    
      # 1. Load match info to get market and runner details
      with open('path/to/{match_id}.json', 'r') as f:
          match_info = json.load(f)
    
      # Example: Get market ID for "Match Odds"
      match_odds_market_id = None
      for market in match_info['markets']:
          if market['name'] == 'Match Odds':
              match_odds_market_id = market['market_id']
              break
    
      # Example: Get runner names for mapping
      runners_map = {market['market_id']: {runner['runner_identifier']: runner['name'] for runner in market['runners']} for market in match_info['markets']}
    
    
      # 2. Load and print score data
      df_score = pd.read_parquet('path/to/{match_id}_score.parquet')
      print("Score Data:")
      print(df_score.head())
    
      # 3. Load market timeseries data for a specific market
      if match_odds_market_id:
          df_market = pd.read_parquet(f'path/to/{match_odds_market_id}.parquet')
          # You can now map runner_identifier to runner_name
          df_market['runner_name'] = df_market['runner_identifier'].map(runners_map[match_odds_market_id])
          print("\nMatch Odds Market Timeseries Data:")
          print(df_market.head())
  • R: Use the arrow package.

      library(arrow)
      library(jsonlite)
    
      # 1. Load match info
      match_info <- fromJSON('path/to/{match_id}.json')
    
      # Example: Get market ID for "Match Odds"
      match_odds_market_id <- subset(match_info$markets, name == "Match Odds")$market_id
    
      # Example: Get runner names for mapping
      runners_map <- lapply(match_info$markets, function(market) {
        setNames(
          sapply(market$runners, function(runner) runner$name),
          sapply(market$runners, function(runner) runner$runner_identifier)
        )
      )
    
      # 2. Load and print score data
      df_score <- read_parquet('path/to/{match_id}_score.parquet')
      print("Score Data:")
      print(head(df_score))
    
      # 3. Load market timeseries data for a specific market
      if (length(match_odds_market_id) > 0) {
        df_market <- read_parquet(sprintf('path/to/%s.parquet', match_odds_market_id))
        df_market$runner_name <- runners_map[[match_odds_market_id]][df_market$runner_identifier]
        print("\nMatch Odds Market Timeseries Data:")
        print(head(df_market))
      }
  • SQL (via tools like DuckDB): DuckDB is an in-process SQL OLAP database that can directly query Parquet files.

      import duckdb
    
      con = duckdb.connect()
    
      # You would typically load the JSON data into your environment first to get market/runner IDs
      # For direct querying, you would know the market_id
      print("Market Timeseries Data for a Market (e.g., Match Odds):")
      con.execute("SELECT * FROM 'path/to/{market_id}.parquet' LIMIT 5").fetchdf()
    
      print("\nScore Data:")
      con.execute("SELECT * FROM 'path/to/{match_id}_score.parquet' LIMIT 5").fetchdf()

By leveraging these tools, you can efficiently load, analyze, and visualize the historical data for your betting strategies.

Verification required

Please confirm you’re human to continue.