GameHistory
URl: https://{{gmag_game_data_url
}}/history/game?hash={{xxx}}.
Method: POST.
Purpose: This method returns the list of game histories which has been settled according to the game end time. If the player has not settled a game, the game history cannot be retrieved by this API.
The brand should call the GameHistory method in order to read data from a 30 minutes period that has been “recorded” in the past. Data is available on the GM-Ag system for up to 30 days. However, this has to be confirmed during the integration process. It is only possible to return up to 10,000 transactions in one API response.
GameHistory must use a specific API domain gmag_game_data_url
. For the real domain, please check the brand account information from GM-Ag.
If the pulled data has been pulled before, please update the previous data according to the roundid, each roundid only retains one piece of data.
Request
Name | Type | Required | Description |
---|---|---|---|
startTime | String(32) | Yes | Date and time in GMT+0 timezone. |
endTime | String(32) | Yes | Date and time in GMT+0 timezone. |
size | Int | No | The number of transactions per page, default value = 5000. max = 10000 |
page | Int | No | The page number to retrieve, default value = 1. |
showAll | Int | No | 1 - include sub brand, 0 - no sub brand included, default: 0. |
roundId | String(64) | No | To get game history for a specific game round. |
playerId | String(24) | No | To get game history for a specific player |
providerCode | String(32) | No | To get game history of specific game provider |
currency | String(8) | No | To get game history of specific currency |
gameCode | String(63) | NO | To get game history of specific game |
Response
Name | Type | Required | Description |
---|---|---|---|
total | Int | Yes | The total number of transactions. |
pages | Int | Yes | The total pages of transactions. |
size | Int | Yes | The number of transactions per page. |
current | Int | No | The number of current page. |
records | Array | Yes | Array of GameHistory, it could be empty. |
GameHistory
Name | Type | Required | Description |
---|---|---|---|
brandId | bigInt | Yes | The unique ID of an brand. |
playerId | String(24) | Yes | The Player’s unique identifier. |
providerCode | String(32) | Yes | The code of a Game Provider. |
sessionId | String(32) | Yes | The unique ID of a game session. |
roundId | String(127) | Yes | The unique identifier of the round. |
gameCode | String(32) | Yes | The game code of the transaction. |
currency | String(8) | Yes | The currency code of the transaction. |
platform | String(16) | No | The client platform where the game is launched. (web, mobile, download) |
bets | numeric(16, 4) | Yes | The amount of the bet. |
wins | numeric(16, 4) | Yes | The amount of the win. |
cancels | numeric(16, 4) | No | The amount of canceled credit. |
transIn | numeric(16, 4) | No | The amount transfered to game. |
transOut | numeric(16, 4) | No | The amount transfered to player. |
balanceEnd | numeric(16, 4) | Yes | The balance when the round ended. |
bonusBalanceEnd | numeric(16, 4) | No | The bonus balance when the round ended. |
rake | numeric(16, 4) | No | The amount of the rake. |
startTime | DateTime | Yes | The start time of the round. |
endTime | DateTime | Yes | The end time of the round. |
jpc | numeric(16, 4) | No | The amount of jackpot contribution. |
jpw | numeric(16, 4) | No | The amount of jackpot win when transType = ‘win’. |
jpDetails | text | No | The detailed information of the jackpot, eg. id. |
roundType | String(16) | Yes | The type of the game round. (normal, freegame, bonusgame) |
roundStatus | String(8) | Yes | The status of the game round. |
additionalData | text | No | The additinal parameters and value of the transaction. |
detailUrl | String(1024) | No | The linke of the game details. |
gameType | String(16) | Yes |
|
createdAt | DateTime | Yes | Created at date time |
Request example
{
"requestId": "requestId1234",
"brandId": "1001",
"startTime": "2021-06-10 10:00:00",
"endTime": "2021-06-10 10:05:00",
"size": 1000,
"page": 1,
}
Response example
//success
{
"requestId": "request5282",
"error": "0",
"message": "SUCCESS",
"total": 2,
"current": 1,
"size": 5000,
"pages": 1,
"records": [
{
"playerId": "palyerid1",
"brandId": 1001,
"providerCode": "pt",
"sessionId": "03d35793716348cabf5a202ef823a86f",
"roundId": "583067326075",
"roundType": "normal",
"roundStatus": "end",
"gameCode": "bfb",
"currency": "CNY",
"platform": "web",
"bets": 5.0000,
"wins": 10.0000,
"cancels": 0.0000,
"transIn": 0.0000,
"transOut": 0.0000,
"balanceEnd": 2652.0500,
"bonusBalanceEnd": 0.0000,
"rake": 0.0000,
"startTime": "2021-08-11 15:48:23.745",
"endTime": "2021-08-11 15:48:24.038",
"createdAt": "2021-08-11 15:48:24.038",
"jpc": 0.1235,
"jpw": 5.0000,
"jpDetails": [
{
"id": "123124",
"contribution": 0.12345,
"win": 0.12345
}
],
"gameType": "slots",
"detailUrl": "https://extstg3-cashier01.ptstaging.eu/getgamehistory.php?ThisIsJustAutomatedTestDataOK"
},
{
"playerId": "palyerid1",
"brandId": 1001,
"providerCode": "pt",
"sessionId": "03d35793716348cabf5a202ef823a86f",
"roundId": "398521759399",
"roundType": "normal",
"roundStatus": "end",
"gameCode": "bfb",
"currency": "CNY",
"platform": "web",
"bets": 5.0000,
"wins": 10.0000,
"cancels": 0.0000,
"transIn": 0.0000,
"transOut": 0.0000,
"balanceEnd": 2657.0500,
"bonusBalanceEnd": 0.0000,
"rake": 0.0000,
"startTime": "2021-08-11 15:48:24.342",
"endTime": "2021-08-11 15:48:24.870",
"createdAt": "2021-08-11 15:48:24.870",
"jpc": 0.0000,
"jpw": 0.0000,
"gameType": "slots",
"detailUrl": "https://extstg3-cashier01.ptstaging.eu/getgamehistory.php?ThisIsJustAutomatedTestDataOK"
}
]
}
//error
{
"requestId": "requestId1234",
"error": "P_02",
"message": "Invalid hash",
}