Lottery Draw API
No authentication required. Provably fair, deterministic, and fully auditable. Send entries, get winners, verify everything independently.
https://api.winfinity.club/api/v1API Reference
Two endpoints. One runs the draw. The other gives you the algorithm source code.
/lottery/drawPublicRun a weighted lottery draw
Submit a list of entries with weights and receive deterministic winners. The draw uses SHA-256 entry hashing, cumulative weight distribution, and a VRF-seeded random number generator. Results are fully reproducible.
Request Body Fields
entriesarray[object]RequiredList of entries. Each needs 'id' (string) and 'weight' (number >= 0).winner_countintegerRequiredHow many winners to draw. Min 1, max 100. Must be <= len(entries).seedstring | nullOptionalVRF seed hex string. If omitted, a random 64-char seed is auto-generated.max_weight_capfloatOptionalMaximum allowed weight per entry. Default 3.0. Min 1.0.Request Example
Response Example
/lottery/draw/algorithmPublicGet algorithm documentation & source code
Returns the full algorithm description, Python source code, JavaScript source code, and a verification checklist. Useful for client-side implementations or audits.
Response Example
Try It Yourself
Copy-paste these examples into your terminal or IDE. No API key needed.
How to Verify Any Result
The API returns everything you need to independently confirm that a draw is fair. Follow these steps to reproduce the exact same winners locally.
1. Save the returned seed, entry list, and max_weight_cap
2. Run the algorithm locally using the Python or JS code above
3. Compare your output cumulative_weights with the API response
4. Confirm entry_hashes match (SHA-256 of id:weight:seed)
5. Confirm winner order, ranks, and selection values match
6. If everything matches, the draw is provably fair and untampered