Parameters
Object Name | Required | Type | Detail |
---|---|---|---|
PROPOSAL_ID | ✅ | Integer | The unique id of the proposal. |
pagination.key | ❌ | String | The value returned in PageResponse.next_key to begin querying the next page most efficiently. If provided, then pagination.offset is not allowed. |
pagination.offset | ❌ | Integer | A numeric offset that can be used when pagination.key is unavailable. It is less efficient than pagination.key . If provided, then pagination.key is not allowed. |
pagination.limit | ❌ | Integer | The total number of results to be returned in the result page. If left empty it will default to a value to be set by each app. |
pagination.count_total | ❌ | Boolean | If set to true , the result will include a count of the total number of items available for pagination. count_total is only respected when offset is used. It is ignored when key is set. |
pagination.reverse | ❌ | Boolean | Set to true if results are to be returned in the descending order. |
/cosmos/gov/v1beta1/proposals/646/votes?pagination.limit=2
Result
The votes of a given proposal.
Example
Request
curl <your-rest-endpoint>/cosmos/gov/v1beta1/proposals/646/votes?pagination.limit=2 \
-X GET \
-H "accept: application/json"
Return
{
"votes": [
{
"proposal_id": "646",
"voter": "cosmos1qqq22fsralalyq92xl29xv9xxqvtyc2f2r62xe",
"option": "VOTE_OPTION_NO_WITH_VETO",
"options": [
{
"option": "VOTE_OPTION_NO_WITH_VETO",
"weight": "1.000000000000000000"
}
]
},
{
"proposal_id": "646",
"voter": "cosmos1qq5k26kkjydu37wkyaua4wz6r7vf8ljkuqktkd",
"option": "VOTE_OPTION_NO_WITH_VETO",
"options": [
{
"option": "VOTE_OPTION_NO_WITH_VETO",
"weight": "1.000000000000000000"
}
]
}
],
"pagination": {
"next_key": "FABe8qytxhN9blBvCVYq8/DIhfeV",
"total": "0"
}
}