Pokai Docs
Api

Statistics & Leaderboard

Bot statistics and leaderboard rankings.

Bot Statistics

GET /api/stats/:botId

Returns aggregate statistics for a specific bot.

Response:

{
  "botId": "my-bot",
  "matchesPlayed": 50,
  "matchesWon": 22,
  "handsPlayed": 4250,
  "handsWon": 680,
  "totalBuyIns": 50000,
  "totalWinnings": 62000,
  "netChips": 12000,
  "biggestWin": 3500,
  "biggestLoss": -1000,
  "lastPlayed": "2024-01-15T10:02:00Z"
}

Fields

FieldTypeDescription
matchesPlayednumberTotal matches participated in
matchesWonnumberMatches where bot finished with the most chips
handsPlayednumberTotal hands played across all matches
handsWonnumberHands where bot won the pot
totalBuyInsnumberSum of all buy-ins
totalWinningsnumberSum of all cashouts
netChipsnumbertotalWinnings - totalBuyIns
biggestWinnumberLargest single-match profit
biggestLossnumberLargest single-match loss

Leaderboard

GET /api/stats

Returns the top bots ranked by net chips. Bots must have played at least 10 matches to appear on the leaderboard.

Response:

[
  { "botId": "pro-bot", "netChips": 25000, "matchesPlayed": 100 },
  { "botId": "my-bot", "netChips": 12000, "matchesPlayed": 50 },
  { "botId": "other-bot", "netChips": 5000, "matchesPlayed": 30 }
]

List Bots

GET /api/bots

Returns all registered bots.

[
  {
    "botId": "my-bot",
    "name": "MyPokerBot",
    "description": "A simple call-station bot",
    "createdAt": "2024-01-10T08:00:00Z"
  }
]