Game History

This is an API used to retrieve the game log for a specific user or agent, including transaction details for a specified time range.

Endpoint

POST https://{API_ENDPOINT}

Request Body

{
  "method": "get_game_log",
  "agent_code": "testAgent",
  "agent_token": "41f5cc794aef2b138c715cf25f767cc1",
  "user_code": "tsetAgent",
  "game_type": "slot",
  "start": "2021-09-17 00:00:00",
  "end": "2021-09-17 23:59:00",
  "page": 0,
  "perPage": 1000
}
Key
Type
Description

method

string

The method type(get_game_log)

agent_code

string

The agent's code

agent_token

string

The agent's authentication token

string

The user's code

string

The type of game for which the log is being retrieved.

start

string

The start date and time for the search in the format yyyy-MM-dd HH:mm:ss.

end

string

The end date and time for the search in the format yyyy-MM-dd HH:mm:ss.

page

integer

The page number for pagination (used for multiple results).

perPage

integer

The number of records to return per page (maximum 1,000,000).

Success Response

Key
Type
Description

status

integer (32-bit)

The response status. 1 means success.

total_count

integer (32-bit)

The total number of logs that match the query criteria.

page

integer (32-bit)

The current page number of the results.

perPage

integer (32-bit)

The number of records returned per page (as per the request).

slot

array

A list of game transaction logs matching the request, with each log entry containing transaction details.

Transaction Log Details (Inside slot array):

Key
Type
Description

history_id

integer (64-bit)

The unique ID of the transaction history entry.

agent_code

string

The code of the agent who processed the transaction.

user_code

string

The code of the user who made the transaction.

provider_code

string

The code of the game provider.

game_code

string

The unique game identifier (e.g., vs20doghouse).

type

string

The type of transaction (e.g., BASE, FREE).

bet_money

double

The amount of money bet by the user.

win_money

double

The amount of money won by the user.

txn_id

string

The unique transaction ID.

txn_type

string

The type of transaction (e.g., debit_credit)

user_start_balance

double

The user's balance before the transaction.

user_end_balance

double

The user's balance after the transaction.

agent_start_balance

double

The agent's balance before the transaction.

agent_end_balance

double

The agent's balance after the transaction.

created_at

string

The date and time when the transaction was created.

Example Success Response

{
  "status": 1,
  "total_count": 340,
  "page": 0,
  "perPage": 1000,
  "slot": [
    {
      "history_id": 777,
      "agent_code": "admin",
      "user_code": "test",
      "provider_code": "PRAGMATIC",
      "game_code": "vs20doghouse",
      "type": "BASE",
      "bet_money": 2000,
      "win_money": 0,
      "txn_id": "64a83f2fc597acc9004eec52c3f84c30",
      "txn_type": "debit_credit",
      "user_start_balance": 230500,
      "user_end_balance": 228500,
      "agent_start_balance": 22092000,
      "agent_end_balance": 22092000,
      "created_at": "2021-09-17T12:50:42.000Z"
    },
    ...
  ]
}

Failure Response Example

{
    "status": 0,
    "msg": "Invalid Parameter.",
    "detail": "perPage must be less than or equal to 1000000"
}

Explanation:

Key
Type
Description

status

integer (32-bit)

Indicates the response status. A value of 0 indicates a failure.

msg

string

A brief message describing the error. In this case, Invalid Parameter. indicates an invalid parameter was provided.

detail

string

A more detailed message explaining the specific issue.

Last updated