Delegations

ValidatorDelegations queries delegate info for given validator.

GET/cosmos/staking/v1beta1/validators/{validator_addr}/delegations
Path parameters
validator_addr*string

validator_addr defines the validator address to query for.

Query parameters
Response

A successful response.

Body
delegation_responsesarray of object
paginationobject

pagination defines the pagination in the response.

Request
const response = await fetch('/cosmos/staking/v1beta1/validators/{validator_addr}/delegations', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
{
  "delegation_responses": [
    {
      "delegation": {
        "delegator_address": "text",
        "validator_address": "text",
        "shares": "text"
      },
      "balance": {
        "denom": "text",
        "amount": "text"
      }
    }
  ],
  "pagination": {
    "next_key": "Ynl0ZXM=",
    "total": "text"
  }
}

Delegation queries delegate info for given validator delegator pair.

GET/cosmos/staking/v1beta1/validators/{validator_addr}/delegations/{delegator_addr}
Path parameters
validator_addr*string

validator_addr defines the validator address to query for.

delegator_addr*string

delegator_addr defines the delegator address to query for.

Response

A successful response.

Body
delegation_responseobject

DelegationResponse is equivalent to Delegation except that it contains a balance in addition to shares which is more suitable for client responses.

Request
const response = await fetch('/cosmos/staking/v1beta1/validators/{validator_addr}/delegations/{delegator_addr}', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
{
  "delegation_response": {
    "delegation": {
      "delegator_address": "text",
      "validator_address": "text",
      "shares": "text"
    },
    "balance": {
      "denom": "text",
      "amount": "text"
    }
  }
}

Last updated