Skip to main content
Casino Analytics is the operational analytics surface for casino operators on Atlas. It exposes 10 REST endpoints that feed the Cassino Analytics screen in the dashboard, all backed by ClickHouse Gold tables (no synchronous reads of raw events). Endpoints are scoped to the authenticated organization and filtered by brand.

Authentication

All endpoints require a valid session JWT:
Cross-organization brand access returns 403 brand_not_in_org. The maximum window allowed is 12 months + 31 days; larger ranges return 400 window_too_large.

Common Query Parameters

Endpoints

Overview

GET /v1/analytics/casino/overview Returns the 10 KPIs of the redesign + variations vs M-1 and vs D-1 (both returned in a single response — frontend toggles without re-fetch). Query params: from, to, brand_id[], variation (vs_m1/vs_d1, informational only). Response (200):
KPI formulas:

Channel Composition

GET /v1/analytics/casino/channel-composition Returns 4 buckets (Slots, Live, Tables, Outros) with GGR/Stake/Hold/share + Δpp vs M-1. Buckets always returned in fixed order, even when empty. Response (200):
Bucket mapping (case-sensitive on game_type):
  • Video Slotsslots
  • Live Gameslive
  • Baccarat, Roulette, Blackjack, Table Games, Poker, Video Pokertables
  • Crash Games, Video Bingo, Other Games, Lottery, Fast Games, Instant Games, Scratch Card, Jackpotsoutros
  • unknown → outros + casino_unknown_game_type warn log

Top Games

GET /v1/analytics/casino/top-games?limit=5 Top N games by GGR DESC with tiebreaker rounds_count DESC. limit defaults to 5, max 100 (returns 422 above). Response (200):

Rankings

GET /v1/analytics/casino/rankings?tab=top_stake&limit=20&offset=0 Game-level ranking with 4 tabs and optional filters. Query params: tab (top_stake/top_rounds/ggr_positive/ggr_negative, default top_stake), provider[] (multi), game_type[] (multi: slots/live/tables/outros), limit (default 20, max 100), offset (default 0). Invalid tab422 invalid_tab. Invalid bucket in game_type[]422 invalid_game_type_bucket. Response (200):

Providers

GET /v1/analytics/casino/providers?tab=top_ggr Provider-level ranking with 2 tabs. Query params: tab (top_ggr/top_volume, default top_ggr), limit (default 20, max 100), offset. Response (200):

Players Summary

GET /v1/analytics/casino/players-summary Active players + churn rolling D7/D14/D30 + sessions per player. Response (200):
snapshot_age_days > 1 indicates the daily refreshable MV has not run recently. Frontends should show a soft warning. has_snapshot=false means no churn data has been computed yet (first-time setup or pipeline failure).

Volume by Hour

GET /v1/analytics/casino/volume-by-hour?game_type=slots&timezone=America/Sao_Paulo 24 buckets in the requested timezone (default BRT). Response always contains exactly 24 rows; hours without data return zeros. Query params: game_type (single bucket: slots/live/tables/outros), timezone (default America/Sao_Paulo). Response (200):

GGR/NGR Accumulated

GET /v1/analytics/casino/ggr-ngr-accumulated Daily cumulative series for GGR and NGR, with M-1 baseline aligned by day-of-period index. Response (200):

New vs Returning

GET /v1/analytics/casino/new-vs-returning Monthly breakdown for up to 12 months: total_players minus new_players = returning_players. Response (200):

Weekly Heatmap

GET /v1/analytics/casino/weekly-heatmap 7×24 matrix (day-of-week × hour BRT) of GGR. ClickHouse convention: day_of_week=1 is Monday, day_of_week=7 is Sunday. Hour is BRT (0..23). Response (200):
min and max are pre-computed for direct gradient rendering on the client.

Errors

Performance

  • Latency target: P95 < 1s for windows up to 31 days, < 3s for 12 months.
  • Server-side ClickHouse timeout: 30s. Excess returns 503.
  • Polling default off in the dashboard. When enabled, requests share the same brand/period scope and aborted on filter change.