RPS Labs
  • 👋Welcome to RPS Labs
  • 📋Table of Contents
  • Overview
    • 💡What we do
  • ✌️Using Lotto SDK
    • For Users
      • Case Studies
    • For Developers
      • 💸Pricing
      • 🧰SDK Docs
        • Getting Started
        • UI Components
        • Hooks
      • 💻API Docs
        • Raffle info
        • Users
        • Pot
      • 📃Smart Contracts
        • RPS Raffle
        • RPS Router
        • Configurable Raffle Parameters
        • Fund Management
        • Deployment Guide
        • Security Considerations
      • ⛓️Supported Chains
  • RESOURCES
    • 🙋‍♂️Contact & Social Links
    • ❓FAQ
    • 🖌️Brand Assets
  • COMING SOON
    • DailyGM!
    • Hypercluster
Powered by GitBook
On this page
  • Get all tickets for user in a pot
  • Total number of tickets for user in the current pot
  • Total number of tickets for user in a pot
  1. Using Lotto SDK
  2. For Developers
  3. API Docs

Users

Raffle users related API endpoints.

Last updated 1 year ago

For query parameter chain see supported chains

Get all tickets for user in a pot

Total number of tickets for user in the current pot

GET https://api.rpslabs/v1/user/{address}/pot/current

Returns all tickets that user has in the current pot.

Query Parameters

Name
Type
Description

chain*

String

Blockchain hosting the raffle contract

Headers

Name
Type
Description

Authorization*

API Key


{
    "NumOfTickets": 5,
    "wallet_address": "0xa22fe8d7b230a48de511669fefa957bdc97f2705",
    "pot_id": 4,
    "tickets": [
        {
            "ticket_id": 2224,
            "is_winner": false
        },
        {
            "ticket_id": 2225,
            "is_winner": false,
        },
        {
            "ticket_id": 2226,
            "is_winner": true,
        },
        {
            "ticket_id": 2228,
            "is_winner": false,
        },
        {
            "ticket_id": 2242,
            "is_winner": false,
        }
    ]
}
{
    "message": "INCORRECT_CHAIN",
    "code": 400
}
{
    "message": "INTERNAL_SERVER_ERROR",
    "code": 500
}

Total number of tickets for user in a pot

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

Returns all tickets that user has in the pot specified by pot_id.

Query Parameters

Name
Type
Description

chain*

String

Blockchain hosting the raffle contract

Headers

Name
Type
Description

Authorization*

API Key

{
    "NumOfTickets": 5,
    "wallet_address": "0xa22fe8d7b230a48de511669fefa957bdc97f2705",
    "pot_id": 4,
    "tickets": [
        {
            "ticket_id": 2224,
            "is_winner": false
        },
        {
            "ticket_id": 2225,
            "is_winner": false
         },
        {
            "ticket_id": 2226,
            "is_winner": true
        },
        {
            "ticket_id": 2227,
            "is_winner": false
        },
        {
            "ticket_id": 2228,
            "is_winner": false
        }
    ]
}
{
    "message": "INCORRECT_CHAIN",
    "code": 400
}
{
    "message": "INCORRECT_BODY",
    "code": 400
}
{
    "message": "INTERNAL_SERVER_ERROR",
    "code": 500
}
✌️
💻
here