Internet Poker Protocol (IPP)
Version 2.0
29 Oct 1999

George Ferguson
ferguson@cs.rochester.edu

This is a living document. A sample session and revision history follow the definitions.

Definitions

IPP messages are sequences of ASCII characters terminated by a newline.

Elements of messages can be separated by spaces or tabs unless noted below.

Messages are interpreted without respect for case unless noted below.

The following definitions are used in the descriptions that follow.

Handshaking Messages

The following messages are exchanged with the server to establish communication. Additions to this part of the protocol may be needed (for example, to indicate that the server has acknowledged the player but cannot add them to the game yet).

Information Messages

The following messages are sent by the server. No response is expected, required, or permitted. An important informational message sent by the server is the following:

Texas Holdem Messages

The following messages are specific to Texas Holdem games: See the examples for an illustration of these messages.

Draw Poker Messages

The following messages are specific draw poker games: See the examples for an illustration of these messages.

Stud Poker Messages

The following messages are specific to stud poker games: See the examples for an illustration of these messages.

Betting Messages

The following messages are sent during betting. The possible responses are listed below. If the response to an ACTION? message is acceptable, the server will respond with a message starting with OK. Otherwise it will send a message starting with ERROR followed by some indication of the error. Reasons for errors include trying to perform an action that is not permitted at this time (e.g., checking after betting has been opened) or trying to bet more money than a player has left.

Showdown Messages

The term handtype in the following refers to a declaration of a hand that can be made from a player's cards, such as ``pair of aces'' or ``straight flush 7 high.'' The following syntax is used for these. Note that only the information needed in comparing hands is included.

The following messages are sent during a showdown when not playing ``cards speak.'' Possible responses are described below.

As for ACTION? messages, the server will respond with either OK or an ERROR message. Note that announcing a handtype not supported by a player's cards is considered an ERROR.

End-of-hand Messages

The following messages are sent by the server at the end of each hand. No response is expected, required, or permitted.

Miscellaneous Messages

The following messages may also be sent by the server.


Illustrative Examples

In Texas Holdem, the flow of the game is as follows (from the perspective of one player):

In Draw poker, the flow of the game is as follows:

In 5-Card Stud, the flow of the game is as follows:

In 7-Card Stud, the flow of the game is as follows:


Sample Session

Assume that initially no players are connected, then three players (clients) named Alpha, Beta, and Gamma join.

