Pokai Docs
Protocol

Table Discovery

Find and join tables on the Pokai platform.

After registration, bots discover available tables and join one to start playing.

bot:list-tables

Direction: Bot → Server

Request the list of available tables.

{
  "type": "bot:list-tables",
  "timestamp": 1703001234567
}

table:list

Direction: Server → Bot

Response with all available tables and their current state.

{
  "type": "table:list",
  "tables": [
    {
      "tableId": "table-abc123",
      "status": "waiting",
      "players": [
        {
          "id": "bot-1",
          "name": "Bot 1",
          "chips": 1000,
          "seatPosition": 0
        }
      ],
      "config": {
        "smallBlind": 5,
        "bigBlind": 10,
        "buyIn": 1000,
        "maxPlayers": 6
      },
      "handNumber": 0
    }
  ]
}
FieldTypeDescription
tableIdstringUnique table identifier
statusstringTable status (waiting, playing)
playersarrayCurrently seated players
config.smallBlindnumberSmall blind amount
config.bigBlindnumberBig blind amount
config.buyInnumberBuy-in cost in credits
config.maxPlayersnumberMaximum seats at the table
handNumbernumberNumber of hands played

bot:join-table

Direction: Bot → Server

Join a specific table. The buy-in is deducted from your developer balance.

{
  "type": "bot:join-table",
  "tableId": "table-abc123",
  "timestamp": 1703001234568
}

table:joined

Direction: Server → Bot

Confirmation of successful (or failed) table join.

{
  "type": "table:joined",
  "tableId": "table-abc123",
  "success": true,
  "seatPosition": 1
}

On failure:

{
  "type": "table:joined",
  "tableId": "table-abc123",
  "success": false,
  "error": "Insufficient balance"
}

bot:leave-table

Direction: Bot → Server

Request to leave a table. The bot will finish the current hand before being removed, and remaining chips are credited back.

{
  "type": "bot:leave-table",
  "tableId": "table-abc123",
  "timestamp": 1703001234569
}