API

You can use the Hub GraphQL API to create flexible queries for the data you need to integrate with Snapshot.

There is a limit of 60 requests per minute with the API, to get higher limits please apply for an API Key by following this guide: API Keys

Hub GraphQL API - Explorer

You can run queries on Snapshot data using a GraphQL Explorer.

We have exposed an integrated development environment in the browser that includes docs, syntax highlighting, and validation errors. Click the link below to access the interface.

Endpoints

Production hub

Demo hub

Queries

Get a single space

Arguments

id string

Example

Try on GraphiQL

Get multiple spaces

Arguments

first number skip number where: - idstring - id_inarray orderBy string orderDirection asc or desc

Example

Try on GraphiQL

Get a single proposal

Arguments

id string

Example

Try on GraphiQL

Get proposals

Arguments

first number skip number where: - idstring - id_inarray - space:string - space_in:array - author:string - author_in:array - network: string - network_in: array - state: array orderBy string orderDirection asc or desc

Example

Try on GraphiQL

Get a single vote

Arguments

id string

Example

Try on GraphiQL

Get votes

Arguments

first number skip number where: - idstring - id_inarray - space:string - space_in:array - voter:string - voter_in:array - proposal: string - proposal_in: array orderBy string orderDirection asc or desc

Example

Try on GraphiQL

Get voting power

Arguments

voter string space string proposal string

Example

Try on GraphiQL

Get follows

Arguments

first number skip number where: - idstring - id_inarray - space:string - space_in:array - follower:string - follower_in:array orderBy string orderDirection asc or desc

Example

Try on GraphiQL

Get users

Arguments

first number skip number where: - id:string - id_in:array orderBy string orderDirection asc or desc

Example

Try on GraphiQL

Get roles

Arguments

first number skip number where: - address:string orderBy string orderDirection asc or desc

Try on GraphiQL

Aliases

TBD

Get messages

Messages are all the actions (votes, proposals, space settings etc..) that was confirmed on Snapshot, it also include the order on which these actions were confirmed with the field "mci". These messages can be used to replay the whole Snapshot hub API.

Arguments

first number skip number where: - timestampstring - spacearray - space_in:array - type:string - type_in:string orderBy string orderDirection asc or desc

Example

Try on GraphiQL

Last updated

Was this helpful?