GameHistory() API

This API request enables the operator to get history of recent 100 game rounds played with real cash mode by default.

GameHistory() Request

TypeInput
HTTP MethodPOST
API URLhttps://<API_BASE_URL>/games/game-history/
Headers"Content-Type": "application/json"
POST Parametersjson object e.g.:
{
"api_key": "1pghjl4v5apt2bks",
"player_id": 1002,
"amount_type": "real",
"start_date": "2020-02-20 00:00:00",
"end_date": "2020-02-21 00:00:00",
"page_num": 1,
}
ParametersTypeDescription
api_keyStringAPI Key allocated to each front-end
player_idIntegerPlayer ID of the player known to the Operator
amount_typeStringMode of Play
For Example: ‘real’ – when playing with real cash ‘freespins’ – when playing with promo freespins
start_dateStringEnd date time in the following format “YYYY-MM-DD HH:MM:SS”
end_dateStringEnd date time in the following format “YYYY-MM-DD HH:MM:SS”
page_numIntegerPage number

GameHistory() Response + Example

Response would be in JSON format. Type: dictionary.

{
	"game_history": {
		"headers": [
			"game_name",
			"round_id",
			"bet_amount",
			"win_amount",
			"amount_type",
			"timestamp"
		],
		"data": [
			[
				"Test Game Name-1",
				1001,
				100,
				100,
				"real",
				"2019-07-23 17:20:57"
			],
			[
				"Test Game Name-2",
				1002,
				100,
				100,
				"real",
				"2019-07-23 17:20:57"
			],
			[
				"Test Game Name-3",
				1003,
				100,
				100,
				"real",
				"2019-07-23 17:20:57"
			]
		]
	}
}
Object/Key in Response ObjectTypeDescription
game_historyJSON ObjectKey game_history contains the JSON object as value. Contains 2 keys. Value of each is a list
game_history[‘headers’]JSON ListTable headers
game_nameStringName of the game
round_idIntegerRound of each game played
bet_amountIntegerBet amount of the round in cents
win_amountIntegerWin amount of the round in cents
amount_typeStringMode using which game was played
timestampStringServer UTC time game played at
game_history[‘data’]JSON List of ListsList of Lists of game rounds data