For AI agents: an LLM-friendly Markdown version of every page is available by appending .md to its URL or by sending an Accept: text/markdown request header. The full documentation index is at https://www.ankr.com/docs/llms.txt
Skip to main content

TAC — Cosmos REST methods (2/4)

API reference for TAC. All methods ->

Part 2 of 4: 1 · 2 · 3 · 4

/cosmos/staking/v1beta1/delegators/{delegator_addr}/validators​

Retrieves all validators info for given delegator address.

Parameters​

  • delegator_addr (string; required): a delegator address to query for.
  • pagination.key (string, byte): a value returned in PageResponse.next_key to begin querying the next page efficiently. Only one of offset or key should be set.
  • pagination.key (string, uint64): a numeric offset that can be used when key is unavailable (less efficient than using key). Only one of offset or key should be set.
  • pagination.limit (string, uint64): a total number of results to be returned in the results page. If empty, will default to a value to be set by each app.
  • pagination.count_total (boolean): set to true to indicate that the result set should include a count of the total number of items available for pagination in the UIs. Only respected when offset is used, ignored when key is set.

Returns​

Validator info for a specific delegator address.

Request example​

curl https://rpc.ankr.com/http/tac_turin_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": "2021-01-19T07:06:38.006Z",
"commission": {
"commission_rates": {
"rate": "string",
"max_rate": "string",
"max_change_rate": "string"
},
"update_time": "2021-01-19T07:06:38.006Z"
},
"min_self_delegation": "string"
}
],
"pagination": {
"next_key": "string",
"total": "string"
}
}

/cosmos/staking/v1beta1/delegators/{delegator_addr}/validators/{validator_addr}​

Retrieves validator info for a given delegator-validator pair.

Parameters​

  • delegator_addr (string; required): a delegator address to query for.
  • validator_addr (string; required): a validator address to query for.

Returns​

Validator info for a given delegator pair.

Request example​

curl https://rpc.ankr.com/http/tac_turin_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": "2021-01-19T07:08:34.100Z",
"commission": {
"commission_rates": {
"rate": "string",
"max_rate": "string",
"max_change_rate": "string"
},
"update_time": "2021-01-19T07:08:34.100Z"
},
"min_self_delegation": "string"
}
}

/cosmos/staking/v1beta1/historical_info/{height}​

Retrieves the historical info for a given height.

Parameters​

  • height (string, int64): defines at which height to query the historical info for.

Returns​

Historical info for a given height.

Request example​

curl https://rpc.ankr.com/http/tac_turin_cosmos/cosmos/staking/v1beta1/historical_info/{height}

Response example​

{
"hist": {
"header": {
"version": {
"block": "string",
"app": "string"
},
"chain_id": "string",
"height": "string",
"time": "2021-01-19T07:13:57.974Z",
"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": "2021-01-19T07:13:57.974Z",
"commission": {
"commission_rates": {
"rate": "string",
"max_rate": "string",
"max_change_rate": "string"
},
"update_time": "2021-01-19T07:13:57.974Z"
},
"min_self_delegation": "string"
}
]
}
}

/cosmos/staking/v1beta1/params​

Retrieves the staking parameters.

Parameters​

None.

Returns​

Staking parameters.

Request example​

curl https://rpc.ankr.com/http/tac_turin_cosmos/cosmos/staking/v1beta1/params

Response example​

{
"params": {
"unbonding_time": "string",
"max_validators": 0,
"max_entries": 0,
"historical_entries": 0,
"bond_denom": "string"
}
}

/cosmos/staking/v1beta1/pool​

Retrieves the pool info.

Parameters​

None.

Returns​

Pool info.

Request example​

curl https://rpc.ankr.com/http/tac_turin_cosmos/cosmos/staking/v1beta1/pool

Response example​

{
"pool": {
"not_bonded_tokens": "string",
"bonded_tokens": "string"
}
}

/cosmos/staking/v1beta1/validators​

Retrieves all validators that match the given status.

