1. Lotto (หวยเฮงเฮง)
[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
          • Place Multi-player Bet
          • Get Round Result
          • Room Event Stream
      • 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. Lotto (หวยเฮงเฮง)

Get Rooms

GET
/gapi/v1/g/lotto/rooms
Lists the active LOTTO rooms serving the player's session currency, each with its open round, last result and lucky number. Used by the หวยเฮงเฮง room list screen.
Auth: Player session — Authorization: Bearer {token}
Rate limit: 300 requests per 60 s per IP (LOTTO_GET_ROOMS)
Games: LOTTO
Rules
Lotto only: the route is under /g/lotto, so system maintenance and Lotto's own maintenance window both answer 503 99915.
The currency comes from the session only; there is no filter parameter.
Rooms are sorted by sortOrder, then roomId, ascending. rooms is [] when none.
currentRound, lastResult and lucky are always present as keys and are null when empty, never omitted.
currentRound is null until the server opens a round for the room + currency.
lastResult and lucky are filled only when the game's lucky-number feature is on; with it off both are null even when the room has results.
Keys are roomId and roundId (lower-case d); the shared room endpoints (…/rooms/{roomId}/round) spell the round key roundID.
closeAt is RFC3339 UTC; betting closes then.
No room mode, client-seed slot count or bet limits here; limits come from GET …/pay-table.
name follows Accept-Language (then the session language, then English).
Flow
1.
Accept LOTTO only; check the session was not opened for another game.
2.
Check the game is available.
3.
List the active rooms serving the session currency, sorted.
4.
For each room: when the lucky feature is on, add the last settled number and the lucky number; add the open round (betting / rolling) if any.
5.
Return rooms.

Request

Query Params

Header Params

Responses

🟢200OK
application/json
Bodyapplication/json

🟠400Bad Request
🟠401Unauthorized
🟠403Forbidden
🟠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?token=8d0c6a4e2b9f4f1c9a7e3b5d1c2e4f60' \
--header 'Authorization: Bearer 3f9a1c7e5b2d4f6081a3c5e7f9b1d3f5a7c9e1b3d5f7a9c1e3b5d7f9a1c3e5b7' \
--header 'Accept-Language: th'
Response Response Example
200 - Two rooms
One room with an open round and the lucky feature on; one room with no round open yet.
{
    "code": "0",
    "description": "Success.",
    "traceID": "0f8e2c1a-6b3d-4e5f-9a7b-1c2d3e4f5a6b",
    "data": {
        "rooms": [
            {
                "roomId": 1,
                "roomCode": "LOTTO-ROOM-1",
                "name": "ห้องหวย 1",
                "isRecommended": true,
                "sortOrder": 1,
                "roundDurationSec": 900,
                "currentRound": {
                    "roundId": "tm64903fa91c2e",
                    "status": "betting",
                    "closeAt": "2026-09-30T08:15:00Z"
                },
                "lastResult": {
                    "number": "482917"
                },
                "lucky": {
                    "number": "17",
                    "multiplier": 4,
                    "rate": 360
                }
            },
            {
                "roomId": 2,
                "roomCode": "LOTTO-ROOM-2",
                "name": "ห้องหวย 2",
                "isRecommended": false,
                "sortOrder": 2,
                "roundDurationSec": 120,
                "currentRound": null,
                "lastResult": null,
                "lucky": null
            }
        ]
    }
}
Modified at 2026-09-30 13:23:45
Previous
Inquiry Results
Next
Get Current Round
Built with