Integrations

The GraphQL API

Read spaces, proposals, votes and delegations from hub.raad.vote.

The hub serves everything Raad stores, to anyone, at:

https://hub.raad.vote/graphql

Send a POST with a JSON body: query and, if you use them, variables. No key is needed. Each IP may send up to 600 requests a minute.

A space

query {
  space(id: "walletconnect.eth") {
    id
    name
    about
    network
    symbol
    strategies { name network params }
    voting { delay period type quorum }
    proposalsCount
    followersCount
  }
}

Its latest proposals

query {
  proposals(
    first: 10
    where: { space: "walletconnect.eth" }
    orderBy: "created"
    orderDirection: desc
  ) {
    id
    title
    state
    choices
    scores
    scores_total
    end
  }
}

A proposal's votes

query {
  votes(
    first: 1000
    where: { proposal: "PROPOSAL_ID" }
    orderBy: "vp"
    orderDirection: desc
  ) {
    voter
    choice
    vp
    reason
    created
  }
}

A page holds at most 1,000 votes, and skip goes up to 5,000. For more, page by time: ask again with created_lte set to the last vote's created.

Voting power

query {
  vp(voter: "0xADDRESS", space: "walletconnect.eth") {
    vp
    vp_by_strategy
  }
}

Delegates and delegations

Raad's hub also serves the delegations its spaces count:

query {
  delegates(
    first: 20
    where: { space: "walletconnect.eth", global: false }
    orderBy: "delegatedVp"
  ) {
    id
    delegatorsCount
    delegatedVp
    vpBlock
    vpState
  }
}
  • global: false counts only the delegations made for the space; leave it out to include those made for every space.
  • orderBy is delegatedVp or delegatorsCount.
  • vpState is final (counted at vpBlock), pending (being counted, values are null) or none (the space counts no delegation).
  • delegations(where: { space, delegate }) lists a delegate's delegators, with orderBy: "vp" for most power first.