{"openapi":"3.1.0","info":{"title":"Lottery Odds API","version":"1.0.0","description":"Lottery combinatorics as an API, computed locally and deterministically and exactly — the real odds behind a ticket, the maths the jackpot poster never shows. The odds endpoint gives the jackpot odds of a pick-N game as the number of possible tickets, C(pool, picks), times the bonus-ball pool if there is one: a 6/49 game is 1 in 13,983,816, a 5/69-plus-1/26 Powerball-style game is 1 in 292,201,338, and every single line is equally unlikely. The match-odds endpoint gives the chance of matching exactly k of the main numbers — a prize tier — from the hypergeometric formula C(picks, k)·C(pool−picks, picks−k) ÷ C(pool, picks), so matching 3 of 6 in a 6/49 game is about 1 in 57. The expected-value endpoint turns a jackpot and ticket price into the expected value and the break-even jackpot (price × the odds), the threshold a jackpot must clear before a ticket is even theoretically worth it — before a shared jackpot, lump-sum and tax pull it back under. Everything is computed locally and deterministically, so it is instant and exact. Ideal for lottery and odds apps, gambling-education and responsible-play tools, probability teaching, and game back-ends. Pure local computation — no key, no third-party service, instant. Exact combinatorics. Live, nothing stored. 3 compute endpoints. Educational — not gambling advice; the odds are always against you.","contact":{"name":"PremiumApi","url":"https://www.oanor.com/by/premiumapi"}},"servers":[{"url":"https://api.oanor.com/lottery-api","description":"oanor gateway"}],"tags":[{"name":"Lottery"},{"name":"Meta"}],"components":{"securitySchemes":{"oanorKey":{"type":"apiKey","in":"header","name":"x-oanor-key","description":"Get your key at https://www.oanor.com/developer/keys"}}},"security":[{"oanorKey":[]}],"paths":{"/v1/expected-value":{"get":{"operationId":"get_v1_expected_value","tags":["Lottery"],"summary":"Expected value of a ticket","description":"","parameters":[{"name":"jackpot","in":"query","required":true,"description":"Jackpot amount","schema":{"type":"string"},"example":"100000000"},{"name":"ticket_price","in":"query","required":true,"description":"Ticket price","schema":{"type":"string"},"example":"2"},{"name":"pool","in":"query","required":true,"description":"Numbers in the main pool","schema":{"type":"string"},"example":"49"},{"name":"picks","in":"query","required":true,"description":"Numbers you pick","schema":{"type":"string"},"example":"6"},{"name":"bonus_pool","in":"query","required":false,"description":"Bonus-ball pool size","schema":{"type":"string"}}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Expected value ≈ jackpot × win probability − ticket price, counting the jackpot only. The break-even jackpot is price × the odds — but even when EV turns positive, a shared jackpot, lump-sum discounting and tax usually pull it back negative, and the odds of actually winning stay vanishingly small.","inputs":{"pool":49,"picks":6,"jackpot":100000000,"ticket_price":2},"expected_value":5.1511,"breakeven_jackpot":27967632,"jackpot_odds_one_in":13983816},"meta":{"timestamp":"2026-06-06T15:30:38.935Z","request_id":"42129a93-4dea-4ce2-8e4e-4e527405aa9b"},"status":"ok","message":"Expected value","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/match-odds":{"get":{"operationId":"get_v1_match_odds","tags":["Lottery"],"summary":"Odds of matching exactly k numbers","description":"","parameters":[{"name":"pool","in":"query","required":true,"description":"Numbers in the main pool","schema":{"type":"string"},"example":"49"},{"name":"picks","in":"query","required":true,"description":"Numbers you pick","schema":{"type":"string"},"example":"6"},{"name":"match","in":"query","required":true,"description":"Numbers matched","schema":{"type":"string"},"example":"3"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Probability of matching exactly k numbers = C(picks, k) × C(pool − picks, picks − k) ÷ C(pool, picks) — the hypergeometric distribution. For a 6/49 game, matching 3 is about 1 in 57. This counts the main numbers only; a bonus ball splits each tier further.","inputs":{"pool":49,"match":3,"picks":6},"odds_one_in":56.66,"probability":0.017650403866870102,"ways_to_match":246820,"total_combinations":13983816},"meta":{"timestamp":"2026-06-06T15:30:39.024Z","request_id":"e8ff8053-953c-4b1d-80ed-0b65995b5e28"},"status":"ok","message":"Match odds","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/odds":{"get":{"operationId":"get_v1_odds","tags":["Lottery"],"summary":"Jackpot odds of a pick-N game","description":"","parameters":[{"name":"pool","in":"query","required":true,"description":"Numbers in the main pool","schema":{"type":"string"},"example":"49"},{"name":"picks","in":"query","required":true,"description":"Numbers you pick","schema":{"type":"string"},"example":"6"},{"name":"bonus_pool","in":"query","required":false,"description":"Bonus-ball pool size","schema":{"type":"string"}},{"name":"bonus_picks","in":"query","required":false,"description":"Bonus numbers picked (default 1)","schema":{"type":"string"}}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Jackpot odds = the number of possible tickets, C(pool, picks), times the bonus-ball pool if there is one. A 6/49 game is 1 in 13,983,816; a 5/69 + 1/26 (Powerball-style) is 1 in 292,201,338. Every line is equally unlikely — past numbers, 'hot' numbers and lucky picks change nothing.","inputs":{"pool":49,"picks":6},"odds_one_in":13983816,"probability":7.151123842018516e-8,"total_combinations":13983816},"meta":{"timestamp":"2026-06-06T15:30:39.116Z","request_id":"6f7d76ae-6aa6-4f41-86ac-2f9ec9fe3e9f"},"status":"ok","message":"Jackpot odds","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/meta":{"get":{"operationId":"get_v1_meta","tags":["Meta"],"summary":"Spec","description":"","parameters":[],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"notes":"Jackpot = C(pool,picks)×bonus; tier = C(picks,k)·C(pool−picks,picks−k)/C(pool,picks); EV = jackpot/odds − price. Exact combinatorics. Educational — not gambling advice.","service":"lottery-api","endpoints":{"GET /v1/meta":"This document.","GET /v1/odds":"Jackpot odds = C(pool, picks) × bonus pool.","GET /v1/match-odds":"Odds of matching exactly k of the main numbers (a prize tier).","GET /v1/expected-value":"Expected value and break-even jackpot of a ticket."},"description":"Lottery combinatorics: jackpot odds for a pick-N game, the odds of matching exactly k numbers, and the expected value of a ticket."},"meta":{"timestamp":"2026-06-06T15:30:39.174Z","request_id":"9302c5d5-239c-4504-a195-c4f6da948c80"},"status":"ok","message":"Meta","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}}},"x-oanor-pricing":[{"slug":"free","name":"Free","price_cents_month":0,"monthly_call_quota":8000,"rps_limit":2,"hard_limit":true},{"slug":"starter","name":"Starter","price_cents_month":345,"monthly_call_quota":100000,"rps_limit":8,"hard_limit":true},{"slug":"pro","name":"Pro","price_cents_month":1130,"monthly_call_quota":400000,"rps_limit":20,"hard_limit":true},{"slug":"mega","name":"Mega","price_cents_month":3560,"monthly_call_quota":1750000,"rps_limit":48,"hard_limit":true}],"x-oanor-marketplace-url":"https://www.oanor.com/api/lottery-api"}