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

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.
https://hub.snapshot.org/graphql
hub.snapshot.org

Endpoints

Production hub
1
https://hub.snapshot.org/graphql
Copied!
Demo hub
1
https://testnet.snapshot.org/graphql
Copied!

Queries

Get a single space

Arguments

id string

Example

Request
Response
1
query {
2
space(id: "yam.eth") {
3
id
4
name
5
about
6
network
7
symbol
8
members
9
}
10
}
Copied!
1
{
2
"data": {
3
"space": {
4
"id": "yam.eth",
5
"name": "Yam Finance",
6
"about": "",
7
"network": "1",
8
"symbol": "YAM",
9
"members": [
10
"0x683A78bA1f6b25E29fbBC9Cd1BFA29A51520De84",
11
"0x9Ebc8AD4011C7f559743Eb25705CCF5A9B58D0bc",
12
"0xC3edCBe0F93a6258c3933e86fFaA3bcF12F8D695",
13
"0xbdac5657eDd13F47C3DD924eAa36Cf1Ec49672cc",
14
"0xEC3281124d4c2FCA8A88e3076C1E7749CfEcb7F2"
15
]
16
}
17
}
18
}
Copied!
Try on GraphiQL

Get multiple spaces

Arguments

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

Example

Request
Response
1
query {
2
spaces(
3
first: 20,
4
skip: 0,
5
orderBy: "created",
6
orderDirection: asc
7
) {
8
id
9
name
10
about
11
network
12
symbol
13
strategies {
14
name
15
params
16
}
17
admins
18
members
19
filters {
20
minScore
21
onlyMembers
22
}
23
plugins
24
}
25
}
Copied!
1
{
2
"data": {
3
"spaces": [
4
{
5
"id": "bonustrack.eth",
6
"name": "Fabien",
7
"about": "",
8
"network": "1",
9
"symbol": "TICKET",
10
"strategies": [
11
{
12
"name": "erc20-balance-of",
13
"params": {
14
"symbol": "DAI",
15
"address": "0x6B175474E89094C44Da98b954EedeAC495271d0F",
16
"decimals": 18
17
}
18
}
19
],
20
"admins": [],
21
"members": [
22
"0x24A12Fa313F57aF541d447c594072A992c605DCf"
23
],
24
"filters": {
25
"minScore": 0,
26
"onlyMembers": false
27
},
28
"plugins": {
29
"quorum": {
30
"total": 500,
31
"strategy": "static"
32
}
33
}
34
}
35
]
36
}
37
}
Copied!
Try on GraphiQL

Get a single proposal

Arguments

id string

Example

Request
Response
1
query {
2
proposal(id:"QmWbpCtwdLzxuLKnMW4Vv4MPFd2pdPX71YBKPasfZxqLUS") {
3
id
4
title
5
body
6
choices
7
start
8
end
9
snapshot
10
state
11
author
12
created
13
plugins
14
network
15
strategies {
16
name
17
params
18
}
19
space {
20
id
21
name
22
}
23
}
24
}
Copied!
1
{
2
"data": {
3
"proposal": {
4
"id": "QmWbpCtwdLzxuLKnMW4Vv4MPFd2pdPX71YBKPasfZxqLUS",
5
"title": "Select Initial Umbrella Metapool",
6
"body": "Eventually, we hope that anyone will be able to create a metapool and fund a protection market for their project, but right now we want to start small and pick one pool that we will debut as a beta launch for Umbrella that will help us gather information and insight into the state of the market. In the future we can have all of these and more. Here are the choices:\n### Option 1: BlueChips MetaPool\n\nYou might consider this the safest of the pools. It contains a collection of different “blue-chip projects” across multiple verticals that have proven track records and are considered industry leaders. These include:\n\n* (3) Bluechip protocols: MakerDAO, Compound, and Uniswap. These are commonly seen as the most battletested and trusted DeFi projects on Ethereum.\n* (2) Centralized exchanges: Coinbase and Binance. These are the most popular and generally considered to be most reputable exchanges around. *note: Payout occurs only if Safu funds or the exchange’s insurance do not cover losses.\n* (2) Hardware Wallet companies, Ledger and Trezor, including the Ledger Nano S and X, and the Trezor Model T and One. This would cover large scale exploits in their hardware or firmware and would not cover individual loss due to phishing or poor security.\n\n### Option 2: Hot New Projects MetaPool\n\nThis pool targets newer projects on Ethereum that are considered reputable and have high TVL but are less battle tested and therefore may be more risky. While they may be more risky, this may mean that there is more demand for coverage for them in the market. This list is preliminary but internal discussions considered including:\n\n * Alchemix\n* OHM\n* Liquity\n* FEI\n* Integral\n* Reflexer\n\n### Option 3: Integrated DegenV2 MetaPool\n\nThis last option focuses more closely on YAM products, specifically DegenV2 and the constituent protocols that it uses. This option would let us insure our own users and potentially test out our products in a more limited environment. The covered protocols would be:\n\n * UMA\n * Sushiswap/Uniswap depending on where our pools live\n * Any YAM contracts that are used\n * Any future contracts included in future versions of Degen.\n\n### Choose wisely!\n",
7
"choices": [
8
"Option 1: BlueChips MetaPool",
9
"Option 2: Hot New Projects MetaP",
10
"Option 3: Integrated DegenV2 Met"
11
],
12
"start": 1620676800,
13
"end": 1620806400,
14
"snapshot": "12408670",
15
"state": "closed",
16
"author": "0xEC3281124d4c2FCA8A88e3076C1E7749CfEcb7F2",
17
"space": {
18
"id": "yam.eth",
19
"name": "Yam Finance"
20
}
21
}
22
}
23
}
Copied!
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

