Votes

Votes queries votes of a given proposal.

GEThttps://zetachain.nownodes.io/cosmos/gov/v1beta1/proposals/{proposal_id}/votes
Path parameters
proposal_id*string (uint64)

proposal_id defines the unique id of the proposal.

Query parameters
Response

A successful response.

Body
votesarray of object

votes defines the queried votes.

paginationobject

pagination defines the pagination in the response.

Request
const response = await fetch('https://zetachain.nownodes.io/cosmos/gov/v1beta1/proposals/{proposal_id}/votes', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
{
  "votes": [
    {
      "proposal_id": "text",
      "voter": "text",
      "option": "VOTE_OPTION_UNSPECIFIED",
      "options": [
        {
          "option": "VOTE_OPTION_UNSPECIFIED",
          "weight": "text"
        }
      ]
    }
  ],
  "pagination": {
    "next_key": "Ynl0ZXM=",
    "total": "text"
  }
}

Vote queries voted information based on proposalID, voterAddr.

GEThttps://zetachain.nownodes.io/cosmos/gov/v1beta1/proposals/{proposal_id}/votes/{voter}
Path parameters
proposal_id*string (uint64)

proposal_id defines the unique id of the proposal.

voter*string

voter defines the voter address for the proposals.

Response

A successful response.

Body
voteobject

Vote defines a vote on a governance proposal. A Vote consists of a proposal ID, the voter, and the vote option.

Request
const response = await fetch('https://zetachain.nownodes.io/cosmos/gov/v1beta1/proposals/{proposal_id}/votes/{voter}', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
{
  "vote": {
    "proposal_id": "text",
    "voter": "text",
    "option": "VOTE_OPTION_UNSPECIFIED",
    "options": [
      {
        "option": "VOTE_OPTION_UNSPECIFIED",
        "weight": "text"
      }
    ]
  }
}