Skip to main content
POST
/
api
/
snapshot
/
spaces
/
leaderboard
/snapshot/spaces/leaderboard
curl --request POST \
  --url https://api.anysite.io/api/snapshot/spaces/leaderboard \
  --header 'Content-Type: application/json' \
  --header 'access-token: <api-key>' \
  --data '
{
  "space": "<string>",
  "count": 2,
  "timeout": 300,
  "order": "votesCount",
  "ascending": false
}
'
[
  {
    "user": "<string>",
    "@type": "SnapshotLeaderboardEntry",
    "space": "<string>",
    "proposal_count": 123,
    "vote_count": 123,
    "last_vote_at": 123
  }
]

Authorizations

access-token
string
header
required

API token from the dashboard

Headers

access-token
string
required

Body

application/json
space
string
required

Space id

Minimum string length: 1
Examples:

"ens.eth"

"aave.eth"

count
integer
required

Max number of leaderboard entries to return

Required range: x >= 1
timeout
integer
default:300

Max scrapping execution timeout (in seconds)

Required range: 20 <= x <= 1500
order
enum<string>
default:votesCount

Sort field

Available options:
votesCount,
proposalsCount,
lastVote
ascending
boolean
default:false

Sort ascending instead of descending

Response

Successful Response

user
string
required
@type
string
default:SnapshotLeaderboardEntry
space
string | null
proposal_count
integer | null
vote_count
integer | null
last_vote_at
integer | null