Skip to main content
curl --request GET \
  --url 'https://api.longshot.xyz/v1/contests/550e8400-e29b-41d4-a716-446655440000/leaderboard?limit=10' \
  --header 'Authorization: Bearer <session_token>'
{
  "total_entries": 42,
  "entries": [
    {
      "rank": 1,
      "user_id": "11111111-1111-1111-1111-111111111111",
      "entry_index": 0,
      "handle": "alice",
      "x_handle": "alice",
      "x_avatar_url": null,
      "avatar_seed": 12345,
      "resolved_win_count": 5,
      "open_leg_count": 0,
      "payout_micros": 2500000,
      "net_payout_micros": 1500000
    }
  ],
  "caller": { "rows": [] }
}
curl --request GET \
  --url 'https://api.longshot.xyz/v1/contests/550e8400-e29b-41d4-a716-446655440000/leaderboard?limit=10' \
  --header 'Authorization: Bearer <session_token>'
{
  "total_entries": 42,
  "entries": [
    {
      "rank": 1,
      "user_id": "11111111-1111-1111-1111-111111111111",
      "entry_index": 0,
      "handle": "alice",
      "x_handle": "alice",
      "x_avatar_url": null,
      "avatar_seed": 12345,
      "resolved_win_count": 5,
      "open_leg_count": 0,
      "payout_micros": 2500000,
      "net_payout_micros": 1500000
    }
  ],
  "caller": { "rows": [] }
}

Endpoint

GET https://api.longshot.xyz/v1/contests/{id}/leaderboard
Authorization: Bearer <session_token>
Returns the top contest entries. The endpoint is public, but a valid bearer session can add a nested caller.rows section when the caller entered and is outside the top slice.

Headers

Authorization
string
Optional Bearer <session_token> from wallet auth or Privy session auth.

Path Parameters

id
uuid
required
Contest ID returned by GET /v1/contests.

Query Parameters

limit
int32
Maximum leaderboard rows to return. Defaults to 10; the server clamps to 1..=100.

Response Fields

total_entries
int32
Total number of entries in the contest.
entries
array
Top leaderboard rows.
entries[].rank
int32
Contest rank.
entries[].user_id
uuid
Entrant user ID.
entries[].entry_index
int32
Entry index for the entrant.
entries[].handle
string | null
Longshot handle when the user has one.
entries[].x_handle
string | null
Linked X handle when available.
entries[].x_avatar_url
string | null
Linked X avatar URL when available.
entries[].avatar_seed
int32
Deterministic seed for generated avatar rendering.
entries[].resolved_win_count
int32
Count of resolved winning picks.
entries[].open_leg_count
int32
Count of picks that are not resolved yet.
entries[].payout_micros
int64 | null
Gross payout in micros when available.
entries[].net_payout_micros
int64 | null
Net payout in micros when available.
caller
object | null
Caller-owned leaderboard fields. Null when the request is unauthenticated.
caller.rows
array
Caller rows outside the top slice. Empty when authenticated but not entered, or already included in entries.