Skip to content
Back office

Game Log

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

Markdown

Endpoint

POST https://api.nexusggr.com

Request Body

JSON
{
  "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
}
KeyTypeDescription
methodstringThe method type(get_game_log)
agent_codestringThe agent's code
agent_tokenstringThe agent's authentication token
user_code1stringThe user's code
game_type2stringThe type of game for which the log is being retrieved.
startstringThe start date and time for the search in the format yyyy-MM-dd HH:mm:ss.
endstringThe end date and time for the search in the format yyyy-MM-dd HH:mm:ss.
pageintegerThe page number for pagination (used for multiple results). Starts at 0.
perPageintegerThe number of records to return per page (maximum 1,000,000).

Success Response

KeyTypeDescription
statusinteger (32-bit)The response status. 1 means success.
codeinteger (32-bit)The response code. 7777777 means success.
msgstringThe response message. SUCCESS on success.
total_countinteger (32-bit)The total number of logs that match the query criteria.
pageinteger (32-bit)The current page number of the results.
perPageinteger (32-bit)The number of records returned per page (as per the request).
slotarrayA list of game transaction logs matching the request, with each log entry containing transaction details. The key is the game_type sent in the request.

Transaction Log Details (Inside slot array):

KeyTypeDescription
history_idinteger (64-bit)The unique ID of the transaction history entry.
agent_codestringThe code of the agent who processed the transaction.
user_codestringThe code of the user who made the transaction.
provider_codestringThe code of the game provider.
game_codestringThe unique game identifier (e.g., vs20doghouse).
typestringThe type of transaction (e.g., BASE, FREE).
bet_moneydoubleThe amount of money bet by the user.
win_moneydoubleThe amount of money won by the user.
txn_idstringThe unique transaction ID. In Seamless mode, the txn_id your site endpoint received for this transaction (txn_id_v2 for a transaction before October 15, 2026) (see Transaction (Site Endpoint)).
txn_typestringThe type of transaction (e.g., debit_credit)
user_start_balancedoubleThe user's balance before the transaction.
user_end_balancedoubleThe user's balance after the transaction.
agent_start_balancedoubleThe agent's balance before the transaction.
agent_end_balancedoubleThe agent's balance after the transaction.
created_atstringThe date and time when the transaction was created.

Example Success Response

JSON
{
  "status": 1,
  "code": 7777777,
  "msg": "SUCCESS",
  "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

JSON
{
    "status": 0,
    "code": 7770400,
    "msg": "perPage must be less than or equal to 1000000"
}

Explanation:

KeyTypeDescription
statusinteger (32-bit)Indicates the response status. A value of 0 indicates a failure.
codeinteger (32-bit)The response code. In this case, 7770400 indicates an invalid parameter was provided.
msgstringA brief message describing the error. In this case, it names the invalid parameter and the specific issue.
  1. If not specified, the API will return the entire transaction history for the agent.
  2. slot for slot games, live for live casino; any other value returns sports transactions