get https://api.stg.game.topplatform.asia/operator/bet/consolidated-bet-history
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 Name | Description | Type | Required |
---|---|---|---|
apiKey | API Key of the brand | String | Yes |
startDateTime | The 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 | Date | Yes |
endDateTime | The 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 | Date | Yes |
limit | Limit on the number of records (max: 100) for one page | Integer | Optional |
page | The number of that specific page that operator want to get the records from. ( Default Page is 1 ) | Integer | Optional |
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
Name | Description | Data Type |
---|---|---|
playerId | Unique ID of the player | String (length: 255) |
nativeId | Identifier of the player in Operator’s system | String (length: 255) |
batches | Contains set of details in a bacth | JSON Array |
count | Number of players having bet in the time range of the current page | Integer |
total | Total number of players having bet in the time range for all pages | Integer |
page | Current page number | Integer |
pageCount | Total number of pages | Integer |
batches JSON Array
Name | Description | Data Type |
---|---|---|
id | Unique ID of a batch | String |
totalBet | Total bet in a batch | Integer |
totalBetAmount | The total amount of the bets in a batch | Decimal (20,4) |
totalEarnAmount | Total earn from bets in a batch | Decimal (20,4) |
totalWinAmount | Total win amount from bets in a bacth | Decimal (20,4) |
firstBetTimeInBatch | Time of the first bet in a batch | DateTime |
lastBetTimeInBatch | Time of the last bet in a batch | DateTime |
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"
}