query GetLeaderboardResults {
  mart_leaderboard_secret_v2(
    order_by: { points_rank: desc }
    limit: 5
  ) {
    points_rank
	rank_with_referral
    points_score
	referral_score
  }
}
{
  "data": {
    "mart_leaderboard_secret_v2": [
      {
        "points_rank": 1,
        "rank_with_referral": 5,
        "points_score": 31920,
        "referral_score": 0
      },
      {
        "points_rank": 2,
        "rank_with_referral": 3,
        "points_score": 13380,
        "referral_score": 500
      },
      {
        "points_rank": 3,
        "rank_with_referral": 4,
        "points_score": 10640,
        "referral_score": 100
      },
      {
        "points_rank": 4,
        "rank_with_referral": 1,
        "points_score": 9560,
        "referral_score": 1200
      },
      {
        "points_rank": 5,
        "rank_with_referral": 2,
        "points_score": 5320,
        "referral_score": 800
      }
    ]
  }
}
query GetLeaderboardResults {
  mart_leaderboard_secret_v2(
    order_by: { points_rank: desc }
    limit: 5
  ) {
    points_rank
	rank_with_referral
    points_score
	referral_score
  }
}
{
  "data": {
    "mart_leaderboard_secret_v2": [
      {
        "points_rank": 1,
        "rank_with_referral": 5,
        "points_score": 31920,
        "referral_score": 0
      },
      {
        "points_rank": 2,
        "rank_with_referral": 3,
        "points_score": 13380,
        "referral_score": 500
      },
      {
        "points_rank": 3,
        "rank_with_referral": 4,
        "points_score": 10640,
        "referral_score": 100
      },
      {
        "points_rank": 4,
        "rank_with_referral": 1,
        "points_score": 9560,
        "referral_score": 1200
      },
      {
        "points_rank": 5,
        "rank_with_referral": 2,
        "points_score": 5320,
        "referral_score": 800
      }
    ]
  }
}

The mart.leaderboard_secret_v2 table provides access to calculated leaderboard results and associated identity information for participants within a specific campaign. As a client, you have select (query) permissions on this table, allowing you to retrieve data for display in your application or for internal tracking. This includes both point source based scores and referral scores for each user.

You can test-drive the API in our interactive graphql playground here.

You will need an API key to set in an authorization header. If you don’t have one yet, you can create your own via your campaign in your app dashboard.

You can order the results (typically by points_rank ascending) and apply additional filters (e.g., finding a specific user by discord_username or user_id) using the order_by and where clauses in your GraphQL query.

Setting The Authorization Header

Before being able to introspect the schema through our interactive graphql playground or through a direct call, you will need to set the API key as an authorization header via this format:

{"Authorization": "Bearer <INSERT_KEY_HERE>"}

Endpoint URL

https://gql3.absinthe.network/v1/graphql

Request Method and Error Responses

  • Requests must be sent as POST, not GET.
  • On failure, you’ll still receive a 200 OK HTTP status, but the JSON response will include an errors array with details of what went wrong. Clients should inspect the errors field to detect and handle failures.

FAQ

Available Fields

When querying the mart.leaderboard_secret_v2 table, you can select the following fields in your selection set:

The client_season and added_by fields are visible via the gql queries but cannot be manually modified through mutations. The client_season field represents the name of your campaign and is used to organize and categorize point issuances.