Scorefam’s Whitepaper
  • 👋About Scorefam
  • Scorefam Ecosystem
    • PredictPro
    • X-Predict
    • Lossless Sportsbook
  • FEATURE ADDONS
    • Genius AI Agent (v1.0.0)
  • Rewards
    • ⏺️Scorefam Points
    • 🔥Daily Streak Bonus
    • 🪙Preliminary SFT ($PSFT)
  • AFFILIATE PROGRAM
    • 🧰How it works
    • Become an Icon
  • Token (SFT)
    • 📚Token Utility
    • ⚖️Tokenomics
  • 🔗Website
  • ✖️Twitter
  • 🇸🇴Telegram
  • 🛖GitHub
  • Appendix
    • Developer Integration (PredictPro SDK)
      • 🛫Welcome
      • 🛫Initialization
      • Wallet Connection
      • Fetching Fixtures and Odds
        • Fetch Filtered Fixtures
        • Fetch Odds
        • Fetch Correct Scores
        • Fetch Home, Draw & Away Odds
      • Tournaments
        • Register
        • Current Tournament ID
        • Play Game
        • Get Tournament
      • Rewards
      • Leaderboard
        • Get Leaderboard
        • Get Formatted Leaderboard
      • Operator Revenue Share
      • Example Usage
Powered by GitBook
On this page
Export as PDF
  1. Appendix
  2. Developer Integration (PredictPro SDK)
  3. Leaderboard

Get Formatted Leaderboard

Fetches and formats the leaderboard with ranks for a specific tournament.

getFormattedLeaderboard

Fetches and formats the leaderboard with ranks for a specific tournament.

Syntax

getFormattedLeaderboard(tournamentID, userAddress)

Parameters

  • tournamentID: ID of the tournament.

  • userAddress (optional): Address of the user to highlight their rank.

Returns

  • Array: Leaderboard data with ranks and statistics.

Example

const leaderboard = await sdk.getFormattedLeaderboard(1, "0xUser...");
console.log(leaderboard);

Sample Return

[
  {
    "rank": 1,
    "address": "0x123...",
    "data": [30, 10, 5000]
  },
  {
    "rank": 2,
    "address": "0x456...",
    "data": [25, 8, 4500]
  }
]

PreviousGet LeaderboardNextOperator Revenue Share

Last updated 3 months ago