Request
Response
1
query {
2
proposals (
3
first: 20,
4
skip: 0,
5
where: {
6
space_in: ["yam.eth"],
7
state: "closed"
8
},
9
orderBy: "created",
10
orderDirection: desc
11
) {
12
id
13
title
14
body
15
choices
16
start
17
end
18
snapshot
19
state
20
author
21
space {
22
id
23
name
24
}
25
}
26
}
Copied!
1
{
2
"data": {
3
"proposals": [
4
{
5
"id": "QmWbpCtwdLzxuLKnMW4Vv4MPFd2pdPX71YBKPasfZxqLUS",
6
"title": "Select Initial Umbrella Metapool",
7
"body": "Eventually, we hope that anyone will be able to create a metapool and fund a protection market for their project, but right now we want to start small and pick one pool that we will debut as a beta launch for Umbrella that will help us gather information and insight into the state of the market. In the future we can have all of these and more. Here are the choices:\n### Option 1: BlueChips MetaPool\n\nYou might consider this the safest of the pools. It contains a collection of different “blue-chip projects” across multiple verticals that have proven track records and are considered industry leaders. These include:\n\n* (3) Bluechip protocols: MakerDAO, Compound, and Uniswap. These are commonly seen as the most battletested and trusted DeFi projects on Ethereum.\n* (2) Centralized exchanges: Coinbase and Binance. These are the most popular and generally considered to be most reputable exchanges around. *note: Payout occurs only if Safu funds or the exchange’s insurance do not cover losses.\n* (2) Hardware Wallet companies, Ledger and Trezor, including the Ledger Nano S and X, and the Trezor Model T and One. This would cover large scale exploits in their hardware or firmware and would not cover individual loss due to phishing or poor security.\n\n### Option 2: Hot New Projects MetaPool\n\nThis pool targets newer projects on Ethereum that are considered reputable and have high TVL but are less battle tested and therefore may be more risky. While they may be more risky, this may mean that there is more demand for coverage for them in the market. This list is preliminary but internal discussions considered including:\n\n * Alchemix\n* OHM\n* Liquity\n* FEI\n* Integral\n* Reflexer\n\n### Option 3: Integrated DegenV2 MetaPool\n\nThis last option focuses more closely on YAM products, specifically DegenV2 and the constituent protocols that it uses. This option would let us insure our own users and potentially test out our products in a more limited environment. The covered protocols would be:\n\n * UMA\n * Sushiswap/Uniswap depending on where our pools live\n * Any YAM contracts that are used\n * Any future contracts included in future versions of Degen.\n\n### Choose wisely!\n",
8
"choices": [
9
"Option 1: BlueChips MetaPool",
10
"Option 2: Hot New Projects MetaP",
11
"Option 3: Integrated DegenV2 Met"
12
],
13
"start": 1620676800,
14
"end": 1620806400,
15
"snapshot": "12408670",
16
"state": "closed",
17
"author": "0xEC3281124d4c2FCA8A88e3076C1E7749CfEcb7F2",
18
"space": {
19
"id": "yam.eth",
20
"name": "Yam Finance"
21
}
22
},
23
...
24
]
25
}
26
}
Copied!
Try on GraphiQL