Parameters​

  • status (string): a status to query validators by.
  • pagination.key (string, byte): a value returned in PageResponse.next_key to begin querying the next page efficiently. Only one of offset or key should be set.
  • pagination.key (string, uint64): a numeric offset that can be used when key is unavailable (less efficient than using key). Only one of offset or key should be set.
  • pagination.limit (string, uint64): a total number of results to be returned in the results page. If empty, will default to a value to be set by each app.
  • pagination.count_total (boolean): set to true to indicate that the result set should include a count of the total number of items available for pagination in the UIs. Only respected when offset is used, ignored when key is set.

Returns​

Validators that match the given status.

Request example​

curl https://rpc.ankr.com/http/tac_turin_cosmos/cosmos/staking/v1beta1/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": "2021-01-19T07:21:25.914Z",
"commission": {
"commission_rates": {
"rate": "string",
"max_rate": "string",
"max_change_rate": "string"
},
"update_time": "2021-01-19T07:21:25.914Z"
},
"min_self_delegation": "string"
}
],
"pagination": {
"next_key": "string",
"total": "string"
}
}

/cosmos/staking/v1beta1/validators/{validator_addr}​

Retrieves validator info for a given validator address.

Parameters​

  • validator_addr (string; required): a validator address to query for.

Returns​

Validator info for a given validator address.

Request example​

curl https://rpc.ankr.com/http/tac_turin_cosmos/cosmos/staking/v1beta1/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": "2021-01-19T07:25:26.679Z",
"commission": {
"commission_rates": {
"rate": "string",
"max_rate": "string",
"max_change_rate": "string"
},
"update_time": "2021-01-19T07:25:26.679Z"
},
"min_self_delegation": "string"
}
}

/cosmos/staking/v1beta1/validators/{validator_addr}/delegations​

Retrieves delegate info for a given validator.

Parameters​

  • validator_addr (string; required): a validator address to query for.
  • pagination.key (string, byte): a value returned in PageResponse.next_key to begin querying the next page efficiently. Only one of offset or key should be set.
  • pagination.key string, uint64: a numeric offset that can be used when key is unavailable (less efficient than using key). Only one of offset or key should be set.
  • pagination.limit (string, uint64): a total number of results to be returned in the results page. If empty, will default to a value to be set by each app.
  • pagination.count_total (boolean): set to true to indicate that the result set should include a count of the total number of items available for pagination in the UIs. Only respected when offset is used, ignored when key is set.

Returns​

Delegate info for a given validator.

Request example​

curl https://rpc.ankr.com/http/tac_turin_cosmos/cosmos/staking/v1beta1/validators/{validator_addr}/delegations

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/validators/{validator_addr}/delegations/{delegator_addr}​

Retrieves delegate info for a given validator-delegator pair.

Parameters​

  • validator_addr (string; required): a validator address to query for.
  • delegator_addr (string; required): a delegator address to query for.

Returns​

Delegate info for a given validator delegator pair.

Request example​

curl https://rpc.ankr.com/http/tac_turin_cosmos/cosmos/staking/v1beta1/validators/{validator_addr}/delegations/{delegator_addr}

Response example​

{
"delegation_response": {
"delegation": {
"delegator_address": "string",
"validator_address": "string",
"shares": "string"
},
"balance": {
"denom": "string",
"amount": "string"
}
}
}

/cosmos/staking/v1beta1/validators/{validator_addr}/delegations/{delegator_addr}/unbonding_delegation​

Retrieves unbonding info for a given validator-delegator pair.

Parameters​

  • validator_addr (string; required): a validator address to query for.
  • delegator_addr (string; required): a delegator address to query for.

Returns​

Unbonding info for a given validator delegator pair.

Request example​

curl https://rpc.ankr.com/http/tac_turin_cosmos/cosmos/staking/v1beta1/validators/{validator_addr}/delegations/{delegator_addr}/unbonding_delegation

Response example​

{
"unbond": {
"delegator_address": "string",
"validator_address": "string",
"entries": [
{
"creation_height": "string",
"completion_time": "2021-01-19T07:35:28.235Z",
"initial_balance": "string",
"balance": "string"
}
]
}
}

