Using this method, Operator sends a Bet History request to the Naga Games to get list of bet records for a unique player or all players.

🚧

Please Note

Data response has a limit of 100 bets per request, using skip and limit parameters if want to get more bets.

Request

API URL : {NagaGamesAPIDomain}/client/player/bet-histories
HTTP Method : GET

URL Parameters

Parameter NameDescriptionTypeRequired
playerIdUnique identifier of the player, leave empty to get from all playersStringOptional
gameCodeCode of the gamestringOptional
skipThe number of skipped recordsint32Yes
limitLimit on the number of records (max: 100)int32Yes
startDateThe start date from which operators want to view the bet historydateYes
endDateThe end date to which operators want to view the bet history. endDate must be within 24 hours from startDatedateYes
apiKeyThe API key of the brandstringYes

Example

curl --request GET \
     --url 'https://api.stg.game.topplatform.asia/client/player/bet-histories?playerId=example_for_operator_seamless&gameCode=sweet-bonanza&skip=1&limit=100&startDate=2022-05-16T00%3A00%3A00.000Z&endDate=2022-05-17T00%3A00%3A00.000Z&apiKey=2c27819b6c04408d6a051a01971da9781dbadffe1a588b4b351bef144c5caa1e' \
     --header 'accept: application/json'

Response

Data Response

NameDescriptionData type
idThe unique identifier of the recordString (length: 36)
createdThe date and time when the record was createdDateTime
updatedThe date and time when the record was last updatedDateTime
amountThe amount of money the player betDecimal (20,4)
earnThe amount of money the player earnedDecimal (20,4)
parentBetIdThe parent bet unique identifierString (length: 255)
betSizeThe value of a coinDecimal (20,4)
betLevelThe number of coins per lineInteger
betStatusThe status of the bet.

- PENDING: Bet is in process on the Naga Games server.
- RESOLVED: Bet has been successfully completed by both the operator and Naga Games server.
- OPERATOR_UNKNOWN_ERROR: Naga Games server received an error from the operator, which resulted in marking the bet as an error.
- CANCELED: Bet is cancelled on both the operator and Naga Games server.
- PENDING_CANCELED: Bet is waiting for the operator server to call the API to cancel the bet
- PAYOUT_OPERATOR_ERROR: Naga Games server received an error on the Payout from the operator.
- PLACEBET_OPERATOR_ERROR: Naga Games server received an error on the PLACEBET from the operator
- PAYOUT_CHECK_FAIL: The Payout response from the operator was not valid, resulting in marking the bet as not valid.
- PLACEBET_CHECK_FAIL: The PLACEBET response from the operator was not valid, resulting in marking the bet as not valid.
-PLACEBET_RESOLVED: Bet has been successfully placed after calling the operator and receiving a valid response with a status 200
String (length: 255)
channelThe platform used by players, including PC, MobileString (length: 255)
game.idIdentifier of the game in Naga Games’s systemString (length: 36)
game.nameName of the gameString (length: 255)
game.codeCode of the game. For example: “mahjong”, “lucky-neko”, etcString (length: 255)
player.idThe player in Naga Games system.String (length: 36)
player.nativeIdIdentifier of the player in Operator’s systemString (length: 255)
currency.idThe currency id in Naga Games system.String (length: 36)
currency.nameThe name of currency in Naga Games system.String (length: 255)
currency.symbolThe currency symbol in Naga Games system.String (length: 255)
currency.codeThe currency code in Naga Games system.String (length: 255)
totalThe total number of recordsInteger

Example

Success Response Example (HTTP status code 200)

