Daily Gold Giveaway

This is how you fetch the data for the Daily Gold Giveaway.

Call our API to fetch this data:

https://megapot.io/api/v1/user.sidePotWinnerHistory?batch=1&input=%7B%220%22%3A%7B%22json%22%3A%7B%22address%22%3A%22{address}%22%7D%7D%7D

Replace {address} with a wallet address. This address must be all lowercase.

The result you should get is

[{"result":{"data":{"json":{"code":200,"message":"OK","result":{"2024-09-11":{"gold":5,"user":25,"total":278}}}}}}]

JSON result has:

  • Each date that the user earned Gold (eg. 2024-09-11, this is the time that the lottery ran in UTC timezone)

  • gold the user earned for the lottery for that day (eg. they bought a ticket from 9/10-9/11, lottery ran 9/11)

  • user returns number of tickets they bought

  • total is number of tickets bought by all users (if you want to calculate chance of them winning).

"result": {
            "2024-09-11": {
              "gold": 5,
              "user": 25,
              "total": 278
            }
          }

Last updated