/cosmos/staking/v1beta1/validators/{validator_addr}/unbonding_delegations​

Retrieves unbonding delegations of a validator.

Parameters​

  • validator_addr (string, required): a validator address to query for.
  • pagination.key (string, byte): a value returned in PageResponse.next_key to begin querying the next page efficiently. Only one of offset or key should be set.
  • pagination.key (string, uint64): a numeric offset that can be used when key is unavailable (less efficient than using key). Only one of offset or key should be set.
  • pagination.limit (string, uint64): a total number of results to be returned in the results page. If empty, will default to a value to be set by each app.
  • pagination.count_total (boolean): set to true to indicate that the result set should include a count of the total number of items available for pagination in the UIs. Only respected when offset is used, ignored when key is set.

Returns​

Unbonding info for a given validator.

Request example​

curl https://rpc.ankr.com/http/tac_turin_cosmos/cosmos/staking/v1beta1/validators/{validator_addr}/unbonding_delegations

Response example​

{
"unbonding_responses": [
{
"delegator_address": "string",
"validator_address": "string",
"entries": [
{
"creation_height": "string",
"completion_time": "2021-01-19T07:37:20.281Z",
"initial_balance": "string",
"balance": "string"
}
]
}
],
"pagination": {
"next_key": "string",
"total": "string"
}
}

Upgrade methods​

/cosmos/upgrade/v1beta1/applied_plan/{name}​

Retrieves a previously applied upgrade plan by its name.

Parameters​

  • name (string; required): a name of the applied plan to query for.

Returns​

Previously applied upgrade plan.

Request example​

curl https://rpc.ankr.com/http/tac_turin_cosmos/cosmos/upgrade/v1beta1/applied_plan/{name}

Response example​

{
"height": "string"
}

/cosmos/upgrade/v1beta1/current_plan​

Retrieves the current upgrade plan.

Parameters​

  • name (string; required): a name of the applied plan to query for.

Returns​

Current upgrade plan.

Request example​

curl https://rpc.ankr.com/http/tac_turin_cosmos/cosmos/upgrade/v1beta1/current_plan

Response example​

{
"plan": {
"name": "string",
"time": "2021-01-19T07:49:08.875Z",
"height": "string",
"info": "string",
"upgraded_client_state": {
"type_url": "string",
"value": "string"
}
}
}

/cosmos/upgrade/v1beta1/upgraded_consensus_state/{last_height}​

Retrieves the consensus state that will serve as a trusted kernel for the next version of this chain.

It will only be stored at the last height of this chain, not supported with legacy querier.

Parameters​

  • last_height (string, int64): a required last height under which next consensus state is stored.

Returns​

Consensus state.

Request example​

curl https://rpc.ankr.com/http/tac_turin_cosmos/cosmos/upgrade/v1beta1/upgraded_consensus_state/{last_height}

Response example​

{
"upgraded_consensus_state": {
"type_url": "string",
"value": "string"
}
}

Ibc core methods​

/ibc/core/channel/v1beta1/channels​

Retrieves all the IBC channels of a chain.

Parameters​

  • pagination.key (string, byte): a value returned in PageResponse.next_key to begin querying the next page efficiently. Only one of offset or key should be set.
  • pagination.key (string, uint64): a numeric offset that can be used when key is unavailable (less efficient than using key). Only one of offset or key should be set.
  • pagination.limit (string, uint64): a total number of results to be returned in the results page. If empty, will default to a value to be set by each app.
  • pagination.count_total (boolean): set to true to indicate that the result set should include a count of the total number of items available for pagination in the UIs. Only respected when offset is used, ignored when key is set.

Returns​

IBC channels of a chain.

Request example​

curl https://rpc.ankr.com/http/tac_turin_cosmos/ibc/core/channel/v1beta1/channels

Response example​

