---
title: "VotesByProposal queries a vote by proposal id."
method: GET
path: "/cosmos/group/v1/votes_by_proposal/{proposalId}"
tags: ["Query"]
---

# VotesByProposal queries a vote by proposal id.

`GET /cosmos/group/v1/votes_by_proposal/{proposalId}`

## Request

- The document declares no server URL.
- Auth: none declared
- TypeScript: <https://skmtc.dev/haqq-network/apis/haqq-network-grpc-api/docs/cosmos/group/v1/votes_by_proposal/:proposalId/get.ts> (a function with typed inputs; its response is checked against the schema)

## Path parameters

- `proposalId` string, uint64, required

## Query parameters

- `pagination.key` string, byte
- `pagination.offset` string, uint64
- `pagination.limit` string, uint64
- `pagination.countTotal` boolean
- `pagination.reverse` boolean

## Response `200`

A successful response.

- CosmosGroupV1QueryVotesByProposalResponse: QueryVotesByProposalResponse is the Query/VotesByProposal response type.
  - `votes` CosmosGroupV1Vote[]: votes are the list of votes for given proposal_id.
    - `proposalId` string, uint64: proposal is the unique ID of the proposal.
    - `voter` string: voter is the account address of the voter.
    - `option` 'VOTE_OPTION_UNSPECIFIED' | 'VOTE_OPTION_YES' | 'VOTE_OPTION_ABSTAIN' | 'VOTE_OPTION_NO' | 'VOTE_OPTION_NO_WITH_VETO': VoteOption enumerates the valid vote options for a given proposal. - VOTE_OPTION_UNSPECIFIED: VOTE_OPTION_UNSPECIFIED defines an unspecified vote option which will return an error. - VOTE_OPTION_YES: VOTE_OPTION_YES defines a yes vote option. - VOTE_OPTION_ABSTAIN: VOTE_OPTION_ABSTAIN defines an abstain vote option. - VOTE_OPTION_NO: VOTE_OPTION_NO defines a no vote option. - VOTE_OPTION_NO_WITH_VETO: VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option.
    - `metadata` string
    - `submitTime` string, date-time: submit_time is the timestamp when the vote was submitted.
  - `pagination` CosmosBaseQueryV1beta1PageResponse: PageResponse is to be embedded in gRPC response messages where the corresponding request message has used PageRequest. message SomeResponse { repeated Bar results = 1; PageResponse page = 2; }
    - `nextKey` string, byte: next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results.
    - `total` string, uint64

## Other responses

- `default`: An unexpected error response.

---

[API](https://skmtc.dev/haqq-network/apis/haqq-network-grpc-api.md) - [All operations](https://skmtc.dev/haqq-network/apis/haqq-network-grpc-api/llms.txt) - [OpenAPI document](https://skmtc.dev/haqq-network/apis/haqq-network-grpc-api/revisions/2d0419923f40?raw)
