COH3 Stats - Open Data

COH3 Leaderboards data

COH3 Stats stores complete historical leaderboards for COH3. You can download the .json files from our storage. Each JSON file includes comprehensive leaderboards with all the ranks for a specific mode and faction.
They are created every day at 04:00 UTC. Downloading for a given day at 05:00 UTC should be safe.
History starts on 10h of May 2023.
You can download them from our storage:
https://storage.coh3stats.com/leaderboards/{unixTimeStamp}/{unixTimeStamp}_{mode}_{faction}.json

// Available modes: 1v1, 2v2, 3v3, 4v4
// Available factions: american, british, german, dak
// UnixTimeStamp: See explanation below how to calculate it

// Example:
https://storage.coh3stats.com/leaderboards/1683676800/1683676800_2v2_american.json
If you plan to utilize the data, kindly acknowledge the data source. Additionally, consider sharing your project with us on our Discord. We would love to help you with your project.
Type definitions for the data:
// Leaderboard json object definition:
{ "leaderboards": Array<RawLeaderboardStat>; }

type RawLeaderboardStat = {
  statgroup_id: number;
  leaderboard_id: number;
  wins: number;
  losses: number;
  streak: number;
  disputes?: number;
  drops?: number;
  rank: number;
  ranktotal?: number;
  regionrank?: number;
  regionranktotal?: number;
  ranklevel: number;
  rating: number;
  lastmatchdate: number;
  members: Array<RawPlayerProfile>;
};

type RawPlayerProfile = {
  profile_id: number;
  name: string;
  alias: string;
  personal_statgroup_id?: number;
  xp?: number;
  level: number;
  leaderboardregion_id?: number;
  country: string;
};
Optional fields are marked with "?". And will most likely be not present as they are not deemed important. However they are on the Relic API in case you need them. Reach out to us if you need any clarification.

COH3 Match data

COH3 Stats stores played matches. It should include all games where at least 1 player was ranked. It might also include some custom and other types of games. It should not include any broken games. Aka game 3v3, which had only 2 players on one side. It is recommended to filter the games based on matchtype_id. You can download the .json files from our storage. Each JSON file contains all games played for a given day which we were able to track.
They are created every day at 06:00 UTC. Downloading for a given day at 07:00 UTC should be safe.
History starts on July 1st 2023.
You can download them our our storage:
https://storage.coh3stats.com/matches/matches-{unixTimeStamp}.json

// UnixTimeStamp: See explanation below how to calculate it

// Example:
https://storage.coh3stats.com/matches/matches-1688169600.json
Type definitions for the data:
// Match data json object definition:
{ "matches": Array<ProcessedMatch>; }

interface ProcessedMatch {
  id: number;
  creator_profile_id: number;
  mapname: string;
  maxplayers: number;
  matchtype_id: number;
  description: string;
  platform: string;
  startgametime: number;
  completiontime: number;
  matchhistoryreportresults: Array<PlayerReport>;
  matchhistoryitems: Array<ProcessedMatchHistoryItem>; // we are filtering out some items - those are cosmetic items
  profile_ids: Array<number>;
}

interface PlayerReport {
  profile_id: number;
  resulttype: number;
  teamid: number;
  race_id: number;
  counters: string;
  profile: ProcessedProfile;
  matchhistorymember: ProcessedMatchHistoryMember;
}

interface ProcessedProfile {
  name: string;
  alias: string;
  personal_statgroup_id: number;
  xp: number;
  level: number;
  leaderboardregion_id: number;
  country: string;
}

interface ProcessedMatchHistoryMember {
  statgroup_id: number;
  wins: number;
  losses: number;
  streak: number;
  arbitration: number;
  outcome: number;
  oldrating: number;
  newrating: number;
  reporttype: number;
}

interface ProcessedMatchHistoryItem {
  profile_id: number;
  itemdefinition_id: number;
  itemlocation_id: number;
}

// Check https://github.com/cohstats/coh3-stats/blob/master/src/coh3/coh3-raw-data.ts for additional details
If you plan to utilize the data, kindly acknowledge the data source. Additionally, consider sharing your project with us on our Discord. We would love to help you with your project.

COH3 Stats - Unix TimeStamp

COH3 Stats is using Unix TimeStamp to mark each day date with the time 00:00:00 UTC.
For example 1683676800 which is May 10 2023 00:00:00 GMT+0000.
In JavaScript you can get the timestamp for the current day with the following code:
const date = new Date();
const timeStamp = Date.UTC(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate(), 0, 0, 0) / 1000;

COH3 Game data

You can find the game data (units, descriptions, etc.) in our Data repository on Github.
https://github.com/cohstats/coh3-data
You can find all our other open source projects on our Github organization page:
https://github.com/cohstats