Query Bet Logs (Paginated)
Query bet records within a specified time range using different offsets to retrieve different data. Each request returns a maximum of 5,000 records.
API Information
- URL:
POST /v2/betlogs/offset - 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",
"offset": 0
}
Encrypted Request Body
{
"cipherText": "G0ZMDELeJwx+7JcIfIFOLJjkSzANPu6krGM2uw==..."
}
| Field | Type | Required | Description |
|---|---|---|---|
startDate | string | Yes | Start time (ISO 8601 format) |
endDate | string | Yes | End time (ISO 8601 format) |
betSourceId | string | No | Transaction source code |
offset | number | Yes | Offset value; use 0 for the first query, then increment by 5,000 for subsequent queries |
Response
Success Response
{
"code": 0,
"message": "No error.",
"data": {
"rows": [
{
"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
},
{
"betTime": "2025-12-09T09:05:10.182Z",
"txTime": "2025-12-09T09:05:10.182Z",
"currency": "THB",
"brand": "VP",
"gameCode": "VP_230003_1",
"username": "apitest012",
"roundId": "7652711103511980000",
"transferId": "7652711103511980000",
"betId": "7652711103511980000",
"betStatus": 2,
"actualBetAmt": "1.000000",
"validBetAmt": "1.000000",
"winAmt": "0.000000",
"jackpotWin": "0.000000",
"jackpotContribute": "0.000000",
"betSourceId": 1
}
],
"totalRowsNumber": 29999
},
"logUUID": "88825f91-719d-495f-b7a0-58c442d8e985"
}
Response Field Description
| Field | Type | Description |
|---|---|---|
data.rows[].betTime | string | Bet time |
data.rows[].txTime | string | Settlement time |
data.rows[].currency | string | Currency |
data.rows[].brand | string | Brand, fixed as 'VP' |
data.rows[].gameCode | string | Game Code |
data.rows[].username | string | Player Account |
data.rows[].roundId | string | Game Round ID, not unique (defaults to transferId) |
data.rows[].transferId | string | Transaction ID, unique to VP (planned for removal) |
data.rows[].betId | string | Bet ID, unique to VP |
data.rows[].betStatus | number | Bet Status (2=Settled) |
data.rows[].actualBetAmt | string | Actual Bet Amount |
data.rows[].validBetAmt | string | Valid Bet Amount |
data.rows[].winAmt | string | Winning Amount |
data.rows[].jackpotWin | string | Jackpot winning amount, current JP value=0, reserved field |
data.rows[].jackpotContribute | string | Jackpot contribution amount, current JP value=0, reserved field |
data.rows[].betSourceId | number | Transaction source code |
data.totalRowsNumber | number | Total number of records |
Error Response
When the request fails, the corresponding error code will be returned.
Error Codes
| Code | Description | Handling Suggestion |
|---|---|---|
| 11 | Parameters error | Please ensure the request parameters are complete and correctly formatted. The time range must be within 1 minute and within the past 40 days, and the settlement time must be at least 1 minute before the current time |
| 77 | Too many request | Request rate too high, 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
- Call Rate: Limited to 15 requests per second per agentId
- Time Range: The maximum time range per query is 1 minute
- Time Restriction:
startDateandendDatecannot exceed the current time, andendDatemust be at least 1 minute before the current time - Historical Range: Records can be queried within the past 40 days
- Records per Request: A maximum of 5,000 records are returned per request. If the total exceeds 5,000, use a loop with different offset values to fetch in batches