Taiwan Lottery

v0.1.1
io.github.adsandcode/taiwan-lottery Checked 2 days ago Published 1 month ago

Official Taiwan Lottery draw results: latest and past draws, ticket check, frequencies, schedule

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

latest_draw Latest draw

Latest official draw of a Taiwan Lottery (台灣彩券) game: period, date, winning numbers in ascending and in draw order, the special number (大樂透 特別號) or second-zone number (威力彩 第二區) where the game has one, the digits for 3星彩/4星彩, the super number for 賓果賓果, and the prize table published for that draw (tier, winners, NTD per winning ticket). Data comes from the official Taiwan Lottery API (api.taiwanlottery.com). It is not real time: the official FAQ says the site publishes the day's numbers at 21:30 and the prize results at 22:00 Taiwan time, so before…

ParameterTypeDescription
game *stringGame id or name. Ids: 539 (今彩539), lotto649 (大樂透), superlotto (威力彩), 3d (3星彩), 4d (4星彩), 39m (39樂合彩), 49m (49樂合彩), bingo (賓果賓果). Also 38m (38樂合彩) and…

get_draw One draw

One official draw, by period number or by date (YYYY-MM-DD, Taiwan time). Returns the same fields as latest_draw. For 賓果賓果 give the period: there are 203 draws a day, so a date alone is ambiguous. If there was no draw that day the error says which days the game is drawn. Data comes from the official Taiwan Lottery API (api.taiwanlottery.com). It is not real time: the official FAQ says the site publishes the day's numbers at 21:30 and the prize results at 22:00 Taiwan time, so before 21:30 the day's draw is normally missing and before 22:00 its prize table may be missing (then there is…

ParameterTypeDescription
game *stringGame id or name. Ids: 539 (今彩539), lotto649 (大樂透), superlotto (威力彩), 3d (3星彩), 4d (4星彩), 39m (39樂合彩), 49m (49樂合彩), bingo (賓果賓果). Also 38m (38樂合彩) and…
datestringDraw date YYYY-MM-DD (Taiwan time). Give period or date.
periodDraw period number (期別) as printed on the ticket, for example 115000256. 賓果賓果 periods look like 115059885.

list_draws List draws

Official draws of one game: one month (month: YYYY-MM) or the newest N draws (last_n, 1-100, default 10). For 賓果賓果 use date (YYYY-MM-DD) or last_n. Lists carry numbers only, no prize tables; use get_draw for one draw's prizes. Data comes from the official Taiwan Lottery API (api.taiwanlottery.com). It is not real time: the official FAQ says the site publishes the day's numbers at 21:30 and the prize results at 22:00 Taiwan time, so before 21:30 the day's draw is normally missing and before 22:00 its prize table may be missing (then there is no prize table and prizes_pending is true; th…

ParameterTypeDescription
game *stringGame id or name. Ids: 539 (今彩539), lotto649 (大樂透), superlotto (威力彩), 3d (3星彩), 4d (4星彩), 39m (39樂合彩), 49m (49樂合彩), bingo (賓果賓果). Also 38m (38樂合彩) and…
datestring賓果賓果 only: one day YYYY-MM-DD.
last_nNewest N draws, 1-100. Default 10.
monthstringMonth YYYY-MM. Give at most one of month, last_n, date.

check_ticket Check a ticket

Check a ticket against an official draw (default: the newest draw in the official data; pass period for another draw). Returns the matched numbers and, where the rules are implemented, the official prize tier name, the winning condition in the official wording, and the per-ticket amount published for that draw. Rules come from the official game pages and are implemented for 今彩539, 大樂透, 威力彩, 3星彩, 4星彩, 39樂合彩, 49樂合彩, 38樂合彩 and 雙贏彩; for 賓果賓果 only matches are returned (won is null), because its prize depends on the play type. Ticket formats: 5…

ParameterTypeDescription
game *stringGame id or name. Ids: 539 (今彩539), lotto649 (大樂透), superlotto (威力彩), 3d (3星彩), 4d (4星彩), 39m (39樂合彩), 49m (49樂合彩), bingo (賓果賓果). Also 38m (38樂合彩) and…
numbers *Picked numbers as an array, or a string such as "03 08 14 23 28". For 3d / 4d the digits, e.g. "073".
periodDraw period number (期別) as printed on the ticket, for example 115000256. 賓果賓果 periods look like 115059885.
second_zone威力彩 only: second-zone number 1-8.

number_stats Number frequency

Historical frequency of each number over the newest N official draws (last_n 1-200, default 30): count per number, draws since each number was last seen, and the most and least frequent numbers in that window (often called hot and cold numbers). These are counts of past draws only. Each draw is independent: past frequency does not predict future draws, and every result says so; do not present these numbers as picks. 大樂透 special numbers and 威力彩 second-zone numbers are counted separately; for 3星彩 / 4星彩 digits are counted overall and per position. Data comes from the official…

ParameterTypeDescription
game *stringGame id or name. Ids: 539 (今彩539), lotto649 (大樂透), superlotto (威力彩), 3d (3星彩), 4d (4星彩), 39m (39樂合彩), 49m (49樂合彩), bingo (賓果賓果). Also 38m (38樂合彩) and…
last_nNewest N draws to count, 1-200. Default 30.

draw_schedule Draw schedule

Draw days and time from the official schedule (今彩539, 3星彩, 4星彩, 39樂合彩: Monday to Saturday; 大樂透 and 49樂合彩: Tuesday and Friday; 威力彩: Monday and Thursday; all at 20:30 Taiwan time; 賓果賓果 every 5 minutes 07:05-23:55, every day), the next draw date from the official API, official schedule notices if any, and when the official site publishes results. Data comes from the official Taiwan Lottery API (api.taiwanlottery.com). It is not real time: the official FAQ says the site publishes the day's numbers at 21:30 and the prize results at 22:00 Taiwan time, so b…

ParameterTypeDescription
game *stringGame id or name. Ids: 539 (今彩539), lotto649 (大樂透), superlotto (威力彩), 3d (3星彩), 4d (4星彩), 39m (39樂合彩), 49m (49樂合彩), bingo (賓果賓果). Also 38m (38樂合彩) and…