An Operator can use this particular API to get reports about their players gaming patterns and behaviors in blocks of 5 minutes.

Request

API URL : {NagaGamesAPIDomain}/operator/bet/consolidated-bet-history
HTTP Method : GET

URL Parameters:

Parameter NameDescriptionTypeRequired
apiKeyAPI Key of the brandStringYes
startDateTimeThe start date and time from which operators want to view the bet history
For example:
Date and time in UTC - YYYY-MM-DDTHH:MM:SSUTCZ
2023-05-22T03:17:35Z = 20230522T031735Z
For Time Zones refer - https://en.m.wikipedia.org/wiki/Time_zone
DateYes
endDateTimeThe end date and time to which operators want to view the bet history (endDateTime must be within 24 hours from startDateTime )
For example:
Date and time in UTC - YYYY-MM-DDTHH:MM:SSUTCZ
2023-05-23T08:00:35Z = 20230523T080035Z
For Time Zones refer - https://en.m.wikipedia.org/wiki/Time_zone
DateYes
limitLimit on the number of records (max: 100) for one pageIntegerOptional
pageThe number of that specific page that operator want to get the records from. ( Default Page is 1 )IntegerOptional

Example

curl --location 'https://api.stg.game.topplatform.asia/operator/bet/consolidated-bet-history?apiKey=2c27819b6c04408d6a051a01971da9781dbadffe1a588b4b351bef144c5caa1e&startDateTime=2023-05-03T10%3A00%3A00.000Z&endDateTime=2023-05-03T23%3A15%3A59.999Z&limit=10&page=1' \
--header 'accept: application/json'

Response

For examples:

  • If player "A" spins 100 rounds within 12:00:00 to 12:04:59, API will only return one records for this player.
  • If player "A" stays and play in the game for half an hour, and play every minute (12:00:00 to 12:29:59).
    When the query time range is 12:00:00 to 12:29:59, this API will return 6 records for this player since the bet records are grouped into batches.
    Batch 1: 12:00:00 to 12:04:59
    Batch 2: 12:05:00 to 12:09:59
    Batch 3: 12:10:00 to 12:14:59
    Batch 4: 12:15:00 to 12:19:59
    Batch 5: 12:20:00 to 12:24:59
    Batch 6: 12:25:00 to 12:29:59

Body Parameters:

JSON Array

NameDescriptionData Type
playerIdUnique ID of the playerString (length: 255)
nativeIdIdentifier of the player in Operator’s systemString (length: 255)
batchesContains set of details in a bacthJSON Array
countNumber of players having bet in the time range of the current pageInteger
totalTotal number of players having bet in the time range for all pagesInteger
pageCurrent page numberInteger
pageCountTotal number of pagesInteger

batches JSON Array

NameDescriptionData Type
idUnique ID of a batchString
totalBetTotal bet in a batchInteger
totalBetAmountThe total amount of the bets in a batchDecimal (20,4)
totalEarnAmountTotal earn from bets in a batchDecimal (20,4)
totalWinAmountTotal win amount from bets in a bacthDecimal (20,4)
firstBetTimeInBatchTime of the first bet in a batchDateTime
lastBetTimeInBatchTime of the last bet in a batchDateTime

Example

Success Response Example (HTTP status code 200)

{
  "data": [
    {
      "playerId": "64f16162-6659-4aa2-a80f-3f78cc084903",
      "nativeId": "user_RK2",
      "batches": [
        {
          "id": "1683136800_64f16162-6659-4aa2-a80f-3f78cc084903",
          "currency": "EUR",
          "totalBet": 18,
          "totalBetAmount": 300,
          "totalEarnAmount": 391,
          "totalWinAmount": 91,
          "firstBetTimeInBatch": "2023-05-03T18:02:42.174Z",
          "lastBetTimeInBatch": "2023-05-03T18:03:48.674Z"
        },
        {
          "id": "1683137100_64f16162-6659-4aa2-a80f-3f78cc084903",
          "currency": "EUR",
          "totalBet": 9,
          "totalBetAmount": 300,
          "totalEarnAmount": 212,
          "totalWinAmount": -88,
          "firstBetTimeInBatch": "2023-05-03T18:09:17.855Z",
          "lastBetTimeInBatch": "2023-05-03T18:09:57.341Z"
        },
        {
          "id": "1683137400_64f16162-6659-4aa2-a80f-3f78cc084903",
          "currency": "EUR",
          "totalBet": 3,
          "totalBetAmount": 0,
          "totalEarnAmount": 0,
          "totalWinAmount": 0,
          "firstBetTimeInBatch": "2023-05-03T18:10:01.644Z",
          "lastBetTimeInBatch": "2023-05-03T18:10:06.250Z"
        }
      ]
    },
    {
      "playerId": "ef6d653c-1c45-4dd0-af68-7078ab7f582f",
      "nativeId": "VND_Stage_1",
      "batches": [
        {
          "id": "1683109800_ef6d653c-1c45-4dd0-af68-7078ab7f582f",
          "currency": "VND",
          "totalBet": 7,
          "totalBetAmount": 385000,
          "totalEarnAmount": 48250,
          "totalWinAmount": -336750,
          "firstBetTimeInBatch": "2023-05-03T10:32:33.461Z",
          "lastBetTimeInBatch": "2023-05-03T10:34:47.993Z"
        },
        {
          "id": "1683110100_ef6d653c-1c45-4dd0-af68-7078ab7f582f",
          "currency": "VND",
          "totalBet": 11,
          "totalBetAmount": 0,
          "totalEarnAmount": 112000,
          "totalWinAmount": 112000,
          "firstBetTimeInBatch": "2023-05-03T10:35:08.681Z",
          "lastBetTimeInBatch": "2023-05-03T10:36:20.133Z"
        }
      ]
    }
  ],
  "count": 2,
  "total": 2,
  "page": 1,
  "pageCount": 1
}

Fail Response Examples (HTTP status code 400)

{
    "statusCode": 400,
    "message": [
        "startDateTime and endDateTime cannot exceed one day"
    ],
    "error": "Bad Request"
}
{
    "statusCode": 400,
    "message": [
        "startDateTime must be a Date instance",
        "startDateTime should not be empty",
        "endDateTime must be a Date instance",
        "maximal allowed date for endDateTime is Fri Mar 31 2023 05:02:15 GMT+0000 (Coordinated Universal Time)",
        "endDateTime should not be empty"
    ],
    "error": "Bad Request"
}
{
    "statusCode": 400,
    "error": "Bad Request",
    "message": [
        "apiKey should not be empty"
    ]
}

Fail Invalid API Key Example( HTTP status code 401)

{
    "statusCode": 401,
    "message": "Unauthorized"
}
Language
Click Try It! to start a request and see the response here!