Skip to main content

Query Functions

All React hooks have corresponding async query functions for use in Node.js, server-side rendering, or vanilla JavaScript applications.

Overview

Query functions return Promises and can be used anywhere JavaScript runs:

DAO Functions

getDAOs

Fetch all DAOs with optional pagination and ordering.

getDAO

Fetch a single DAO by ID.

getDAOsByManager

Fetch DAOs managed by a specific address.

Proposal Functions

getProposals

Fetch proposals with optional filters.

getProposal

Fetch a single proposal by ID.

getProposalsByDAO

Fetch proposals for a specific DAO.

getActiveProposals

Fetch all currently active proposals across all DAOs.

Vote Functions

getVotes

Fetch votes with optional filters.

getVotesByProposal

Fetch all votes for a specific proposal.

getVotesByVoter

Fetch all votes cast by a specific address.

Delegate Functions

getDelegates

Fetch delegation records.

getDelegatesByDAO

Fetch delegates for a specific DAO.

getDelegationsFrom / getDelegationsTo

Fetch delegations from or to a specific address.

Token Holder Functions

getTokenHolders

Fetch token holders.

getTokenHoldersByDAO

Fetch holders for a specific DAO.

getTokenHoldingsByAddress

Fetch all holdings for an address across all DAOs.

Custom Client

All functions accept an optional client as the last parameter, e.g. to use an absolute handler URL outside the browser:
See the Advanced Guide for more details on custom clients.