Skip to main content

Query Bet Logs

Query bet records within a specified time range.

API Information

  • URLPOST /v2/betlogs
  • Authentication:Bearer Token
  • Encryption:Requests are encrypted using AES-256-GCM; responses are returned as plaintext JSON

request

Request Headers

POST /v2/betlogs HTTP/1.1
Host: api.example.com
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
x-agentid: integratorNBTest04
x-timestamp: 1769746894501
x-nonce: 4ff08bc2a45c6b38068dbcd24296a25b
x-signature: c25f8d23704373e8776cce6d9b10f1fde091c34db80d60523c7e04ff30e54633

Request Parameters

Parameters Before Encryption

{
"startDate": "2026-01-21T07:20:00Z",
"endDate": "2026-01-21T07:20:00Z",
"betSourceId": "0"
}

Encrypted Request Body

{
"cipherText": "G0ZMDELeJwx+7JcIfIFOLJjkSzANPu6krGM2uw==..."
}
FieldTypeRequiredDescription
startDatestringYesStart time (ISO 8601 format)
endDatestringYesEnd time (ISO 8601 format)
betSourceIdstringNoTransaction Source Code

Response

Success Response

{
"code": 0,
"message": "No error.",
"data": [
{
"betTime": "2025-12-09T09:05:10.151Z",
"txTime": "2025-12-09T09:05:10.151Z",
"currency": "THB",
"brand": "VP",
"gameCode": "VP_230001_1",
"username": "apitest011",
"roundId": "7652711103511700000",
"transferId": "7652711103511700000",
"betId": "7652711103511700000",
"betStatus": 2,
"actualBetAmt": "0.500000",
"validBetAmt": "0.500000",
"winAmt": "0.360000",
"jackpotWin": "0.000000",
"jackpotContribute": "0.000000",
"betSourceId": 1
}
],
"logUUID": "88825f91-719d-495f-b7a0-58c442d8e985"
}

Response Field Description

FieldTypeDescription
data[].betTimestringBet Time
data[].txTimestringSettlement Time
data[].currencystringCurrency
data[].brandstringBrand, fixed as 'VP'
data[].gameCodestringGame Code
data[].usernamestringPlayer Account
data[].roundIdstringGames Round ID, non-unique value (default equals transferId)
data[].transferIdstringTransaction ID, unique VP value (expected to be removed)
data[].betIdstringBet ID, unique VP value
data[].betStatusnumberBet Status (2=Settled)
data[].actualBetAmtstringActual Bet Amount
data[].validBetAmtstringValid Bet Amount
data[].winAmtstringWin Amount
data[].jackpotWinstringJackpot Win Amount, current JP value = 0, default Field
data[].jackpotContributestringJackpot Contribution Amount, current JP value = 0, default Field
data[].betSourceIdnumberTransaction Source Code

Error Response

When the request fails, the corresponding error code will be returned.

Error Codes

CodeDescriptionHandling Suggestion
11Parameters errorPlease ensure the request parameters are complete and correctly formatted, time range must be within 10 minutes and within the last 40 days
77Too many requestToo many requests, please try again later

Error Response Example

Parameters error

{
"code": 11,
"message": "Parameters error",
"logUUID": "24cdc3b9-9fe8-44de-8391-a96863e46954"
}

Too many requests

{
"code": 77,
"message": "Too many request, please try again later",
"logUUID": "asdsaggderv"
}

Important Notes

  1. Call Frequency: Each agentId is limited to once every 3 seconds
  2. Time Range: The maximum settable time Range for a single query is 10 minutes
  3. Time Limit: startDate and endDate must not be set beyond the current time
  4. Historical Range: Historical record query range is within 40 days