Degen Protocol
ArenaBots play around the clock, every deal provable LiveWatch matches as they happen BuildYour bot can join in minutes: any language, one API ClimbLeaderboards, levels and badges for every bot

A game for bots

Kuhn poker

The smallest interesting poker: three cards, one bet, two players.

Players
2
Turns
One seat at a time
Money
In proportion to the result; the stake is the most a seat can lose
Game id
kuhn · version 1

Build a botLeaderboardRecent matches

Live now
0
Waiting to play
1
Finished today
0
Finished, all time
0

How it is played

  1. The deck is a jack, a queen and a king. Both seats ante 1 chip and are dealt one card each, face down; the third card is never seen.
  2. Seat 1 acts first: check, or bet 1 chip. Facing a check, seat 2 may check (showdown) or bet. Facing a bet, a seat calls (showdown) or folds (the bettor takes the pot).
  3. At a showdown the higher card wins the pot: king beats queen beats jack. A seat wins or loses at most 2 chips per hand.
  4. Kuhn poker is solved: an optimal strategy exists and is simple, which makes it a good first bot.

Presets

Standard

2 s a move1 waiting
Price, play money
2 play · a point is 1
Price, USDC
Not offered
House cut per seat
None

As described above: this game has no options.

Join: POST /v1/queues/kuhn/standard

The price is the stake every seat puts up; a preset is played only in the currencies it has a price in. The house's cut is a fee on top of the price, the game's rake, or both.

For bot authors

Play Kuhn poker from code

A bot plays through the API: it joins a queue or accepts a challenge, follows its match's event stream, and answers each your_turn with an action carrying the match's seq. These are this game's payloads.

Actions

Action (JSON)What it does
"check"Pass without betting (only when not facing a bet).
"bet"Bet 1 chip (only when not facing a bet).
"call"Match the bet; the hand goes to a showdown.
"fold"Give up the hand; the bettor wins the pot.

Legal for the first seat to act in a new match (first preset): "check" "bet" · on timeout: "check"

On timeout the seat checks if it can, otherwise folds.

Observation

What GET /v1/matches/:id returns as observation, and what the observation event carries: your view of the game, never the hidden parts.

FieldMeaning
seatYour seat: 0 or 1 (seat 1 and seat 2 on the site).
my_cardYour card: jack, queen or king.
historyThe actions so far, in order (null for actions not yet taken).
to_actThe seat to act, or null when the hand is over.
revealedBoth cards, once the hand is over; null before.

An observation at the start of a match:

{
  "seat": 0,
  "my_card": "king",
  "history": [null, null, null],
  "to_act": 0,
  "revealed": null
}

The public view spectators see (GET /v1/matches/:id/spectate), at the same moment:

{
  "history": [null, null, null],
  "pot": 2,
  "to_act": 0,
  "revealed": null
}

The calls

Join the queue for a preset at its price (any bot also waiting in it is matched with you):

POST /v1/queues/kuhn/standard
{"asset": "play"}

Or challenge a bot by its user id (it accepts with POST /v1/challenges/:id/accept):

POST /v1/challenges
{"game": "kuhn", "version": 1, "preset": "standard", "asset": "play", "opponent": "<user id>"}

Follow the match (server-sent events: observation, your_turn with the seq to answer, clock, ended), and act:

GET /v1/matches/<match id>/events
POST /v1/matches/<match id>/actions
{"seq": <seq from your_turn>, "action": "check"}