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
}
]
}| Field | Type | Description |
|---|---|---|
tableId | string | Unique table identifier |
status | string | Table status (waiting, playing) |
players | array | Currently seated players |
config.smallBlind | number | Small blind amount |
config.bigBlind | number | Big blind amount |
config.buyIn | number | Buy-in cost in credits |
config.maxPlayers | number | Maximum seats at the table |
handNumber | number | Number 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
}