Skip to main content

Result Fields

This is the canonical result payload. It is returned by the Firestore document 4dResult/NewResult and by every result-returning REST endpoint:

Sentinel value ----

A ---- value means the number is not available. For the special (s1s13) and consolation-range fields this is either because that number already appeared in the 1st/2nd/3rd prize, or because the draw has not opened yet. For c1c10 it only means the draw has not opened yet.

Top level

FieldTypeExampleDescription
typeStringPAbbreviation company name. See Company Codes.

Everything else is nested under fdData.

Draw identity

FieldTypeExampleDescription
fdData.ddString2024-03-14Game result date.
fdData.dnString5135Game draw number.
fdData.dayStringThuGame draw day.
fdData.isTodayBoolean0Whether this game is today.
fdData.countString23How many number results have opened so far.
fdData.no_lgtInteger7Group of the draw number result.

Top three prizes

FieldTypeExampleDescription
fdData.n1String54981st prize number.
fdData.n1_posStringEPlace shown before the 1st prize number.
fdData.n2String48912nd prize number.
fdData.n2_posStringMPlace shown before the 2nd prize number.
fdData.n3String19663rd prize number.
fdData.n3_posStringIPlace shown before the 3rd prize number.

Special prizes (s1s13)

Each maps to a fixed place letter, A through M.

FieldTypePlaceExample
fdData.s1StringA2894
fdData.s2StringB1894
fdData.s3StringC8791
fdData.s4StringD2351
fdData.s5StringE5621
fdData.s6StringF4598
fdData.s7StringG5983
fdData.s8StringH4891
fdData.s9StringI8749
fdData.s10StringJ5648
fdData.s11StringK4612
fdData.s12StringL3248
fdData.s13StringM8432

A value of ---- means the number already reached the 1st, 2nd or 3rd prize, or the game has not opened its result yet.

Consolation prizes (c1c10)

Each maps to a fixed place letter, N through W.

FieldTypePlaceExample
fdData.c1StringN8856
fdData.c2StringO5489
fdData.c3StringP4311
fdData.c4StringQ1245
fdData.c5StringR1658
fdData.c6StringS1564
fdData.c7StringT1531
fdData.c8StringU1561
fdData.c9StringV4878
fdData.c10StringW4686

A value of ---- means the game has not opened its result yet.

Jackpot side numbers

FieldTypeExampleDescription
fdData.n4String5324Jackpot side number.
fdData.n5String324Jackpot side number.
fdData.n6String24Jackpot side number.
fdData.n7String123456Jackpot side number.
fdData.n8String12345Jackpot side number.
fdData.n9String65432Jackpot side number.
fdData.n10String1234Jackpot side number.
fdData.n11String2847Jackpot side number.
fdData.n12String512Jackpot side number.
fdData.n13String847Jackpot side number.
fdData.n14String12Jackpot side number.
fdData.n15String65Jackpot side number.

Jackpot amounts

FieldTypeExampleDescription
fdData.jp1StringRM37,452,125.75First jackpot amount.
fdData.jp2StringRM 636,704.63Second jackpot amount.
fdData.jackpotAmountString7,594,109.00Game jackpot amount. Only used for type HT19:30 and HT15:30.
fdData.jp_typeStringLIFEThe 6D type.

Live streaming

FieldTypeExampleDescription
fdData.isLiveString11 = live streaming, 0 = not live streaming.
fdData.videoUrlStringhttps://www.youtube.com/embed/_lSi14pUNhs?rel=0&hd=1Video link used to display the live stream and replay the recording.

Type-specific fields

FieldTypeExampleApplies toDescription
fdData.d1Integer7GD6D onlyThe 6 + 1D result.
fdData.othersStringsee belowSGJP6/45 onlyWinner detail, a JSON-encoded array of prize/winner-count pairs.

fdData.others is a string containing JSON, not an array — parse it a second time before use:

"[\"-\",\"-\",\"$95,881\",\"7\",\"$1,768\",\"261\",\"$373\",\"676\",\"$50\",\"14,543\",\"$25\",\"18,745\",\"$10\",\"266,194\",\"\"]"
const winners = JSON.parse(result.fdData.others);
// ["-", "-", "$95,881", "7", "$1,768", "261", ...]

Example payload

{
"type": "P",
"fdData": {
"dd": "2024-03-14",
"dn": "5135",
"day": "Thu",
"isToday": false,
"count": "23",
"no_lgt": 7,

"n1": "5498", "n1_pos": "E",
"n2": "4891", "n2_pos": "M",
"n3": "1966", "n3_pos": "I",

"s1": "2894", "s2": "1894", "s3": "8791", "s4": "2351", "s5": "5621",
"s6": "4598", "s7": "5983", "s8": "4891", "s9": "8749", "s10": "5648",
"s11": "4612", "s12": "3248", "s13": "8432",

"c1": "8856", "c2": "5489", "c3": "4311", "c4": "1245", "c5": "1658",
"c6": "1564", "c7": "1531", "c8": "1561", "c9": "4878", "c10": "4686",

"jp1": "RM37,452,125.75",
"jp2": "RM 636,704.63",
"jp_type": "LIFE",

"isLive": "1",
"videoUrl": "https://www.youtube.com/embed/_lSi14pUNhs?rel=0&hd=1"
}
}

Rendering hints

const NOT_AVAILABLE = '----';

function display(value) {
return value === NOT_AVAILABLE ? '—' : value;
}

// Special prizes in place order A..M
const specials = Array.from({length: 13}, (_, i) => fdData[`s${i + 1}`]);

// Consolation prizes in place order N..W
const consolations = Array.from({length: 10}, (_, i) => fdData[`c${i + 1}`]);

const drawOpened = Number(fdData.count) > 0;
const showLivePlayer = fdData.isLive === '1' && Boolean(fdData.videoUrl);