get https://api.stg.game.topplatform.asia/operator/bet/get-bet-stats-by-brand
Using this method, Operators can get the stats of bet count, bet amount, total win lose and consolidated currency code from the Naga Games system.
Request
API URL : {NagaGamesAPIDomain}/operator/bet/get-bet-stats-by-brand
HTTP Method : GET
URL Parameters:
Parameter Name | Description | Type | Required |
---|---|---|---|
apiKey | API key of the brand | String | Yes |
startDateTime | Operators can specify the start date and time to view the bet history. The end time must fall within 24 hours of the end date, and it should be an even number (e.g., 00:00:00.000Z). For example: Date and time in UTC - YYYY-MM-DDTHH:00:00.000Z 2023-05-22T00:00:00.000Z = 20230522T000000Z For Time Zones refer - https://en.m.wikipedia.org/wiki/Time_zone | Date | Yes |
endDateTime | Operators can specify the end date and time to view the bet history. The end time must fall within 24 hours of the end date, and it should be an even number (e.g., 08:00:00.000Z). For example: Date and time in UTC - YYYY-MM-DDTHH:00:00.000Z 2023-05-22T08:00:00.000Z = 20230522T080000Z For Time Zones refer - https://en.m.wikipedia.org/wiki/Time_zone Special note: - If you wish to get data for the whole 1 day, you might specify the endDateTime at 00:00:00.000Z of next day. - For example, you query the data for 09 Dec 2023, you might set the date range as below: - startDateTime=2023-12-09T00:00:00.000Z - endDateTime=2023-12-10T00:00:00.000Z | Date | Yes |
consolidated | Consolidated currency code | String | Yes |
Example
curl --request GET \
--url 'https://api.stg.game.topplatform.asia/operator/bet/get-bet-stats-by-brand?apiKey=2c27819b6c04408d6a051a01971da9781dbadffe1a588b4b351bef144c5caa1e&startDateTime=2023-05-03T10%3A00%3A00.000Z&endDateTime=2023-05-03T23%3A15%3A59.999Z&consolidated=USD' \
--header 'accept: application/json'
Response
Body Parameters:
JSON Array
Name | Description | Data Type |
---|---|---|
betCount | Total bet count in the time range | Integer |
betAmount | Total bet amount in the time range | Number |
totalWinLose | Total win amount in the time range | Number |
consolidated | Consolidated currency code | String |
Example
Success Response Example (HTTP status code 200)
{
"data": {
"betCount": 48,
"betAmount": 15.42,
"totalWinLose": -8.99,
"consolidated": "USD"
}
}
Fail Response Examples (HTTP status code 400)
{
"statusCode": 400,
"message": [
"consolidated should not be empty",
"invalid currency code",
"startDateTime must be a Date instance",
"startDateTime should not be empty",
"endDateTime must be after startDateTime",
"endDateTime must be a Date instance",
"endDateTime should not be empty"
],
"error": "Bad Request"
}
{
"statusCode": 400,
"message": [
"startDateTime and endDateTime cannot exceed one day"
],
"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"
}