Pot

Pot related API endpoints.

For query parameter chain see supported chains here

Get current pot info

Info about the current pot

GET https://api.rpslabs/v1/pot/info

Returns current pot ID, size, limit and ticket number

Query Parameters

Name
Type
Description

chain*

String

Blockchain hosting the raffle contra

Headers

Name
Type
Description

Authorization*

API Key

{
    "pot_id": 4
    "pot_limit": "1000000000000000000",
    "pot_size": "132207300000000000",
    "tickets_issued": 7
    "tickets_remaining": 13 
}

Get previous winners

All previous winners in the raffle

GET https://api.rpslabs/v1/pot/winners

Returns all users that won the raffle in the past and info related to their pots

Query Parameters

Name
Type
Description

chain*

String

Blockchain hosting the raffle contra

Headers

Name
Type
Description

Authorization*

API Key

[
    {
        "wallet_address": "0xcb1ff71fc73b5cf332f8daae36385a4d0ff7c5cb",
        "ticket_id": 3,
        "pot_id": 1,
        "pot_size": "1000000000000000000",
        "tx_hash": "0x01a3830491c564386cd2da2d7a5bce1198a8d5d2f97b9675ca64a1ed30028010",
        "vrf_tx_hash": "0x8052d61d01c39795012e21a91bc389b100d7df89a38014fb94a401686614eb70",
        "raffle_timestamp": "2023-10-13T14:07:09.029933Z"
    },
    {
        "wallet_address": "0xcb1ff71fc73b5cf332f8daae36385a4d0ff7c5cb",
        "ticket_id": 9,
        "pot_id": 2,
        "pot_size": "1000000000000000000",
        "tx_hash": "0xabb3ae985c85e11739a12a82c4a8130d90df4d163afe1cd663325c95c8d167b5",
        "vrf_tx_hash": "0xb469ec74634826d5edfe264c374494b5fcb951739919c18619a45c691733cdb1",
        "raffle_timestamp": "2023-10-13T14:07:12.873203Z"
    },
    {
        "wallet_address": "0x10082530b5c9585c5144d71556d12195026ea75c",
        "ticket_id": 1391,
        "pot_id": 3,
        "pot_size": "1000000000000000000",
        "tx_hash": "0xc72883ce37200e61649a9a8caf6ec2ae6b4962ae6305ab7a786b757ab89b6907",
        "vrf_tx_hash": "0x43944178da987395eca9d0b1bd3e31ac5c9c68b17f9da9e7f8aca8e3018c17a5",
        "raffle_timestamp": "2023-10-13T14:08:43.082094Z"
    }
]

Get pot leaderboard

All contestants of a pot

GET https://api.rpslabs/v1/pot/{pot_id}/leaderboard

Returns all wallet addresses in a certain pot sorted by their number of tickets

Query Parameters

Name
Type
Description

chain*

String

Blockchain hosting the raffle contract

Headers

Name
Type
Description

Authorization*

API Key

{
    "message": "INCORRECT_BODY",
    "code": 400
}

Get last day pot leaderboard

Contestants of the current pot that earned tickets in the last 24 hours

GET https://api.rpslabs/v1/pot/current/leaderboard/last

Returns all wallet addresses that received tickets for the current pot in the last 24 hours, sorted by that number of tickets

Query Parameters

Name
Type
Description

chain*

String

Blockchain hosting the raffle contract

Headers

Name
Type
Description

Authorization*

API Key

[
    {
        "num_of_tickets": 153,
        "wallet_address": "0x56d3f3a73c48391f413e1d9353165fdb0c7dda3c",
        "pot_id": 3
    },
    {
        "num_of_tickets": 88,
        "wallet_address": "0xcb1ff71fc73b5cf332f8daae36385a4d0ff7c5cb",
        "pot_id": 3
    },
    {
        "num_of_tickets": 80,
        "wallet_address": "0xed77823c382b7f48adffebbb30a77f461d0e3d6b",
        "pot_id": 3
    },
    {
        "num_of_tickets": 11,
        "wallet_address": "0xa22fe8d7b230a48de511669fefa957bdc97f2705",
        "pot_id": 3
    }
]

Last updated