Skip to main content
POST
/
api
/
snapshot
/
votes
/
search
/snapshot/votes/search
curl --request POST \
  --url https://api.anysite.io/api/snapshot/votes/search \
  --header 'Content-Type: application/json' \
  --header 'access-token: <api-key>' \
  --data '
{
  "count": 2,
  "timeout": 300,
  "proposal": "<string>",
  "proposal_in": [
    "<string>"
  ],
  "voter": [
    "<string>"
  ],
  "space": "ens.eth",
  "created_after": 123,
  "created_before": 123,
  "vp_min": 123,
  "vp_max": 123,
  "order": "created",
  "ascending": false
}
'
[
  {
    "id": "<string>",
    "@type": "SnapshotVote",
    "ipfs": "<string>",
    "voter": "<string>",
    "choice": 123,
    "reason": "<string>",
    "vp": 123,
    "vp_value": 123,
    "vp_by_strategy": [],
    "vp_state": "<string>",
    "metadata": {},
    "proposal": {
      "id": "<string>",
      "@type": "SnapshotProposalRef",
      "state": "<string>"
    },
    "space": {
      "id": "<string>",
      "@type": "SnapshotSpaceRef",
      "name": "<string>",
      "image": "<string>",
      "network": "<string>"
    },
    "created_at": 123
  }
]

Authorizations

access-token
string
header
required

API token from the dashboard

Headers

access-token
string
required

Body

application/json
count
integer
required

Max number of votes to return

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

Max scrapping execution timeout (in seconds)

Required range: 20 <= x <= 1500
proposal
string | null

Filter by proposal id (all votes cast on one proposal)

Minimum string length: 1
proposal_in
string[] | null

Filter by several proposal ids at once

voter
string[] | null

Filter by one or more voter wallet addresses (a voter's voting history)

space
string | null

Filter by space id

Example:

"ens.eth"

created_after
integer | null

Only votes cast after this unix timestamp

created_before
integer | null

Only votes cast before this unix timestamp

vp_min
number | null

Only votes with voting power greater than this

vp_max
number | null

Only votes with voting power less than this

order
enum<string>
default:created

Sort field

Available options:
created,
vp
ascending
boolean
default:false

Sort ascending instead of descending

Response

Successful Response

id
string
required
@type
string
default:SnapshotVote
ipfs
string | null
voter
string | null
choice
reason
string | null
vp
number | null
vp_value
number | null
vp_by_strategy
number[]
vp_state
string | null
metadata
object
proposal
object
space
object
created_at
integer | null