Query Game Records
curl --request GET \
--url https://api.example.com/api/v1/dt/betsimport requests
url = "https://api.example.com/api/v1/dt/bets"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/v1/dt/bets', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/v1/dt/bets",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/v1/dt/bets"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/api/v1/dt/bets")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/dt/bets")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"code": 0,
"msg": "Success",
"error": {
"uuid": "973ff058-54e9-4c8b-8c6c-6fecb76a13bb"
},
"pageindex": 6,
"pagesize": 300,
"pagetotal": 50,
"totalrecord": 15000,
"records": [
{
"consumption": "500",
"createtime": 1763716819,
"ordernumber": "TIPS251121172018lobby2-0000001",
"playtype": 9,
"type": 2,
"username": "player001",
"room_account": "9D",
"room_name": "9d01"
},
{
"betamount": "3000",
"betincome": "3000",
"betreward": "6000",
"betscore": "3000",
"createtime": 1763716799,
"gamecode": "9D1425B211DT",
"gametype": "BAC",
"ordernumber": "9D14251121171959020000013",
"playtype": 2,
"reckontime": 1763716821,
"status": 1,
"table": "9D14",
"type": 1,
"username": "player001",
"rolling_amount": "3000",
"room_account": "BYTRP",
"room_name": "TRP01"
}
]
}{
"error": {
"code": 2,
"msg": "request hash signature(0FACF22B9E3DB5CDC670A0F7A65BB76A) is error",
"uuid": "9e96610f-5388-42df-b3ed-ba1b3178c63b"
}
}Game API
Query Bet Records
Query betting records
GET
/
api
/
v1
/
dt
/
bets
Query Game Records
curl --request GET \
--url https://api.example.com/api/v1/dt/betsimport requests
url = "https://api.example.com/api/v1/dt/bets"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/v1/dt/bets', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/v1/dt/bets",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/v1/dt/bets"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/api/v1/dt/bets")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/dt/bets")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"code": 0,
"msg": "Success",
"error": {
"uuid": "973ff058-54e9-4c8b-8c6c-6fecb76a13bb"
},
"pageindex": 6,
"pagesize": 300,
"pagetotal": 50,
"totalrecord": 15000,
"records": [
{
"consumption": "500",
"createtime": 1763716819,
"ordernumber": "TIPS251121172018lobby2-0000001",
"playtype": 9,
"type": 2,
"username": "player001",
"room_account": "9D",
"room_name": "9d01"
},
{
"betamount": "3000",
"betincome": "3000",
"betreward": "6000",
"betscore": "3000",
"createtime": 1763716799,
"gamecode": "9D1425B211DT",
"gametype": "BAC",
"ordernumber": "9D14251121171959020000013",
"playtype": 2,
"reckontime": 1763716821,
"status": 1,
"table": "9D14",
"type": 1,
"username": "player001",
"rolling_amount": "3000",
"room_account": "BYTRP",
"room_name": "TRP01"
}
]
}{
"error": {
"code": 2,
"msg": "request hash signature(0FACF22B9E3DB5CDC670A0F7A65BB76A) is error",
"uuid": "9e96610f-5388-42df-b3ed-ba1b3178c63b"
}
}Possible Error Codes for this API
Possible Error Codes for this API
| Code | Description |
|---|---|
| 0 | Success |
| 2 | Invalid parameter |
| 9 | Query date range too large |
| 19 | Request limit reached |
| 20 | Secret key error |
| 23 | Invalid timestamp |
| 25 | Type parameter error |
| 26 | Page size parameter error |
| 27 | Page index parameter error |
| 36 | Server error |
| 9999 | Unknown error |
Query Parameters
Platform-defined unique request serial number, length >= 32 and <= 128 bytes
Platform product ID
Start timestamp (UNIX timestamp in seconds). Note: This is reckon time. If bet is recalculated or canceled via backend, reckon time will also change
End timestamp (UNIX timestamp in seconds). Maximum difference from begintime is 7 days (168 hours)
Records per page (must be between 100 and 10,000)
Page number to query (starts from 0)
User account in game (optional)
Query specific record type: 1 - Bet, 2 - Consumption; if type key is not in parameters, query all types
md5(begintime + endtime + pagesize + pageindex + type + username + platform_secret)