Proposal (v1beta1)
curl --request GET \
--url https://cosmos-rest.publicnode.com/cosmos/gov/v1beta1/proposals/{proposalId}import requests
url = "https://cosmos-rest.publicnode.com/cosmos/gov/v1beta1/proposals/{proposalId}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://cosmos-rest.publicnode.com/cosmos/gov/v1beta1/proposals/{proposalId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://cosmos-rest.publicnode.com/cosmos/gov/v1beta1/proposals/{proposalId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://cosmos-rest.publicnode.com/cosmos/gov/v1beta1/proposals/{proposalId}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://cosmos-rest.publicnode.com/cosmos/gov/v1beta1/proposals/{proposalId}")
.asString();require 'uri'
require 'net/http'
url = URI("https://cosmos-rest.publicnode.com/cosmos/gov/v1beta1/proposals/{proposalId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"proposal": {
"proposal_id": "<string>",
"content": {
"@type": "<string>"
},
"status": "PROPOSAL_STATUS_UNSPECIFIED",
"final_tally_result": {
"yes": "<string>",
"abstain": "<string>",
"no": "<string>",
"no_with_veto": "<string>"
},
"submit_time": "2023-11-07T05:31:56Z",
"deposit_end_time": "2023-11-07T05:31:56Z",
"total_deposit": [
{
"denom": "<string>",
"amount": "<string>"
}
],
"voting_start_time": "2023-11-07T05:31:56Z",
"voting_end_time": "2023-11-07T05:31:56Z"
}
}{
"code": 123,
"message": "<string>",
"details": [
{
"@type": "<string>"
}
]
}gov
Proposal (v1beta1)
gRPC: cosmos.gov.v1beta1.Query/Proposal (reference)
Proposal queries proposal details based on ProposalID.
GET
/
cosmos
/
gov
/
v1beta1
/
proposals
/
{proposalId}
Proposal (v1beta1)
curl --request GET \
--url https://cosmos-rest.publicnode.com/cosmos/gov/v1beta1/proposals/{proposalId}import requests
url = "https://cosmos-rest.publicnode.com/cosmos/gov/v1beta1/proposals/{proposalId}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://cosmos-rest.publicnode.com/cosmos/gov/v1beta1/proposals/{proposalId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://cosmos-rest.publicnode.com/cosmos/gov/v1beta1/proposals/{proposalId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://cosmos-rest.publicnode.com/cosmos/gov/v1beta1/proposals/{proposalId}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://cosmos-rest.publicnode.com/cosmos/gov/v1beta1/proposals/{proposalId}")
.asString();require 'uri'
require 'net/http'
url = URI("https://cosmos-rest.publicnode.com/cosmos/gov/v1beta1/proposals/{proposalId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"proposal": {
"proposal_id": "<string>",
"content": {
"@type": "<string>"
},
"status": "PROPOSAL_STATUS_UNSPECIFIED",
"final_tally_result": {
"yes": "<string>",
"abstain": "<string>",
"no": "<string>",
"no_with_veto": "<string>"
},
"submit_time": "2023-11-07T05:31:56Z",
"deposit_end_time": "2023-11-07T05:31:56Z",
"total_deposit": [
{
"denom": "<string>",
"amount": "<string>"
}
],
"voting_start_time": "2023-11-07T05:31:56Z",
"voting_end_time": "2023-11-07T05:31:56Z"
}
}{
"code": 123,
"message": "<string>",
"details": [
{
"@type": "<string>"
}
]
}Path Parameters
proposal_id defines the unique id of the proposal.
Response
A successful response.
QueryProposalResponse is the response type for the Query/Proposal RPC method.
Proposal defines the core field members of a governance proposal.
Show child attributes
Show child attributes
Was this page helpful?