GetStakingParams
curl --request GET \
--url https://api.example.com/staking/paramsimport requests
url = "https://api.example.com/staking/params"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/staking/params', 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://api.example.com/staking/params",
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://api.example.com/staking/params"
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://api.example.com/staking/params")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/staking/params")
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{
"code": 200,
"msg": {
"params": {
"unbonding_time": "10000000000",
"max_validators": 32,
"max_entries": 14,
"historical_entries": 10000,
"bond_denom": "stake",
"min_commission_rate": "0.050000000000000000",
"min_delegation": "1024000000000",
"periods": [
{
"duration": "0",
"rewards_multiplier": "1.000000000000000000"
},
{
"period_type": 1,
"duration": "60000000000",
"rewards_multiplier": "1.051000000000000000"
},
{
"period_type": 2,
"duration": "120000000000",
"rewards_multiplier": "1.160000000000000000"
},
{
"period_type": 3,
"duration": "900000000000",
"rewards_multiplier": "1.340000000000000000"
}
],
"token_types": [
{
"rewards_multiplier": "0.500000000000000000"
},
{
"token_type": 1,
"rewards_multiplier": "1.000000000000000000"
}
],
"singularity_height": "600"
}
},
"error": ""
}Cosmos Origin/Staking
GetStakingParams
GET
/
staking
/
params
GetStakingParams
curl --request GET \
--url https://api.example.com/staking/paramsimport requests
url = "https://api.example.com/staking/params"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/staking/params', 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://api.example.com/staking/params",
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://api.example.com/staking/params"
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://api.example.com/staking/params")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/staking/params")
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{
"code": 200,
"msg": {
"params": {
"unbonding_time": "10000000000",
"max_validators": 32,
"max_entries": 14,
"historical_entries": 10000,
"bond_denom": "stake",
"min_commission_rate": "0.050000000000000000",
"min_delegation": "1024000000000",
"periods": [
{
"duration": "0",
"rewards_multiplier": "1.000000000000000000"
},
{
"period_type": 1,
"duration": "60000000000",
"rewards_multiplier": "1.051000000000000000"
},
{
"period_type": 2,
"duration": "120000000000",
"rewards_multiplier": "1.160000000000000000"
},
{
"period_type": 3,
"duration": "900000000000",
"rewards_multiplier": "1.340000000000000000"
}
],
"token_types": [
{
"rewards_multiplier": "0.500000000000000000"
},
{
"token_type": 1,
"rewards_multiplier": "1.000000000000000000"
}
],
"singularity_height": "600"
}
},
"error": ""
}⌘I