1. By Room
[Game] FairPlay API
  • Getting Started
    • Introduction
    • Session and Token
    • Request and Response
    • Real-time Events (SSE)
    • Lotto Rules — หวยเฮงเฮง
    • Provably Fair
  • Player
    • Demo
      • Demo Login
    • Player Bet History
      GET
  • Common
    • Game
      • By Game Code
        • Provably Fair
          • Set Client Seed
          • Verify Result
          • Get Revealed Server Seed
        • Check Session
        • Get Balance
        • Get Provably-Fair State
      • Lobby Game List
  • Wallet
    • Wallet Status
      GET
  • Game
    • Lotto (หวยเฮงเฮง)
      • Lotto Rules
      • Rooms
        • By Room
          • Join Round
            GET
          • Place Multi-player Bet
            POST
          • Get Round Result
            GET
          • Room Event Stream
            GET
      • Tickets
        • Create Ticket
        • Inquiry My Tickets
        • Get Ticket
      • Round
        • Get My Bets
        • Get My Result
        • Get Round Provably Fair
      • Results
        • Inquiry Results
      • Get Rooms
        GET
      • Get Current Round
        POST
      • Get Pay Table
        GET
  • Appendix
    • Game List
    • Error Codes
    • Rate Limits
  • Language List
    GET
  • Ping
    GET
  • Schemas
    • DemoLoginRequest
    • DemoLoginResponse
    • DemoProfileResponse
    • ProfileResponse
    • GetHistoryResponse
    • BetRecord
    • GameInfo
    • Room
    • GetGameResponse
    • BetRequest
    • Bet
    • BetResponse
    • BetResult
    • GetProvablyFairResponse
    • SetClientSeedRequest
    • SetClientSeedResponse
    • RotateServerSeedResponse
    • VerifyResultRequest
    • VerifyResultResponse
    • GetServerSeedResponse
    • GetStatusResponse
    • JoinRoundResponse
    • PlaceMultiPlayerBetRequest
    • PlaceBetResponse
    • RoundResultResponse
    • SuccessResponse
    • ErrorResponse
  1. By Room

Get Round Result

GET
/gapi/v1/g/lotto/rooms/{roomId}/result
Returns a round's status and, once settled, the revealed seed, the game result and the caller's own per-bet results and totals. Call it for a round the player bet in, after it closes.
Auth: Player session — Authorization: Bearer {token}
Rate limit: 300 requests per 60 s per IP (GAME_GET_ROUND_RESULT)
Games: LOTTO
Rules
System maintenance and Lotto's own maintenance window both answer 503 99915.
Query key is roundId (lower-case d); roundID is not read. The response key is roundID (capital ID).
Before settlement the response holds status, roundID, clientSeedSlots (MULTI_CSEED) and gameResult: null; seedHash is included. Result fields appear only when status is settled.
SSE round_settled is sent before the round is marked settled, so a call made the moment it arrives can still show rolling; retry briefly.
winAreas lists only the caller's winning bets as TYPE_NUMBER (e.g. 3-BOTTOM_123) and is absent when there are none.
A round with no bets still ends settled. A cancelled round (settlement failed, stakes refunded) answers cancelled with no results, and no SSE event is sent for it.
Money fields are decimal strings (betAmount, winAmount, totalBet, totalWin, netWin, balance); payoutRate is a JSON number.
balance is absent while the payout is queued or unconfirmed.
{roomId} is ignored: the round is found by roundId alone, and results are always the caller's own.
currency is accepted but not used; this route never answers 99919.
Flow
1.
Resolve {gameCode} and {roomId}; the roundId query is required.
2.
THAI-HILO: load the room; it must be active and not in SINGLE mode.
3.
Load the round from the caller's demo or real set (THAI-HILO serves a short-lived copy first, see rules).
4.
Not settled: return the status, roundID, seed slots and gameResult: null (LOTTO adds seedHash).
5.
Settled: derive the game result from the revealed seed and add winAreas, the caller's per-bet results, totals and balance.

Request

Path Params

Query Params

Header Params

Responses

🟢200OK
application/json
Bodyapplication/json

🟠400Bad Request
🟠401Unauthorized
🟠404Not Found
🟠429Too Many Requests
🔴500Internal Server Error
🔴503Service Unavailable
Request Request Example
Shell
JavaScript
Java
Swift
curl --location 'https://dev-api.ambfairgame.com/gapi/v1/gapi/v1/g/lotto/rooms/1/result?roundId=tbq1x0a7c3e91f2&currency=THB&token=tok_synthetic_7f3a9c' \
--header 'Authorization: Bearer 3f9a1c7e5b2d4f6081a3c5e7f9b1d3f5a7c9e1b3d5f7a9c1e3b5d7f9a1c3e5b7' \
--header 'Accept-Language: th'
Response Response Example
200 - LOTTO settled, caller won one item
LOTTO round settled; the caller placed two bets and one won.
{
    "code": "0",
    "description": "Success.",
    "traceID": "0f8e2c1a-6b3d-4e5f-9a7b-1c2d3e4f5a6b",
    "data": {
        "status": "settled",
        "roundID": "tbq1y2c9d04ab7e",
        "winAreas": [
            "3-BOTTOM_123"
        ],
        "seedHash": "3c8e1f0a9d7b5c2e4f6a8b0d1c3e5f7a9b2d4c6e8f0a1b3c5d7e9f2a4b6c8d0e",
        "seedRevealed": "default_LOTTO_2_1790769600123456789_560123_9b0e4d7a",
        "results": [
            {
                "type": "3-BOTTOM",
                "number": "123",
                "betAmount": "10",
                "payoutRate": 900,
                "winAmount": "9000",
                "isWin": true
            },
            {
                "type": "2-BOTTOM",
                "number": "07",
                "betAmount": "20",
                "payoutRate": 90,
                "winAmount": "0",
                "isWin": false
            }
        ],
        "totalBet": "30",
        "totalWin": "9000",
        "netWin": "8970",
        "balance": "18970",
        "gameResult": {
            "drawnNumber": "560123",
            "bottom5": "60123",
            "bottom4": "0123",
            "bottom3": "123",
            "bottom2": "23",
            "front2": "56",
            "runBot": [
                "1",
                "2",
                "3"
            ],
            "runFront": [
                "5",
                "6"
            ]
        }
    }
}
Modified at 2026-09-30 13:23:45
Previous
Place Multi-player Bet
Next
Room Event Stream
Built with