{
"channels": [
{
"state": "STATE_UNINITIALIZED_UNSPECIFIED",
"ordering": "ORDER_NONE_UNSPECIFIED",
"counterparty": {
"port_id": "string",
"channel_id": "string"
},
"connection_hops": [
"string"
],
"version": "string",
"port_id": "string",
"channel_id": "string"
}
],
"pagination": {
"next_key": "string",
"total": "string"
},
"height": {
"revision_number": "string",
"revision_height": "string"
}
}

/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}​

Retrieves an IBC Channel.

Parameters​

  • channel_id (string; required): a channel unique identifier.
  • port_id (string; required): a port unique identifier.

Returns​

IBC channels of a chain.

Request example​

curl https://rpc.ankr.com/http/tac_turin_cosmos/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}

Response example​

{
"channel": {
"state": "STATE_UNINITIALIZED_UNSPECIFIED",
"ordering": "ORDER_NONE_UNSPECIFIED",
"counterparty": {
"port_id": "string",
"channel_id": "string"
},
"connection_hops": [
"string"
],
"version": "string"
},
"proof": "string",
"proof_height": {
"revision_number": "string",
"revision_height": "string"
}
}

/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/client_state​

Retrieves the client state for the channel associated with the provided channel identifiers.

Parameters​

  • channel_id (string; required): a channel unique identifier.
  • port_id (string; required): a port unique identifier.

Returns​

Client state.

Request example​

curl https://rpc.ankr.com/http/tac_turin_cosmos/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/client_state

Response example​

{
"identified_client_state": {
"client_id": "string",
"client_state": {
"type_url": "string",
"value": "string"
}
},
"proof": "string",
"proof_height": {
"revision_number": "string",
"revision_height": "string"
}
}

/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/consensus_state/revision/{revision_number}/height/{revision_height}​

Retrieves the consensus state for the channel associated with the provided channel identifiers.

Parameters​

  • channel_id (string; required): a channel unique identifier.
  • port_id (string; required): a port unique identifier.
  • revision_number (string, uint64; required): a revision number of the consensus state.
  • revision_height string, uint64; required: a revision height of the consensus state.

Returns​

Consensus state.

Request example​

curl https://rpc.ankr.com/http/tac_turin_cosmos/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/consensus_state/revision/{revision_number}/height/{revision_height}

Response example​

{
"consensus_state": {
"type_url": "string",
"value": "string"
},
"client_id": "string",
"proof": "string",
"proof_height": {
"revision_number": "string",
"revision_height": "string"
}
}

/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/next_sequence​

Retrieves the next receive sequence for a given channel.

Parameters​

  • channel_id (string; required): a channel unique identifier.
  • port_id (string; required): a port unique identifier.

Returns​

Next receive sequence.

Request example​

curl https://rpc.ankr.com/http/tac_turin_cosmos/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/next_sequence

Response example​

{
"next_sequence_receive": "string",
"proof": "string",
"proof_height": {
"revision_number": "string",
"revision_height": "string"
}
}

/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_acknowledgements​

Retrieves all the packet acknowledgements associated with a channel.

Parameters​

  • channel_id (string; required): a channel unique identifier.
  • port_id (string; required): a port unique identifier.
  • pagination.key (string, byte): a value returned in PageResponse.next_key to begin querying the next page efficiently. Only one of offset or key should be set.
  • pagination.key (string, uint64): a numeric offset that can be used when key is unavailable (less efficient than using key). Only one of offset or key should be set.
  • pagination.limit (string, uint64): a total number of results to be returned in the results page. If empty, will default to a value to be set by each app.
  • pagination.count_total (boolean): set to true to indicate that the result set should include a count of the total number of items available for pagination in the UIs. Only respected when offset is used, ignored when key is set.

Returns​

Packet acknowledgements.

Request example​

curl https://rpc.ankr.com/http/tac_turin_cosmos/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_acknowledgements

Response example​

{
"acknowledgements": [
{
"port_id": "string",
"channel_id": "string",
"sequence": "string",
"data": "string"
}
],
"pagination": {
"next_key": "string",
"total": "string"
},
"height": {
"revision_number": "string",
"revision_height": "string"
}
}