Skip to main content

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.

MethodGET
Path/api/v1/numberAnalysis/{number}/{type}/{permutation}
Full URLhttps://backend.4dnum.com/api/v1/numberAnalysis/{number}/{type}/{permutation}

Request

AttributeTypeMandatoryExampleDescription
numberStringNo1685The number to analyse.
typeStringNoMAbbreviation company name. One of M, PMP, ST, SG, STC, EE, CS, H, P, GD.
permutationStringNo11 = 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.

AttributeTypeExampleDescription
detail_type.typeStringMThe abbreviation company name the user selected.
detail_type.timesInteger13How many times the number won within that company.
detail_type.imageStringhttps://backend.4dnum.com/ssc.svgLogo of the selected company.

history

One entry per winning occurrence.

AttributeTypeExampleDescription
history.typeStringPMPCompany the number won under.
history.numberString1685The winning number.
history.drawDateString2024-02-11Date the number won.
history.prizeString3RDPrize tier won. See table below.
history.gapDateInteger33Gap, in days, to the next winning occurrence.
history.imageStringhttps://backend.4dnum.com/ssc.svgLogo of the company the number won under.

Prize values

ValueMeaning
1STFirst prize
2NDSecond prize
3RDThird prize
SPESpecial prize
CONConsolation

Totals

AttributeTypeExampleDescription
TotalComeOutInteger91Total number of winning occurrences.
totalN1Integer1Wins in 1st prize.
totalN2Integer2Wins in 2nd prize.
totalN3Integer5Wins in 3rd prize.
TotalSpecialInteger40Wins in Special prize.
TotalConsolationInteger41Wins 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.

KeyDictionary
gztGuan Yin Ma Dictionary
qztTua Pek Kong (Qian) Dictionary
wztTua Pek Kong (Wan) Dictionary
AttributeTypeExample (gzt)Description
dream.{key}.numberString658Lucky book number.
dream.{key}.cnString金针干,黄花菜Meaning in Chinese.
dream.{key}.enStringDRIED LILYMeaning in English.
dream.{key}.myStringBUNGA LILI KERINGMeaning in Malay.
dream.{key}.thStringnullMeaning in Thai. May be null.
dream.{key}.imageStringhttps://backend.4dnum.com/image.pngMeaning image.

Example values for the other two dictionaries:

qztwzt
number6581658
cn蚊油机/蚊雾机刹车机油
enMOSQUITO FOGGING MACHINEBRAKE OIL
myPUMP MINYAKMINYAK TAR
thnullnull

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" }
}
}