Phoenix Games
Operator API Endpoints

Fetch Round Bets

Retrieve every bet placed in a specific game round from Phoenix Games

Retrieve all bets placed in a single game round. Useful for resolving player disputes where the player references a round by the number shown in the game, or by the round_id Phoenix sent you in a deposit/rollback webhook.

This endpoint only applies to games that have a notion of rounds (for example Keno-style draw games). For games without rounds, use Fetch Bet with the individual bet id.

POST /api/v0.2/fetch-round-bets

Resolve a round and return all of its bets.

Authentication

All requests require the following headers:

HeaderTypeRequiredDescription
X-Operator-IdstringYesUnique identifier for the operator
X-SignaturestringYesBase64 URL-safe encoded RSA signature of the request body

Signature Verification

For POST requests:

  1. Sign the entire JSON request body as a string
  2. The value is signed using RSA-SHA256 with the operator's private key
  3. The signature is Base64 URL-safe encoded (no padding)
  4. The server verifies the signature using the operator's registered public key

Request Body

instance_id is always required. The round is identified by either round_no or round_id (supply one). If both are present, round_id wins.

By round number (the number the player sees in the game):

{
  "instance_id": "string",
  "round_no": 12345
}

By round id (the round_id Phoenix sends you in deposit / rollback webhooks):

{
  "instance_id": "string",
  "round_id": "string"
}

Field Descriptions

FieldTypeRequiredDescription
instance_idstringYesID of the game instance the round belongs to
round_nonumberConditionalThe round number shown to the player. Required if round_id is omitted. Always pair it with instance_id
round_idstringConditionalThe round_id Phoenix includes in deposit and rollback webhooks. Required if round_no is omitted

Response

Success Response (200 OK)

{
  "status": "OK",
  "round_id": "string",
  "round_no": 12345,
  "instance_id": "string",
  "game": "string",
  "bets": [
    {
      "status": "CLOSED",
      "reference_id": "string",
      "player_id": "string",
      "round_id": "string",
      "instance_id": "string",
      "game": "string",
      "wager": 10050,
      "won": 20000,
      "timestamp": 1234567890000
    }
  ]
}

Each entry in bets uses the same structure as the Fetch Bet response. The status field is one of CLOSED, OPEN, or ROLLED_BACK.

Top-Level Response Fields

FieldTypeDescription
statusstringOne of: OK, NOT_FOUND, BAD_REQUEST
round_idstringThe round identifier
round_nonumberThe round number shown to the player
instance_idstringID of the game instance
gamestringID of the game
betsarrayAll bets in the round. May be empty if no bets were placed

Per-Bet Fields

FieldTypeDescription
statusstringOne of: CLOSED, OPEN, ROLLED_BACK
reference_idstringUnique identifier of the bet (the bet id)
player_idstringID of the player who placed the bet
round_idstringThe round identifier
instance_idstringID of the game instance
gamestringID of the game
wagernumberBet amount in cents (divide by 100 for actual value)
wonnumberPayout in cents (divide by 100), present only for CLOSED bets
timestampnumberUnix timestamp in milliseconds

Not Found

{
  "status": "NOT_FOUND"
}

Bad Request

{
  "status": "BAD_REQUEST",
  "error": "Either round_id or round_no must be provided"
}

Special Cases

The endpoint returns NOT_FOUND in the following cases:

  • No round matches the supplied round_id, or instance_id + round_no
  • The round does not belong to the supplied instance_id
  • The round is older than 90 days

A round with no bets returns status: OK with an empty bets array.

Status Codes

  • 200 OK - Request processed successfully (including NOT_FOUND results)
  • 400 Bad Request - Neither round_id nor round_no supplied, or missing headers
  • 401 Unauthorized - Invalid operator or signature
  • 403 Forbidden - Operator account is inactive

Use Cases

  • Player dispute resolution from a round number on a screenshot
  • Reconciliation of all outcomes within a round
  • Audit trail verification for draw-based games