Reporting API
The Reporting API provides endpoints for querying player activity, round history, and leaderboard data. Use these for back-office dashboards, compliance reporting, and player analytics.
Endpoints
GET /v1/player/{id}/stats
Returns a player's lifetime statistics.
Response:
json
{
"id": "550e8400-e29b-41d4-a716-446655440001",
"username": "JohnDoe",
"balance": 1500.00,
"total_bets": 142,
"total_wins": 73,
"total_wagered": 12450.00,
"total_pnl": 340.50,
"best_win": 890.00,
"current_streak": 3,
"win_rate": 0.514
}GET /v1/player/{id}/bets
Returns a player's recent bet history (last 30 bets).
Response:
json
[
{
"id": "bet-uuid",
"round_id": 184721,
"side": "up",
"stake": 100.00,
"odds": 1.82,
"payout": 182.00,
"result": "win",
"cashed_out": false,
"placed_at": "2026-03-19T14:05:12Z",
"pyth_verification_url": "https://hermes.pyth.network/..."
}
]| Field | Description |
|---|---|
result | "win", "loss", "cashout", or "pending" |
cashed_out | true if the player exited early |
pyth_verification_url | On-chain price proof (present for settled and cashed-out bets) |
GET /v1/player/{id}/volume
Returns a player's 24-hour wagering volume.
Response:
json
{
"volume_24h": 2450.00
}GET /v1/rounds/recent
Returns the last 5 settled rounds for the current asset.
Response:
json
[
{
"id": 184721,
"result": "up",
"entry_price": 71284.50,
"settlement_price": 71310.25,
"start_time": "2026-03-19T14:00:00Z"
}
]GET /v1/leaderboard
Returns the top 20 players ranked by total P&L.
Response:
json
[
{
"username": "JohnDoe",
"total_pnl": 1240.50,
"total_bets": 312,
"total_wins": 168,
"best_win": 890.00,
"win_rate": 0.538
}
]Use Cases
| Use Case | Endpoint |
|---|---|
| Player activity report | GET /v1/player/{id}/stats + GET /v1/player/{id}/bets |
| Loss limit monitoring | GET /v1/player/{id}/volume (24h wagering) |
| Round audit | GET /v1/rounds/recent (each round has Pyth verification URL) |
| Operator dashboard | GET /v1/leaderboard + GET /v1/rounds/recent |