cosmos/gov/v1beta1/proposals

Parameters

Object NameRequiredTypeDetail
proposal_status❌StringThe status of the proposals. Please see below.
voter❌StringThe voter address for the proposals.
depositor❌StringThe deposit addresses from the proposals.
pagination.key❌StringThe value returned in PageResponse.next_key to begin querying the next page most efficiently. If provided, then pagination.offset is not allowed.
pagination.offset❌IntegerA 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❌IntegerThe 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❌BooleanIf 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❌BooleanSet to true if results are to be returned in the descending order.
/cosmos/gov/v1beta1/proposals?pagination.limit=2

The status of the proposals:

  • PROPOSAL_STATUS_UNSPECIFIED: the default proposal status
  • PROPOSAL_STATUS_DEPOSIT_PERIOD: a proposal status during the deposit period.
  • PROPOSAL_STATUS_VOTING_PERIOD: a proposal status during the voting period.
  • PROPOSAL_STATUS_PASSED: a proposal status of a proposal that has passed.
  • PROPOSAL_STATUS_REJECTED: a proposal status of a proposal that has been rejected.
  • PROPOSAL_STATUS_FAILED: a proposal status of a proposal that has failed.

Result

All proposals based on given status.

Example

Request

curl <your-rest-endpoint>/cosmos/gov/v1beta1/proposals?pagination.limit=2 \
  -X GET \
  -H "accept: application/json"

Return

{
    "proposals": [
        {
            "proposal_id": "1",
            "content": {
                "@type": "/cosmos.gov.v1beta1.TextProposal",
                "title": "Adjustment of blocks_per_year to come aligned with actual block time",
                "description": "This governance proposal is for adjustment of blocks_per_year parameter to normalize the inflation rate and reward rate.\\n ipfs link: https://ipfs.io/ipfs/QmXqEBr56xeUzFpgjsmDKMSit3iqnKaDEL4tabxPXoz9xc"
            },
            "status": "PROPOSAL_STATUS_PASSED",
            "final_tally_result": {
                "yes": "97118903526799",
                "abstain": "402380577234",
                "no": "320545400000",
                "no_with_veto": "0"
            },
            "submit_time": "2019-03-20T06:41:27.040075748Z",
            "deposit_end_time": "2019-04-03T06:41:27.040075748Z",
            "total_deposit": [
                {
                    "denom": "uatom",
                    "amount": "512100000"
                }
            ],
            "voting_start_time": "2019-03-20T20:43:59.630492307Z",
            "voting_end_time": "2019-04-03T20:43:59.630492307Z"
        },
        {
            "proposal_id": "2",
            "content": {
                "@type": "/cosmos.gov.v1beta1.TextProposal",
                "title": "ATOM Transfer Enablement",
                "description": "A plan is proposed to set up a testnet using the Cosmos SDK v0.34.0 release, along with mainnet conditions, plus transfer enablement and increased block size, as a testing ground. Furthermore, a path for upgrading the cosmoshub-1 chain to use the Cosmos SDK release v0.34.0, along with the necessary updates to the genesis file, at block 425000, is outlined. IPFS: https://ipfs.io/ipfs/QmaUaMjXPE6i4gJR1NakQc15TZpSqjSrXNmrS1vA5veF9W"
            },
            "status": "PROPOSAL_STATUS_REJECTED",
            "final_tally_result": {
                "yes": "5195610593628",
                "abstain": "2619844783500",
                "no": "58322135404940",
                "no_with_veto": "43483296883256"
            },
            "submit_time": "2019-03-25T21:42:19.240550245Z",
            "deposit_end_time": "2019-04-08T21:42:19.240550245Z",
            "total_deposit": [
                {
                    "denom": "uatom",
                    "amount": "521400000"
                }
            ],
            "voting_start_time": "2019-03-25T23:44:04.098630937Z",
            "voting_end_time": "2019-04-08T23:44:04.098630937Z"
        }
    ],
    "pagination": {
        "next_key": "AAAAAAAAAAM=",
        "total": "0"
    }
}