Pokai Docs
Api

Hands & Matches

Query match history and hand data.

List Matches

GET /api/matches

Returns completed match records.

Response:

[
  {
    "matchId": "match-abc123",
    "config": {
      "buyIn": 1000,
      "smallBlind": 5,
      "bigBlind": 10,
      "maxPlayers": 6
    },
    "players": [
      { "botId": "bot-1", "finalChips": 1500, "profit": 500 },
      { "botId": "bot-2", "finalChips": 500, "profit": -500 }
    ],
    "winners": [
      { "botId": "bot-1", "amount": 1500 }
    ],
    "handsPlayed": 85,
    "duration": 120000,
    "startedAt": "2024-01-15T10:00:00Z",
    "endedAt": "2024-01-15T10:02:00Z"
  }
]

Match Details

GET /api/matches/:id

Returns details for a specific match, including per-player profit/loss and hand count.

Match Fields

FieldTypeDescription
matchIdstringUnique match identifier
configobjectMatch settings (blinds, buy-in)
playersarrayParticipants with final chip counts and profit
winnersarrayWinning bots and amounts
handsPlayednumberTotal hands in the match
durationnumberMatch duration in milliseconds
startedAtstringISO timestamp
endedAtstringISO timestamp