Connection established with Alpha
From server to Alpha:IPP 1.0 ...
From Alpha to server:BUYIN Alpha 1000
From server to Alpha:WELCOME Alpha
Connection established with Beta
From server to Beta:IPP 1.0 ...
From Beta to server:BUYIN Beta 1000
From server to Beta:WELCOME Beta
Connection established with Gamma
From server to Gamma:IPP 1.0 ...
From Gamma to server:BUYIN Gamma 1000
From server to Gamma:WELCOME Gamma
Game starts...
From server to AlphaNEWGAME HOLDEM 10 20
From server to BetaNEWGAME HOLDEM 10 20
From server to GammaNEWGAME HOLDEM 10 20
From server to AlphaPLAYER Alpha 1000
From server to BetaPLAYER Alpha 1000
From server to GammaPLAYER Alpha 1000
From server to AlphaPLAYER Beta 1000
From server to BetaPLAYER Beta 1000
From server to GammaPLAYER Beta 1000
From server to AlphaPLAYER Gamma 1000
From server to BetaPLAYER Gamma 1000
From server to GammaPLAYER Gamma 1000
Hand starts...
From server to AlphaBUTTON Alpha
From server to BetaBUTTON Alpha
From server to GammaBUTTON Alpha
From server to AlphaANTE 5
From server to BetaANTE 5
From server to GammaANTE 5
From server to AlphaDEAL 5H TC
From server to BetaDEAL AD JD
From server to GammaDEAL 2C 8S
First betting round (limit 10)...
From server to AlphaACTION? BLIND 5
From Alpha to serverBLIND 5
From server to AlphaOK BLIND 5
From server to BetaFROM Alpha BLIND 5
From server to GammaFROM Alpha BLIND 5
From server to BetaACTION? STRADDLE 10
From Beta to serverSTRADDLE 10
From server to BetaOK STRADDLE 10
From server to AlphaFROM Beta STRADDLE 10
From server to GammaFROM Beta STRADDLE 10
From server to GammaACTION? OWING 10
From Gamma to serverCALL 10
From server to GammaOK CALL 10
From server to AlphaFROM Gamma CALL 10
From server to BetaFROM Gamma CALL 10
From server to AlphaACTION? OWING 5
From Alpha to serverCALL 5
From server to AlphaOK CALL 5
From server to BetaFROM Alpha CALL 5
From server to GammaFROM Alpha CALL 5
Flop...
From server to AlphaFLOP 7S 2H QD
From server to BetaFLOP 7S 2H QD
From server to GammaFLOP 7S 2H QD
Second betting round (limit 10)...
From server to AlphaACTION? BLIND 5
From Alpha to serverBLIND 5
From server to AlphaOK BLIND 5
From server to BetaFROM Alpha BLIND 5
From server to GammaFROM Alpha BLIND 5
From server to BetaACTION? STRADDLE 10
From Beta to serverSTRADDLE 10
From server to BetaOK STRADDLE 10
From server to AlphaFROM Beta STRADDLE 10
From server to GammaFROM Beta STRADDLE 10
From server to GammaACTION? OWING 10
From Gamma to serverRAISE 20
From server to GammaOK RAISE 20
From server to AlphaFROM Gamma RAISE 20
From server to BetaFROM Gamma RAISE 20
From server to AlphaACTION? OWING 15
From Alpha to serverFOLD
From server to AlphaOK FOLD
From server to BetaFROM Alpha FOLD
From server to GammaFROM Alpha FOLD
From server to BetaACTION? OWING 10
From Beta to serverCALL 10
From server to BetaOK CALL 10
From server to AlphaFROM Beta CALL 10
From server to GammaFROM Beta CALL 10
Turn...
From server to AlphaTURN 4D
From server to BetaTURN 4D
From server to GammaTURN 4D
Third betting round (no blind, limit 20, Alpha has folded)...
From server to BetaACTION? OWING 0
From Beta to serverOPEN 20
From server to BetaOK OPEN 20
From server to AlphaFROM Beta OPEN 20
From server to GammaFROM Beta OPEN 20
From server to GammaACTION? OWING 20
From Gamma to serverCALL 20
From server to GammaOK CALL 20
From server to AlphaFROM Gamma CALL 20
From server to BetaFROM Gamma CALL 20
River...
From server to AlphaRIVER TS
From server to BetaRIVER TS
From server to GammaRIVER TS
Fourth betting round...
From server to BetaACTION? OWING 0
From Beta to serverCHECK
From server to BetaOK CHECK
From server to AlphaFROM Beta CHECK
From server to GammaFROM Beta CHECK
From server to GammaACTION? OWING 0
From Gamma to serverOPEN 20
From server to GammaOK OPEN 20
From server to AlphaFROM Gamma OPEN 20
From server to BetaFROM Gamma OPEN 20
From server to BetaACTION? OWING 20
From Beta to serverCALL 20
From server to BetaOK CALL 20
From server to AlphaFROM Beta CALL 20
From server to GammaFROM Beta CALL 20
Showdown (Gamma is being called)...
From server to GammaSHOW?
From Gamma to serverONEPAIR 2 Q 8 7
From server to GammaOK ONEPAIR 2 Q 8 7
From server to AlphaFROM Gamma ONEPAIR 2 Q 8 7
From server to BetaFROM Gamma ONEPAIR 2 Q 8 7
From server to BetaBEAT? ONEPAIR 2 Q 8 7
From Beta to serverNO
From server to BetaOK NO
From server to AlphaFROM Beta NO
From server to GammaFROM Beta NO
End of hand...
From server to AlphaWINNER Gamma 170 ONEPAIR 2 Q 8 7
From server to BetaWINNER Gamma 170 ONEPAIR 2 Q 8 7
From server to GammaWINNER Gamma 170 ONEPAIR 2 Q 8 7
Next hand starts...
From server to AlphaBUTTON Beta
From server to BetaBUTTON Beta
From server to GammaBUTTON Beta
...


Revision History