Secret Network — Query (2/3)
API reference for Secret Network. All methods ->
Query
/cosmos/gov/v1beta1/proposals/{proposal_id}
Retrieves proposal details based on proposal ID.
Parameters
proposal_id(string; uint64; path; required): the unique ID of the proposal.
Returns
Response codes:
- 200 — success.
- default — unexpected error.
Request example
curl https://rpc.ankr.com/http/scrt_cosmos/cosmos/gov/v1beta1/proposals/{proposal_id}
Response example
{
"proposal": {
"proposal_id": "string",
"content": {
"type_url": "string",
"value": "string"
},
"status": "PROPOSAL_STATUS_UNSPECIFIED",
"final_tally_result": {
"yes": "string",
"abstain": "string",
"no": "string",
"no_with_veto": "string"
},
"submit_time": "2023-03-02T11:08:57.204Z",
"deposit_end_time": "2023-03-02T11:08:57.204Z",
"total_deposit": [
{
"denom": "string",
"amount": "string"
}
],
"voting_start_time": "2023-03-02T11:08:57.204Z",
"voting_end_time": "2023-03-02T11:08:57.204Z"
}
}
/cosmos/gov/v1beta1/proposals/{proposal_id}/deposits
Retrieves all deposits of a single proposal.
Parameters
proposal_id(string; uint64; path; required): the unique ID of the proposal.pagination.key(string; byte; query): key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of the pagination parameters should be set —pagination.keyorpagination.offset.pagination.offset(string; uint64; query): offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of the pagination parameters should be set —pagination.keyorpagination.offset.pagination.limit(string; uint64; query): limit is 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; query): count_total is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs. count_total is only respected when offset is used. It is ignored when key is set.pagination.reverse(boolean; query): reverse is set to true if results are to be returned in the descending order.
Returns
Response codes:
- 200 — success.
- default — unexpected error.
Request example
curl https://rpc.ankr.com/http/scrt_cosmos/cosmos/gov/v1beta1/proposals/{proposal_id}/deposits
Response example
{
"deposits": [
{
"proposal_id": "string",
"depositor": "string",
"amount": [
{
"denom": "string",
"amount": "string"
}
]
}
],
"pagination": {
"next_key": "string",
"total": "string"
}
}
/cosmos/gov/v1beta1/proposals/{proposal_id}/deposits/{depositor}
Retrieves single deposit information based on proposal ID and deposit address.
Parameters
proposal_id(string; uint64; path; required): the unique ID of the proposal.depositor(string; path; required): the deposit addresses from the proposals.
Returns
Response codes:
- 200 — success.
- default — unexpected error.
Request example
curl https://rpc.ankr.com/http/scrt_cosmos/cosmos/gov/v1beta1/proposals/{proposal_id}/deposits/{depositor}
Response example
{
"deposit": {
"proposal_id": "string",
"depositor": "string",
"amount": [
{
"denom": "string",
"amount": "string"
}
]
}
}
/cosmos/gov/v1beta1/proposals/{proposal_id}/tally
Retrieves the tally of a proposal vote.
Parameters
proposal_id(string; uint64; path; required): the unique ID of the proposal.
Returns
Response codes:
- 200 — success.
- default — unexpected error.
Request example
curl https://rpc.ankr.com/http/scrt_cosmos/cosmos/gov/v1beta1/proposals/{proposal_id}/tally
Response example
{
"tally": {
"yes": "string",
"abstain": "string",
"no": "string",
"no_with_veto": "string"
}
}
/cosmos/gov/v1beta1/proposals/{proposal_id}/votes
Retrieves the votes of a given proposal.
Parameters
proposal_id(string; uint64; path; required): the unique ID of the proposal.pagination.key(string; byte; query): key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of the pagination parameters should be set —pagination.keyorpagination.offset.pagination.offset(string; uint64; query): offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of the pagination parameters should be set —pagination.keyorpagination.offset.pagination.limit(string; uint64; query): limit is 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; query): count_total is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs. count_total is only respected when offset is used. It is ignored when key is set.pagination.reverse(boolean; query): reverse is set to true if results are to be returned in the descending order.
Returns
Response codes:
- 200 — success.
- default — unexpected error.
Request example
curl https://rpc.ankr.com/http/scrt_cosmos/cosmos/gov/v1beta1/proposals/{proposal_id}/votes
Response example
{
"votes": [
{
"proposal_id": "string",
"voter": "string",
"option": "VOTE_OPTION_UNSPECIFIED",
"options": [
{
"option": "VOTE_OPTION_UNSPECIFIED",
"weight": "string"
}
]
}
],
"pagination": {
"next_key": "string",
"total": "string"
}
}
/cosmos/gov/v1beta1/proposals/{proposal_id}/votes/{voter}
Retrieves voted information based on proposal ID and voter address.
Parameters
proposal_id(string; uint64; path; required): the unique ID of the proposal.voter(string; path; required): the voter address for the proposal.
Returns
Response codes:
- 200 — success.
- default — unexpected error.
Request example
curl https://rpc.ankr.com/http/scrt_cosmos/cosmos/gov/v1beta1/proposals/{proposal_id}/votes/{voter}
Response example
{
"vote": {
"proposal_id": "string",
"voter": "string",
"option": "VOTE_OPTION_UNSPECIFIED",
"options": [
{
"option": "VOTE_OPTION_UNSPECIFIED",
"weight": "string"
}
]
}
}
/cosmos/mint/v1beta1/annual_provisions
Retrieves the current minting annual provisions value.
Parameters
None.
Returns
Response codes:
- 200 — success.
- default — unexpected error.
Request example
curl https://rpc.ankr.com/http/scrt_cosmos/cosmos/mint/v1beta1/annual_provisions
Response example
{
"annual_provisions": "string"
}
/cosmos/mint/v1beta1/inflation
Retrieves the current minting inflation value.
Parameters
None.
Returns
Response codes:
- 200 — success.
- default — unexpected error.
Request example
curl https://rpc.ankr.com/http/scrt_cosmos/cosmos/mint/v1beta1/inflation
Response example
{
"inflation": "string"
}
/cosmos/mint/v1beta1/params
Retrieves the total set of minting parameters.
Parameters
None.
Returns
Response codes:
- 200 — success.
- default — unexpected error.
Request example
curl https://rpc.ankr.com/http/scrt_cosmos/cosmos/mint/v1beta1/params
Response example
{
"params": {
"mint_denom": "string",
"inflation_rate_change": "string",
"inflation_max": "string",
"inflation_min": "string",
"goal_bonded": "string",
"blocks_per_year": "string"
}
}
/cosmos/slashing/v1beta1/params
Retrieves the parameters of a slashing module.
Parameters
None.
Returns
Response codes:
- 200 — success.
- default — unexpected error.
Request example
curl https://rpc.ankr.com/http/scrt_cosmos/cosmos/slashing/v1beta1/params
Response example
{
"params": {
"signed_blocks_window": "string",
"min_signed_per_window": "string",
"downtime_jail_duration": "string",
"slash_fraction_double_sign": "string",
"slash_fraction_downtime": "string"
}
}
/cosmos/slashing/v1beta1/signing_infos
Retrieves signing info of all validators.
Parameters
pagination.key(string; byte; query): key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of the pagination parameters should be set —pagination.keyorpagination.offset.pagination.offset(string; uint64; query): offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of the pagination parameters should be set —pagination.keyorpagination.offset.pagination.limit(string; uint64; query): limit is 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; query): count_total is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs. count_total is only respected when offset is used. It is ignored when key is set.pagination.reverse(boolean; query): reverse is set to true if results are to be returned in the descending order.
Returns
Response codes:
- 200 — success.
- default — unexpected error.
Request example
curl https://rpc.ankr.com/http/scrt_cosmos/cosmos/slashing/v1beta1/signing_infos
Response example
{
"info": [
{
"address": "string",
"start_height": "string",
"index_offset": "string",
"jailed_until": "2023-03-02T11:34:53.641Z",
"tombstoned": true,
"missed_blocks_counter": "string"
}
],
"pagination": {
"next_key": "string",
"total": "string"
}
}
/cosmos/slashing/v1beta1/signing_infos/{cons_address}
Retrieves the signing info of given cons address.
Parameters
cons_address(string; path; required): the address to query signing info from.
Returns
Response codes:
- 200 — success.
- default — unexpected error.
Request example
curl https://rpc.ankr.com/http/scrt_cosmos/cosmos/slashing/v1beta1/signing_infos/{cons_address}
Response example
{
"val_signing_info": {
"address": "string",
"start_height": "string",
"index_offset": "string",
"jailed_until": "2023-03-02T11:37:10.986Z",
"tombstoned": true,
"missed_blocks_counter": "string"
}
}
/cosmos/staking/v1beta1/delegations/{delegator_addr}
Retrieves all delegations of a given delegator address.
Parameters
delegator_addr(string; path; required): the address of the delegator to query for.pagination.key(string; byte; query): key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of the pagination parameters should be set —pagination.keyorpagination.offset.pagination.offset(string; uint64; query): offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of the pagination parameters should be set —pagination.keyorpagination.offset.pagination.limit(string; uint64; query): limit is 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; query): count_total is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs. count_total is only respected when offset is used. It is ignored when key is set.pagination.reverse(boolean; query): reverse is set to true if results are to be returned in the descending order.
Returns
Response codes:
- 200 — success.
- default — unexpected error.
Request example
curl https://rpc.ankr.com/http/scrt_cosmos/cosmos/staking/v1beta1/delegations/{delegator_addr}
Response example
{
"delegation_responses": [
{
"delegation": {
"delegator_address": "string",
"validator_address": "string",
"shares": "string"
},
"balance": {
"denom": "string",
"amount": "string"
}
}
],
"pagination": {
"next_key": "string",
"total": "string"
}
}
/cosmos/staking/v1beta1/delegators/{delegator_addr}/redelegations
Retrieves redelegations of a given address.
Parameters
delegator_addr(string; path; required): the address of the delegator to query for.src_validator_addr(string; query): the validator address to redelegate from.dst_validator_addr(string; query): the validator address to redelegate to.pagination.key(string; byte; query): key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of the pagination parameters should be set —pagination.keyorpagination.offset.pagination.offset(string; uint64; query): offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of the pagination parameters should be set —pagination.keyorpagination.offset.pagination.limit(string; uint64; query): limit is 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; query): count_total is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs. count_total is only respected when offset is used. It is ignored when key is set.pagination.reverse(boolean; query): reverse is set to true if results are to be returned in the descending order.
Returns
Response codes:
- 200 — success.
- default — unexpected error.
Request example
curl https://rpc.ankr.com/http/scrt_cosmos/cosmos/staking/v1beta1/delegators/{delegator_addr}/redelegations
Response example
{
"redelegation_responses": [
{
"redelegation": {
"delegator_address": "string",
"validator_src_address": "string",
"validator_dst_address": "string",
"entries": [
{
"creation_height": "string",
"completion_time": "2023-03-02T11:44:00.360Z",
"initial_balance": "string",
"shares_dst": "string"
}
]
},
"entries": [
{
"redelegation_entry": {
"creation_height": "string",
"completion_time": "2023-03-02T11:44:00.360Z",
"initial_balance": "string",
"shares_dst": "string"
},
"balance": "string"
}
]
}
],
"pagination": {
"next_key": "string",
"total": "string"
}
}
/cosmos/staking/v1beta1/delegators/{delegator_addr}/unbonding_delegations
Retrieves all unbonding delegations of a given delegator address.
Parameters
delegator_addr(string; path; required): the address of the delegator to query for.pagination.key(string; byte; query): key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of the pagination parameters should be set —pagination.keyorpagination.offset.pagination.offset(string; uint64; query): offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of the pagination parameters should be set —pagination.keyorpagination.offset.pagination.limit(string; uint64; query): limit is 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; query): count_total is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs. count_total is only respected when offset is used. It is ignored when key is set.pagination.reverse(boolean; query): reverse is set to true if results are to be returned in the descending order.
Returns
Response codes:
- 200 — success.
- default — unexpected error.
Request example
curl https://rpc.ankr.com/http/scrt_cosmos/cosmos/staking/v1beta1/delegators/{delegator_addr}/unbonding_delegations
Reponse example
{
"unbonding_responses": [
{
"delegator_address": "string",
"validator_address": "string",
"entries": [
{
"creation_height": "string",
"completion_time": "2023-03-02T11:47:55.798Z",
"initial_balance": "string",
"balance": "string"
}
]
}
],
"pagination": {
"next_key": "string",
"total": "string"
}
}
/cosmos/staking/v1beta1/delegators/{delegator_addr}/validators
Retrieves all validators info for a given delegator address.
Parameters
delegator_addr(string; path; required): the address of the delegator to query for.pagination.key(string; byte; query): key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of the pagination parameters should be set —pagination.keyorpagination.offset.pagination.offset(string; uint64; query): offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of the pagination parameters should be set —pagination.keyorpagination.offset.pagination.limit(string; uint64; query): limit is 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; query): count_total is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs. count_total is only respected when offset is used. It is ignored when key is set.pagination.reverse(boolean; query): reverse is set to true if results are to be returned in the descending order.
Returns
Response codes:
- 200 — success.
- default — unexpected error.
Request example
curl https://rpc.ankr.com/http/scrt_cosmos/cosmos/staking/v1beta1/delegators/{delegator_addr}/validators
Response example
{
"validators": [
{
"operator_address": "string",
"consensus_pubkey": {
"type_url": "string",
"value": "string"
},
"jailed": true,
"status": "BOND_STATUS_UNSPECIFIED",
"tokens": "string",
"delegator_shares": "string",
"description": {
"moniker": "string",
"identity": "string",
"website": "string",
"security_contact": "string",
"details": "string"
},
"unbonding_height": "string",
"unbonding_time": "2023-03-02T11:50:03.594Z",
"commission": {
"commission_rates": {
"rate": "string",
"max_rate": "string",
"max_change_rate": "string"
},
"update_time": "2023-03-02T11:50:03.594Z"
},
"min_self_delegation": "string"
}
],
"pagination": {
"next_key": "string",
"total": "string"
}
}
/cosmos/staking/v1beta1/delegators/{delegator_addr}/validators/{validator_addr}
Retrieves validator info by given delegator validator pair.
Parameters
delegator_addr(string; path; required): the delegator address to query for.validator_addr(string; path; required): the validator address to query for.
Returns
Response codes:
- 200 — success.
- default — unexpected error.
Request example
curl https://rpc.ankr.com/http/scrt_cosmos/cosmos/staking/v1beta1/delegators/{delegator_addr}/validators/{validator_addr}
Response example
{
"validator": {
"operator_address": "string",
"consensus_pubkey": {
"type_url": "string",
"value": "string"
},
"jailed": true,
"status": "BOND_STATUS_UNSPECIFIED",
"tokens": "string",
"delegator_shares": "string",
"description": {
"moniker": "string",
"identity": "string",
"website": "string",
"security_contact": "string",
"details": "string"
},
"unbonding_height": "string",
"unbonding_time": "2023-03-02T11:52:10.807Z",
"commission": {
"commission_rates": {
"rate": "string",
"max_rate": "string",
"max_change_rate": "string"
},
"update_time": "2023-03-02T11:52:10.807Z"
},
"min_self_delegation": "string"
}
}
/cosmos/staking/v1beta1/historical_info/{height}
Retrieves the historical info for a given height.
Parameters
height(string; int64; path; required): the height at which to query the historical data.
Returns
Response codes:
- 200 — success.
- default — unexpected error.
Request example
curl https://rpc.ankr.com/http/scrt_cosmos/cosmos/staking/v1beta1/historical_info/{height}
Response example
{
"hist": {
"header": {
"version": {
"block": "string",
"app": "string"
},
"chain_id": "string",
"height": "string",
"time": "2023-03-02T11:55:21.837Z",
"last_block_id": {
"hash": "string",
"part_set_header": {
"total": 0,
"hash": "string"
}
},
"last_commit_hash": "string",
"data_hash": "string",
"validators_hash": "string",
"next_validators_hash": "string",
"consensus_hash": "string",
"app_hash": "string",
"last_results_hash": "string",
"evidence_hash": "string",
"proposer_address": "string"
},
"valset": [
{
"operator_address": "string",
"consensus_pubkey": {
"type_url": "string",
"value": "string"
},
"jailed": true,
"status": "BOND_STATUS_UNSPECIFIED",
"tokens": "string",
"delegator_shares": "string",
"description": {
"moniker": "string",
"identity": "string",
"website": "string",
"security_contact": "string",
"details": "string"
},
"unbonding_height": "string",
"unbonding_time": "2023-03-02T11:55:21.837Z",
"commission": {
"commission_rates": {
"rate": "string",
"max_rate": "string",
"max_change_rate": "string"
},
"update_time": "2023-03-02T11:55:21.837Z"
},
"min_self_delegation": "string"
}
]
}
}