1. Authentication
Send your key in the X-API-KEY header (or as the api_key query parameter). Base URL:
Every response uses this wrapper. code is 0 on success.
{
"code": 0, "msg": "Succeed", "msgCode": 0,
"serviceNowTime": "2026-11-20 14:05:01",
"data": { ... }
}
2. Games
Use the code or the old typeId in the URL.
| Code | typeId | Name | Interval | Issue number format |
|---|---|---|---|---|
| wingo_30s | 30 | Win Go 30s | 30s | YYYYMMDD10005nnnn |
| wingo_1m | 1 | Win Go 1 Min | 1m | YYYYMMDD10001nnnn |
| wingo_3m | 2 | Win Go 3 Min | 3m | YYYYMMDD100020nnn |
| wingo_5m | 3 | Win Go 5 Min | 5m | YYYYMMDD100030nnn |
| wingo_10m | 4 | Win Go 10 Min | 10m | YYYYMMDD100040nnn |
| k3_1m | 9 | K3 1 Min | 1m | YYYYMMDD10101nnnn |
| k3_3m | 10 | K3 3 Min | 3m | YYYYMMDD10102nnnn |
| k3_5m | 11 | K3 5 Min | 5m | YYYYMMDD10103nnnn |
| k3_10m | 12 | K3 10 Min | 10m | YYYYMMDD10104nnnn |
| 5d_1m | 5 | 5D 1 Min | 1m | YYYYMMDD10201nnnn |
| 5d_3m | 6 | 5D 3 Min | 3m | YYYYMMDD10202nnnn |
| 5d_5m | 7 | 5D 5 Min | 5m | YYYYMMDD10203nnnn |
| 5d_10m | 8 | 5D 10 Min | 10m | YYYYMMDD10204nnnn |
| trx_1m | 13 | TRX Win Go 1 Min | 1m | YYYYMMDD10301nnnn |
| trx_3m | 14 | TRX Win Go 3 Min | 3m | YYYYMMDD10302nnnn |
| trx_5m | 15 | TRX Win Go 5 Min | 5m | YYYYMMDD10303nnnn |
| trx_10m | 16 | TRX Win Go 10 Min | 10m | YYYYMMDD10304nnnn |
Times are in Asia/Dhaka. The sequence restarts at 1 every day at midnight.
3. Endpoints
4. Old-site compatible names
If your frontend already calls the old api/webapi/... names, point it to https://colourtreadingapi.cubeclube.com/api/webapi/<Name> with typeId, pageNo and pageSize in the POST body or query string:
GetGameIssue, GetNoaverageEmerdList, GetLastFiveIssueNumberResult (Wingo: typeId 30,1,2,3,4) GetGameK3Issue, GetK3NoaverageEmerdList, GetK3OneEmerd (K3: typeId 9,10,11,12) GetGame5DIssue, GetNoaverage5DEmerdList, Get5DOneEmerd (5D: typeId 5,6,7,8) GetTRXGameIssue, GetTRXNoaverageEmerdList, GetLastFiveIssueNumberResult (TRX: typeId 13,14,15,16)
5. Result fields
// Wingo GET /v1/wingo_1m/history {"issueNumber":"20261120100010123","number":"0","colour":"red,violet","premium":"17490","size":"small"} // colour: 0 = red,violet · 5 = green,violet · 1,3,7,9 = green · 2,4,6,8 = red · size: 5-9 big, 0-4 small // K3 GET /v1/k3_1m/latest {"issueNumber":"20261120101010123","gameType":"2","sumCount":"13","premium":"616","size":"big","parity":"odd"} // premium = the 3 dice · gameType: 3 triple, 2 pair, 1 three consecutive, 0 all different · big = sum 11-18 // 5D GET /v1/5d_1m/latest {"issueNumber":"20261120102010123","sumCount":"24","premium":"37905","size":"big","parity":"even"} // premium = digits A B C D E (leading zeros kept) · sum big when > 22 // TRX GET /v1/trx_1m/history {"issueNumber":"20261120103010123","number":"3","colour":"green","premium":"3","size":"small", "blockID":"0000000005410b1fcdbeaf11f06e05acc7e8bfd9380c6f7baeb3aaabb7a19903","blockNumber":"88148767","blockTime":"14:03:00"} // number = last decimal digit of the TRON blockID. Check it on tronscan.org/#/block/{blockNumber}
6. Examples
curl -H "X-API-KEY: YOUR_KEY" "https://colourtreadingapi.cubeclube.com/api/v1/wingo_1m/current" curl -H "X-API-KEY: YOUR_KEY" "https://colourtreadingapi.cubeclube.com/api/v1/k3_3m/history?pageNo=1&pageSize=10"
$ch = curl_init("https://colourtreadingapi.cubeclube.com/api/v1/wingo_1m/latest");
curl_setopt_array($ch, [CURLOPT_RETURNTRANSFER => true, CURLOPT_TIMEOUT => 10,
CURLOPT_HTTPHEADER => ["X-API-KEY: YOUR_KEY"]]);
$res = json_decode(curl_exec($ch), true);
if ($res['code'] === 0) {
echo $res['data']['issueNumber'] . ' => ' . $res['data']['number'];
}
const r = await fetch("https://colourtreadingapi.cubeclube.com/api/v1/trx_1m/current", { headers: { "X-API-KEY": "YOUR_KEY" } });
const { data } = await r.json();
console.log(data.predraw.issueNumber, data.settled);
current moves to a new issue, request /result/{previousIssue}. On 409, retry after 2-3 seconds.
Keep your key on your server; if you call from a browser, ask us to whitelist your domain.7. Webhook push
On plans with webhooks, as soon as a period settles we POST JSON to your URL:
{"event":"result.settled","game":"wingo_1m","typeId":1,"type":"wingo",
"data":{"issueNumber":"20261120100010123","number":"0","colour":"red,violet","premium":"17490","size":"small"},
"serviceNowTime":"2026-11-20 14:03:01"}
Check that the request came from us. X-Signature is the HMAC-SHA256 of the raw body, keyed with your webhook secret:
$body = file_get_contents('php://input');
$ok = hash_equals(hash_hmac('sha256', $body, 'YOUR_WEBHOOK_SECRET'), $_SERVER['HTTP_X_SIGNATURE'] ?? '');
if (!$ok) { http_response_code(401); exit; }
$event = json_decode($body, true);
http_response_code(200); // any 2xx = delivered. Otherwise we retry after 30s, 2m and 10m
8. Ready-made integration kit
For sites built on the classic Wingo / K3 / 5D / TRX engine files (nayakaphalitansa_mulaka_unohs*.php, trxupkid*.php):
upload the kit and open its installer. Your bet settlement, payouts and frontend stay as they are; only the result source changes.
It also contains a plain PHP client and examples for any other PHP site.
1. Upload the lottery_kit folder next to your engine files (usually public_html) 2. Open /lottery_kit/install.php and enter the API URL and your key 3. Open /lottery_kit/test.php?token=ADMIN_TOKEN (all lines must be OK) 4. If games stop: /lottery_kit/diag.php?token=ADMIN_TOKEN