Number Analysis
Returns the full analysis for a number: how often it has won, its win history, prize breakdown totals, and the matching lucky book entries.
| Method | GET |
| Path | /api/v1/numberAnalysis/{number}/{type}/{permutation} |
| Full URL | https://backend.4dnum.com/api/v1/numberAnalysis/{number}/{type}/{permutation} |
Request
| Attribute | Type | Mandatory | Example | Description |
|---|---|---|---|---|
number | String | No | 1685 | The number to analyse. |
type | String | No | M | Abbreviation company name. One of M, PMP, ST, SG, STC, EE, CS, H, P, GD. |
permutation | String | No | 1 | 1 = permutation, 0 = not permutation. |
note
The source document lists 2024-03-14 as the example value for number. That
is a date, carried over from the neighbouring endpoint; number takes a 3- or
4-digit draw number.
Response
detail_type
Summary for the company that was selected.
| Attribute | Type | Example | Description |
|---|---|---|---|
detail_type.type | String | M | The abbreviation company name the user selected. |
detail_type.times | Integer | 13 | How many times the number won within that company. |
detail_type.image | String | https://backend.4dnum.com/ssc.svg | Logo of the selected company. |
history
One entry per winning occurrence.
| Attribute | Type | Example | Description |
|---|---|---|---|
history.type | String | PMP | Company the number won under. |
history.number | String | 1685 | The winning number. |
history.drawDate | String | 2024-02-11 | Date the number won. |
history.prize | String | 3RD | Prize tier won. See table below. |
history.gapDate | Integer | 33 | Gap, in days, to the next winning occurrence. |
history.image | String | https://backend.4dnum.com/ssc.svg | Logo of the company the number won under. |
Prize values
| Value | Meaning |
|---|---|
1ST | First prize |
2ND | Second prize |
3RD | Third prize |
SPE | Special prize |
CON | Consolation |
Totals
| Attribute | Type | Example | Description |
|---|---|---|---|
TotalComeOut | Integer | 91 | Total number of winning occurrences. |
totalN1 | Integer | 1 | Wins in 1st prize. |
totalN2 | Integer | 2 | Wins in 2nd prize. |
totalN3 | Integer | 5 | Wins in 3rd prize. |
TotalSpecial | Integer | 40 | Wins in Special prize. |
TotalConsolation | Integer | 41 | Wins in Consolation prize. |
Field casing
The totals mix casing: TotalComeOut, TotalSpecial and TotalConsolation are
PascalCase while totalN1, totalN2 and totalN3 are camelCase. Match the
casing exactly.
dream — lucky book entries
Three dictionaries are returned under dream, each with the same field set.
| Key | Dictionary |
|---|---|
gzt | Guan Yin Ma Dictionary |
qzt | Tua Pek Kong (Qian) Dictionary |
wzt | Tua Pek Kong (Wan) Dictionary |
| Attribute | Type | Example (gzt) | Description |
|---|---|---|---|
dream.{key}.number | String | 658 | Lucky book number. |
dream.{key}.cn | String | 金针干,黄花菜 | Meaning in Chinese. |
dream.{key}.en | String | DRIED LILY | Meaning in English. |
dream.{key}.my | String | BUNGA LILI KERING | Meaning in Malay. |
dream.{key}.th | String | null | Meaning in Thai. May be null. |
dream.{key}.image | String | https://backend.4dnum.com/image.png | Meaning image. |
Example values for the other two dictionaries:
qzt | wzt | |
|---|---|---|
number | 658 | 1658 |
cn | 蚊油机/蚊雾机 | 刹车机油 |
en | MOSQUITO FOGGING MACHINE | BRAKE OIL |
my | PUMP MINYAK | MINYAK TAR |
th | null | null |
Example
curl https://backend.4dnum.com/api/v1/numberAnalysis/1685/M/1
{
"detail_type": {
"type": "M",
"times": 13,
"image": "https://backend.4dnum.com/ssc.svg"
},
"history": [
{
"type": "PMP",
"number": "1685",
"drawDate": "2024-02-11",
"prize": "3RD",
"gapDate": 33,
"image": "https://backend.4dnum.com/ssc.svg"
}
],
"TotalComeOut": 91,
"totalN1": 1,
"totalN2": 2,
"totalN3": 5,
"TotalSpecial": 40,
"TotalConsolation": 41,
"dream": {
"gzt": {
"number": "658",
"cn": "金针干,黄花菜",
"en": "DRIED LILY",
"my": "BUNGA LILI KERING",
"th": null,
"image": "https://backend.4dnum.com/image.png"
},
"qzt": { "number": "658", "en": "MOSQUITO FOGGING MACHINE" },
"wzt": { "number": "1658", "en": "BRAKE OIL" }
}
}