Relysia
Relysia WalletAPI DocumentationGithub RepositoryDemo
  • Relysia SDK
  • Getting Started
    • Setup
    • API
    • Infrastructure
  • Wallets
    • Wallets
    • Mnemonic
    • Addresses
    • Metrics
    • Balance
    • History
  • Payments
    • Lookup
    • Sweep
    • URI
    • Transactions
    • Raw Transactions
    • Invoices
      • Create Invoice
      • Get Invoice
      • Pay Invoice
    • Payments
    • Asm
  • token
    • Basics
    • Token Issuance
    • NFT Issuance
    • Atomic Swaps
    • Details
    • Leaderboard
  • Utility
    • Post
    • Upload
    • Conversion
    • Paymail
    • Transpile-Compile
  • Enterprise Wallet
    • Overview
    • Authentication
    • Management
    • Wallet
    • Smart Contracts
    • Transaction
    • Fee Manager
    • Events
  • Realtime Transaction Notification
    • Use Case
    • Setup and Configuration
    • Events and Messages
  • More
    • Metashard
    • Satolearn
Powered by GitBook
On this page
  1. token

Leaderboard

PreviousDetailsNextPost

Last updated 2 years ago

To display the distribution of a particular token, we implemented the /leaderboard endpoint. A leaderboard is typically an information page on a platform page that shows how you rank among others. Distributing tokens in a competition and then displaying ownership is thus an interesting way to enrich the user experience.

Since tokens are on a public blockchain, we can aggregate all transactions and balances from the public blockchain to display the leaderboard. Thanks to p2p paymail integration, updating the leaderboard happens in real time.

Get token ownership details

get

Returns all user data who have this particular token.

Authorizations
Query parameters
nextPageTokennumberOptional
Header parameters
tokenIdstringRequired
Responses
200
Successful response
application/json
400
Bad request
application/json
get
GET /v1/leaderboard HTTP/1.1
Host: api.relysia.com
authToken: YOUR_API_KEY
tokenId: text
Accept: */*
{
  "statusCode": 200,
  "data": {
    "status": "success",
    "msg": "Leaderboard fetched successfully.",
    "leaderboard": [
      {
        "paymail": "91@relysia.com",
        "totalAmount": 100,
        "uid": "5f7b1b1b1b1b1b1b1b1b1b1b",
        "rank": 1,
        "displayName": "John Doe"
      },
      {
        "paymail": "92@relysia.com",
        "totalAmount": 50,
        "uid": "5f7b1b1b1b1b1b1b1b1b1b1b",
        "rank": 2
      },
      {
        "totalAmount": 25,
        "uid": "5f7b1b1b1b1b1b1b1b1b1b1b",
        "rank": 3
      }
    ],
    "nextPageToken": 2
  }
}