💰
Megapot
  • Overview
    • About Megapot
    • How to play
    • How to provide liquidity
    • How to refer users
    • Earn as a liquidity provider
    • About the Team
    • Megapoints
  • Deep dive
    • Components
    • System Diagram
    • Smart Contract
    • Provably Fair
  • Developers
    • Start Here
    • React UI Kit (Beta)
      • MegapotProvider
      • Jackpot
      • useJackpot
    • Standalone Integration
      • Getting Started
      • Contract Functions
      • Jackpot Page
      • LP Deposit Page
      • History Page
    • Custom ERC-20 Jackpot
  • Developer Reference
    • Testnet & Mainnet
    • Contract Overview & Functions
    • Megapot API
    • Megapot Examples
      • Refer Tickets
      • Gifting Tickets
    • Brand Kit
  • Appendix
    • VIP Program
    • FAQ
    • About Megapot
  • Terms of Service
  • Privacy Policy
  • Responsible Gaming
Powered by GitBook
On this page
  • Megapot API
  • Feedback
  • API Key
  • Endpoints
  • Jackpot Info
  • Jackpot History
  1. Developer Reference

Megapot API

PreviousContract Overview & FunctionsNextMegapot Examples

Last updated 17 hours ago

Megapot API

The Megapot v1 API is a helper API that allows for quick access to jackpot data. This is useful for anyone implementing the Megapot jackpot or their own custom ERC-20 jackpot that has been deployed by us.

Feedback

We are always looking for ways to improve the Megapot API. If you have any feedback, please reach out to us on our .

API Key

To use the Megapot API, you will need to obtain an API key. You can do this by contacting us on our .

Endpoints

Jackpot Info

    • Get current jackpot data for a given contract address

    • {
          "data": {
              "address": "0xbEDd4F2beBE9E3E636161E644759f3cbe3d51B95",
              "result": {
                  "allFeesTotal": "109500000",
                  "allowPurchasing": true,
                  "entropyCallbackLock": false,
                  "fallbackWinner": "0x2a5f9443719899537Fa51f5061cBA8c8096719d2",
                  "feeBps": 3000,
                  "getJackpotFee": "32406457200001",
                  "jackpotLock": false,
                  "lastJackpotEndTime": 1744823661,
                  "lastWinnerAddress": "0x0000000000000000000000000000000000000000",
                  "lpFeesTotal": "91900031",
                  "lpLimit": 200,
                  "lpPoolCap": "1",
                  "lpPoolTotal": "353254604424",
                  "minLpDeposit": "250000000",
                  "owner": "0xF417533b9885E106dAe3336568D3823bA474CB88",
                  "pendingOwner": "0x0000000000000000000000000000000000000000",
                  "protocolFeeAddress": "0x0000000000000000000000000000000000000000",
                  "protocolFeeClaimable": "0",
                  "protocolFeeThreshold": "10000000000",
                  "referralFeeBps": 1000,
                  "referralFeesTotal": "17600000",
                  "roundDurationInSeconds": 86280,
                  "ticketCountTotalBps": 2555000,
                  "ticketPrice": "1000000",
                  "token": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
                  "tokenDecimals": 6,
                  "userLimit": 1500,
                  "userPoolTotal": "255500000"
              }
          }
      }

Jackpot History

    • Get jackpot & ticket purchase history for a given contract address

    • [
          {
              "jackpot": {
                  "blockNumberStart": 29103514,
                  "blockNumberEnd": 29146710,
                  "time": "1745082767",
                  "winningTicket": "577773086",
                  "winAmount": "371234149839",
                  "txHash": "0x47b64953edb8248ac3f3529f20b1c1e462f3be4d49494ed7804f6a0b58dbe89c",
                  "ticketPurchasedTotalBps": 2744000,
                  "ticketPurchasedCount": 392
              },
              "ticketPurchases": [
                  {
                      "blockNumber": 29103607,
                      "recipient": "0x8d1135a82837e61aad796d8ff358bd07587751e3",
                      "referrer": "0x0000000000000000000000000000000000000000",
                      "buyer": "0x8d1135a82837e61aad796d8ff358bd07587751e3",
                      "ticketsPurchasedTotalBps": 7000,
                      "txHash": "0x18d0fc5a6115da92698430aa657ac4c180a05bdeac68aaaf9e89c4dadac04636"
                  },
                  {
                      "blockNumber": 29103691,
                      "recipient": "0x5ec4bde8ba38fb02e15acf711474a529b31e4e5a",
                      "referrer": "0x0000000000000000000000000000000000000000",
                      "buyer": "0x9bd9caf29b76e98d57fc3a228a39c7efe8ca0eaf",
                      "ticketsPurchasedTotalBps": 7000,
                      "txHash": "0x081257d1a564ea9fc4e53f7d9fe4e0ad6619bb5ca8a00dff106b9b6b32d88a3e"
                  },
              ]
          },
      ]

Developer Telegram
Developer Telegram
https://api.megapot.io/api/v1/contracts/{contractAddress}
https://api.megapot.io/api/v1/contracts/{contractAddress}/jackpot-history