{
  "data": [
    {
      "id": "aaf0384e-aab1-b9c6-764f-8d53e8c27d43",
      "created": "2022-05-16T06:56:19.988Z",
      "updated": "2022-06-30T11:37:06.000Z",
      "amount": 10,
      "earn": 0,
      "betType": "NORMAL",
      "parentBetId": null,
      "betSize": 0.5,
      "betLevel": 1,
      "playerBalance": 10012.5,
      "betStatus": "RESOLVED",
      "channel": "PC",
      "game": {
        "id": "3e17189b-0eb7-523b-01fc-4f61c1fc2610",
        "name": "Sugary Bonanza",
        "code": "sweet-bonanza"
      },
      "player": {
        "id": "bce96cc7-1b8d-4604-a4ae-20fe28d88e60",
        "nativeId": "example_for_operator_seamless"
      },
      "currency": {
        "id": "727d3d98-6294-bf23-a4ad-963f5b06bf74",
        "name": "Thai baht",
        "symbol": "฿",
        "code": "THB"
      }
    },
    {
      "id": "eec42b77-362c-9183-3052-af939a247a79",
      "created": "2022-05-16T06:56:15.215Z",
      "updated": "2022-06-30T11:37:06.000Z",
      "amount": 10,
      "earn": 0,
      "betType": "NORMAL",
      "parentBetId": null,
      "betSize": 0.5,
      "betLevel": 1,
      "playerBalance": 10022.5,
      "betStatus": "RESOLVED",
      "channel": "PC",
      "game": {
        "id": "3e17189b-0eb7-523b-01fc-4f61c1fc2610",
        "name": "Sugary Bonanza",
        "code": "sweet-bonanza"
      },
      "player": {
        "id": "bce96cc7-1b8d-4604-a4ae-20fe28d88e60",
        "nativeId": "example_for_operator_seamless"
      },
      "currency": {
        "id": "727d3d98-6294-bf23-a4ad-963f5b06bf74",
        "name": "Thai baht",
        "symbol": "฿",
        "code": "THB"
      }
    },
    {
      "id": "5a225846-7b9e-efbb-dc37-b05f9e1c7eb6",
      "created": "2022-05-16T06:56:09.957Z",
      "updated": "2022-06-30T11:37:06.000Z",
      "amount": 10,
      "earn": 0,
      "betType": "NORMAL",
      "parentBetId": null,
      "betSize": 0.5,
      "betLevel": 1,
      "playerBalance": 10032.5,
      "betStatus": "RESOLVED",
      "channel": "PC",
      "game": {
        "id": "3e17189b-0eb7-523b-01fc-4f61c1fc2610",
        "name": "Sugary Bonanza",
        "code": "sweet-bonanza"
      },
      "player": {
        "id": "bce96cc7-1b8d-4604-a4ae-20fe28d88e60",
        "nativeId": "example_for_operator_seamless"
      },
      "currency": {
        "id": "727d3d98-6294-bf23-a4ad-963f5b06bf74",
        "name": "Thai baht",
        "symbol": "฿",
        "code": "THB"
      }
    },
    {
      "id": "fe227518-9194-5859-6951-a97b1bac20a3",
      "created": "2022-05-16T06:56:00.112Z",
      "updated": "2022-06-30T11:37:06.000Z",
      "amount": 10,
      "earn": 31,
      "betType": "NORMAL",
      "parentBetId": null,
      "betSize": 0.5,
      "betLevel": 1,
      "playerBalance": 10011.5,
      "betStatus": "RESOLVED",
      "channel": "PC",
      "game": {
        "id": "3e17189b-0eb7-523b-01fc-4f61c1fc2610",
        "name": "Sugary Bonanza",
        "code": "sweet-bonanza"
      },
      "player": {
        "id": "bce96cc7-1b8d-4604-a4ae-20fe28d88e60",
        "nativeId": "example_for_operator_seamless"
      },
      "currency": {
        "id": "727d3d98-6294-bf23-a4ad-963f5b06bf74",
        "name": "Thai baht",
        "symbol": "฿",
        "code": "THB"
      }
    },
    {
      "id": "fcdf212b-9612-2b23-29c1-bb03503b7c95",
      "created": "2022-05-16T06:55:55.330Z",
      "updated": "2022-06-30T11:37:06.000Z",
      "amount": 10,
      "earn": 0,
      "betType": "NORMAL",
      "parentBetId": null,
      "betSize": 0.5,
      "betLevel": 1,
      "playerBalance": 10021.5,
      "betStatus": "RESOLVED",
      "channel": "PC",
      "game": {
        "id": "3e17189b-0eb7-523b-01fc-4f61c1fc2610",
        "name": "Sugary Bonanza",
        "code": "sweet-bonanza"
      },
      "player": {
        "id": "bce96cc7-1b8d-4604-a4ae-20fe28d88e60",
        "nativeId": "example_for_operator_seamless"
      },
      "currency": {
        "id": "727d3d98-6294-bf23-a4ad-963f5b06bf74",
        "name": "Thai baht",
        "symbol": "฿",
        "code": "THB"
      }
    },
    {
      "id": "f528e48b-250b-1406-df13-71f855db5917",
      "created": "2022-05-16T06:55:43.212Z",
      "updated": "2022-06-30T11:37:06.000Z",
      "amount": 10,
      "earn": 64,
      "betType": "NORMAL",
      "parentBetId": null,
      "betSize": 0.5,
      "betLevel": 1,
      "playerBalance": 9967.5,
      "betStatus": "RESOLVED",
      "channel": "PC",
      "game": {
        "id": "3e17189b-0eb7-523b-01fc-4f61c1fc2610",
        "name": "Sugary Bonanza",
        "code": "sweet-bonanza"
      },
      "player": {
        "id": "bce96cc7-1b8d-4604-a4ae-20fe28d88e60",
        "nativeId": "example_for_operator_seamless"
      },
      "currency": {
        "id": "727d3d98-6294-bf23-a4ad-963f5b06bf74",
        "name": "Thai baht",
        "symbol": "฿",
        "code": "THB"
      }
    },
    {
      "id": "0d9f3794-8074-4ae2-ec37-4187f2a43b8e",
      "created": "2022-05-16T06:55:38.573Z",
      "updated": "2022-06-30T11:37:06.000Z",
      "amount": 10,
      "earn": 0,
      "betType": "NORMAL",
      "parentBetId": null,
      "betSize": 0.5,
      "betLevel": 1,
      "playerBalance": 9977.5,
      "betStatus": "RESOLVED",
      "channel": "PC",
      "game": {
        "id": "3e17189b-0eb7-523b-01fc-4f61c1fc2610",
        "name": "Sugary Bonanza",
        "code": "sweet-bonanza"
      },
      "player": {
        "id": "bce96cc7-1b8d-4604-a4ae-20fe28d88e60",
        "nativeId": "example_for_operator_seamless"
      },
      "currency": {
        "id": "727d3d98-6294-bf23-a4ad-963f5b06bf74",
        "name": "Thai baht",
        "symbol": "฿",
        "code": "THB"
      }
    },
    {
      "id": "fc71a3bf-c58f-d9d6-9d73-d29bb3ea411d",
      "created": "2022-05-16T06:55:34.793Z",
      "updated": "2022-06-30T11:37:06.000Z",
      "amount": 10,
      "earn": 0,
      "betType": "NORMAL",
      "parentBetId": null,
      "betSize": 0.5,
      "betLevel": 1,
      "playerBalance": 9987.5,
      "betStatus": "RESOLVED",
      "channel": "PC",
      "game": {
        "id": "3e17189b-0eb7-523b-01fc-4f61c1fc2610",
        "name": "Sugary Bonanza",
        "code": "sweet-bonanza"
      },
      "player": {
        "id": "bce96cc7-1b8d-4604-a4ae-20fe28d88e60",
        "nativeId": "example_for_operator_seamless"
      },
      "currency": {
        "id": "727d3d98-6294-bf23-a4ad-963f5b06bf74",
        "name": "Thai baht",
        "symbol": "฿",
        "code": "THB"
      }
    },
    {
      "id": "928f3dc0-f98b-d4c0-f5d1-9c947a63ea4c",
      "created": "2022-05-16T06:55:28.563Z",
      "updated": "2022-06-30T11:37:06.000Z",
      "amount": 10,
      "earn": 7.5,
      "betType": "NORMAL",
      "parentBetId": null,
      "betSize": 0.5,
      "betLevel": 1,
      "playerBalance": 9990,
      "betStatus": "RESOLVED",
      "channel": "PC",
      "game": {
        "id": "3e17189b-0eb7-523b-01fc-4f61c1fc2610",
        "name": "Sugary Bonanza",
        "code": "sweet-bonanza"
      },
      "player": {
        "id": "bce96cc7-1b8d-4604-a4ae-20fe28d88e60",
        "nativeId": "example_for_operator_seamless"
      },
      "currency": {
        "id": "727d3d98-6294-bf23-a4ad-963f5b06bf74",
        "name": "Thai baht",
        "symbol": "฿",
        "code": "THB"
      }
    },
    {
      "id": "5f71c67d-8cf4-294e-19f8-ed683a769d8e",
      "created": "2022-05-16T06:55:24.772Z",
      "updated": "2022-06-30T11:37:06.000Z",
      "amount": 10,
      "earn": 0,
      "betType": "NORMAL",
      "parentBetId": null,
      "betSize": 0.5,
      "betLevel": 1,
      "playerBalance": 10000,
      "betStatus": "RESOLVED",
      "channel": "PC",
      "game": {
        "id": "3e17189b-0eb7-523b-01fc-4f61c1fc2610",
        "name": "Sugary Bonanza",
        "code": "sweet-bonanza"
      },
      "player": {
        "id": "bce96cc7-1b8d-4604-a4ae-20fe28d88e60",
        "nativeId": "example_for_operator_seamless"
      },
      "currency": {
        "id": "727d3d98-6294-bf23-a4ad-963f5b06bf74",
        "name": "Thai baht",
        "symbol": "฿",
        "code": "THB"
      }
    }
  ],
  "total": 11
}

Failure Response Example (HTTP status code 400)

{
  "statusCode": 400,
  "message": [
    "apiKey should not be empty",
    "startDate should not be empty",
    "endDate should not be empty",
    "skip should not be empty",
    "limit should not be empty"
  ],
  "error": "Bad Request"
}
Language
Click Try It! to start a request and see the response here!