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
// 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; };
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
// 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
const date = new Date(); const timeStamp = Date.UTC(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate(), 0, 0, 0) / 1000;