Get a single vote

Arguments

id string

Example

Request
Response
1
query {
2
vote (
3
id: "QmeU7ct9Y4KLrh6F6mbT1eJNMkeQKMSnSujEfMCfbRLCMp"
4
) {
5
id
6
voter
7
created
8
proposal
9
choice
10
space {
11
id
12
}
13
}
14
}
Copied!
1
{
2
"data": {
3
"vote": {
4
"id": "QmeU7ct9Y4KLrh6F6mbT1eJNMkeQKMSnSujEfMCfbRLCMp",
5
"voter": "0x96176C25803Ce4cF046aa74895646D8514Ea1611",
6
"created": 1621183227,
7
"proposal": "QmPvbwguLfcVryzBRrbY4Pb9bCtxURagdv1XjhtFLf3wHj",
8
"choice": 1,
9
"space": {
10
"id": "spookyswap.eth"
11
}
12
}
13
}
14
}
Copied!
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

Request
Response
1
query {
2
votes (
3
first: 1000
4
skip: 0
5
where: {
6
proposal: "QmPvbwguLfcVryzBRrbY4Pb9bCtxURagdv1XjhtFLf3wHj"
7
}
8
orderBy: "created",
9
orderDirection: desc
10
) {
11
id
12
voter
13
created
14
proposal
15
choice
16
space {
17
id
18
}
19
}
20
}
Copied!
1
{
2
"data": {
3
"votes": [
4
{
5
"id": "QmeU7ct9Y4KLrh6F6mbT1eJNMkeQKMSnSujEfMCfbRLCMp",
6
"voter": "0x96176C25803Ce4cF046aa74895646D8514Ea1611",
7
"created": 1621183227,
8
"proposal": "QmPvbwguLfcVryzBRrbY4Pb9bCtxURagdv1XjhtFLf3wHj",
9
"choice": 1,
10
"space": {
11
"id": "spookyswap.eth"
12
}
13
},
14
{
15
"id": "QmZ2CV86QH6Q6z7L6g7yJWS3HfgD9aQ3uTYYMXkMa5trHf",
16
"voter": "0x2686EaD94C5042e56a41eDde6533711a4303CC52",
17
"created": 1621181827,
18
"proposal": "QmPvbwguLfcVryzBRrbY4Pb9bCtxURagdv1XjhtFLf3wHj",
19
"choice": 1,
20
"space": {
21
"id": "spookyswap.eth"
22
}
23
},
24
...
25
]
26
}
27
}
Copied!
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

Request
Response
1
query {
2
follows(
3
first: 10,
4
where: {
5
follower: "0xeF8305E140ac520225DAf050e2f71d5fBcC543e7"
6
}
7
) {
8
follower
9
space {
10
id
11
}
12
created
13
}
14
}
Copied!
1
{
2
"data": {
3
"follows": [
4
{
5
"follower": "0xeF8305E140ac520225DAf050e2f71d5fBcC543e7",
6
"space": {
7
"id": "gnosis.eth"
8
},
9
"created": 1629732280
10
},
11
{
12
"follower": "0xeF8305E140ac520225DAf050e2f71d5fBcC543e7",
13
"space": {
14
"id": "aavegotchi.eth"
15
},
16
"created": 1629725098
17
},
18
{
19
"follower": "0xeF8305E140ac520225DAf050e2f71d5fBcC543e7",
20
"space": {
21
"id": "yam.eth"
22
},
23
"created": 1629723970
24
},
25
{
26
"follower": "0xeF8305E140ac520225DAf050e2f71d5fBcC543e7",
27
"space": {
28
"id": "balancer.eth"
29
},
30
"created": 1629723960
31
}
32
]
33
}
34
}
Copied!
Try on GraphiQL

Aliases

TBD
Last modified 1mo ago