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

Secret Network — Query (1/3)

API reference for Secret Network. All methods ->

Part 1 of 3: 1 · 2 · 3

Query

/cosmos/auth/v1beta1/accounts

Retrieves all the existing accounts.

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.key or pagination.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.key or pagination.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/auth/v1beta1/accounts

Response example

{
"accounts": [
{
"type_url": "string",
"value": "string"
}
],
"pagination": {
"next_key": "string",
"total": "string"
}
}

/cosmos/auth/v1beta1/accounts/{address}

Retrieves account details based on address.

Parameters


  • address (string; path; required): the address of account to retrieve details for.

Returns

Response codes:

  • 200 — success.
  • default — unexpected error.

Request example

curl https://rpc.ankr.com/http/scrt_cosmos/cosmos/auth/v1beta1/accounts/{address}

Response example

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

/cosmos/auth/v1beta1/params

Retrieves all parameters.

Parameters

None.

Returns

Response codes:

  • 200 — success.
  • default — unexpected error.

Request example

curl https://rpc.ankr.com/http/scrt_cosmos/cosmos/auth/v1beta1/params

Request example

{
"params": {
"max_memo_characters": "string",
"tx_sig_limit": "string",
"tx_size_cost_per_byte": "string",
"sig_verify_cost_ed25519": "string",
"sig_verify_cost_secp256k1": "string"
}
}

/cosmos/bank/v1beta1/balances/{address}

Retrieves the balance of all coins for a single account.

Parameters


  • address (string; path; required): the address to query balances 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.key or pagination.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.key or pagination.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/bank/v1beta1/balances/{address}

Response example

{
"balances": [
{
"denom": "string",
"amount": "string"
}
],
"pagination": {
"next_key": "string",
"total": "string"
}
}

/cosmos/bank/v1beta1/balances/{address}/{denom}

Retrieves the balance of a single coin for a single account.

Parameters


  • address (string; path; required): the address to query balances for.
  • denom (string; path; required): the coin denom to query balances for.

Returns

Response codes:

  • 200 — success.
  • default — unexpected error.

Request example

curl https://rpc.ankr.com/http/scrt_cosmos/cosmos/bank/v1beta1/balances/{address}/{denom}

Response example

{
"balance": {
"denom": "string",
"amount": "string"
}
}

/cosmos/bank/v1beta1/denoms_metadata

Retrieves the client metadata for all registered coin denominations.

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.key or pagination.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.key or pagination.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/bank/v1beta1/denoms_metadata

Response example

{
"metadatas": [
{
"description": "string",
"denom_units": [
{
"denom": "string",
"exponent": 0,
"aliases": [
"string"
]
}
],
"base": "string",
"display": "string",
"name": "string",
"symbol": "string",
"uri": "string",
"uri_hash": "string"
}
],
"pagination": {
"next_key": "string",
"total": "string"
}
}

/cosmos/bank/v1beta1/denoms_metadata/{denom}

Retrieves the client metadata of a given coin denomination.

Parameters


  • denom (string; path; required): the coin denomination to query the metadata for.

Returns

Response codes:

  • 200 — success.
  • default — unexpected error.

Request example

curl https://rpc.ankr.com/http/scrt_cosmos/cosmos/bank/v1beta1/denoms_metadata/{denom}

Response example

{
"metadata": {
"description": "string",
"denom_units": [
{
"denom": "string",
"exponent": 0,
"aliases": [
"string"
]
}
],
"base": "string",
"display": "string",
"name": "string",
"symbol": "string",
"uri": "string",
"uri_hash": "string"
}
}

/cosmos/bank/v1beta1/params

Retrieves the parameters of x/bank module.

Parameter

None.

Returns

Response codes:

  • 200 — success.
  • default — unexpected error.

Request example

curl https://rpc.ankr.com/http/scrt_cosmos/cosmos/bank/v1beta1/params

Response example

{
"params": {
"send_enabled": [
{
"denom": "string",
"enabled": true
}
],
"default_send_enabled": true
}
}

/cosmos/bank/v1beta1/supply

Retrieves the total supply of all coins.

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.key or pagination.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.key or pagination.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

Code responses:

  • 200 — success.
  • default — unexpected error.

Request example

curl https://rpc.ankr.com/http/scrt_cosmos/cosmos/bank/v1beta1/supply

Response example

{
"supply": [
{
"denom": "string",
"amount": "string"
}
],
"pagination": {
"next_key": "string",
"total": "string"
}
}

/cosmos/distribution/v1beta1/community_pool

Retrieves the community pool coins.

Parameters

None.

Returns

Response codes:

  • 200 — success.
  • default — unexpected error.

Request example

curl https://rpc.ankr.com/http/scrt_cosmos/cosmos/distribution/v1beta1/community_pool

Response example

{
"pool": [
{
"denom": "string",
"amount": "string"
}
]
}

/cosmos/distribution/v1beta1/delegators/{delegator_address}/rewards

Retrieves the total rewards accrued by each validator.

Parameters


  • delegator_address (string; path; required): the delegator address to query for.

Returns

Response codes:

  • 200 — success.
  • default — unexpected error.

Request example

curl https://rpc.ankr.com/http/scrt_cosmos/cosmos/distribution/v1beta1/delegators/{delegator_address}/rewards

Response example

{
"rewards": [
{
"validator_address": "string",
"reward": [
{
"denom": "string",
"amount": "string"
}
]
}
],
"total": [
{
"denom": "string",
"amount": "string"
}
]
}

/cosmos/distribution/v1beta1/delegators/{delegator_address}/rewards/{validator_address}

Retrieves the total rewards accrued by a delegation.

Parameters


  • delegator_address (string; path; required): the delegator address to query for.
  • validator_address (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/distribution/v1beta1/delegators/{delegator_address}/rewards/{validator_address}

Response example

{
"rewards": [
{
"denom": "string",
"amount": "string"
}
]
}

/cosmos/distribution/v1beta1/delegators/{delegator_address}/validators

Retrieves the validators of a delegator.

Parameters


  • delegator_address (string; path; required): the delegator address to query for.

Returns

Response codes:

  • 200 — success.
  • default — unexpected error.

Request example

curl https://rpc.ankr.com/http/scrt_cosmos/cosmos/distribution/v1beta1/delegators/{delegator_address}/validators

Response example

{
"validators": [
"string"
]
}

/cosmos/distribution/v1beta1/delegators/{delegator_address}/withdraw_address

Retrieves a withdrawal address of a delegator.

Parameters


  • delegator_address (string; path; required): the delegator address to query for.

Returns

Response codes:

  • 200 — success.
  • default — unexpected error.

Request example

curl https://rpc.ankr.com/http/scrt_cosmos/cosmos/distribution/v1beta1/delegators/{delegator_address}/withdraw_address

Response example

{
"withdraw_address": "string"
}

/cosmos/distribution/v1beta1/params

Retrieves parameters of the distribution module.

Parameters

None.

Returns

Response codes:

  • 200 — success.
  • default — unexpected error.

Request example

curl https://rpc.ankr.com/http/scrt_cosmos/cosmos/distribution/v1beta1/params

Response example

{
"params": {
"community_tax": "string",
"base_proposer_reward": "string",
"bonus_proposer_reward": "string",
"withdraw_addr_enabled": true
}
}

/cosmos/distribution/v1beta1/validators/{validator_address}/commission

Retrieves accumulated commission for a validator.

Parameters


  • validator_address (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/distribution/v1beta1/validators/{validator_address}/commission

Response example

{
"commission": {
"commission": [
{
"denom": "string",
"amount": "string"
}
]
}
}

/cosmos/distribution/v1beta1/validators/{validator_address}/outstanding_rewards

Retrieves the rewards of a validator address.

Parameters


  • validator_address (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/distribution/v1beta1/validators/{validator_address}/outstanding_rewards

Response example

{
"rewards": {
"rewards": [
{
"denom": "string",
"amount": "string"
}
]
}
}

/cosmos/distribution/v1beta1/validators/{validator_address}/slashes

Retrieves slash events of a validator.

Parameters


  • validator_address (string; path; required): the validator address to query for.
  • starting_height (uint64; query): the optional starting height to query the slashes.
  • ending_height (uint64; query): the optional ending height to query the slashes.
  • 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.key or pagination.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.key or pagination.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/distribution/v1beta1/validators/{validator_address}/slashes

Response example

{
"slashes": [
{
"validator_period": "string",
"fraction": "string"
}
],
"pagination": {
"next_key": "string",
"total": "string"
}
}

/cosmos/evidence/v1beta1/evidence

Retrieves all evidence.

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.key or pagination.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.key or pagination.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/evidence/v1beta1/evidence

Response example

{
"evidence": [
{
"type_url": "string",
"value": "string"
}
],
"pagination": {
"next_key": "string",
"total": "string"
}
}

/cosmos/evidence/v1beta1/evidence/{evidence_hash}

Retrieves evidence based on evidence hash.

Parameters


  • evidence_hash (string; byte; path; required): the hash of the evidence to retrieve.

Returns

Response codes:

  • 200 — success.
  • default — unexpected error.

Request example

curl https://rpc.ankr.com/http/scrt_cosmos/cosmos/evidence/v1beta1/evidence/{evidence_hash}

Response example

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

/cosmos/gov/v1beta1/params/{params_type}

Retrieves all parameters of the gov module.

Parameters


  • params_type (string; path; required): defines which parameters to query for, can be one of "voting", "tallying", or "deposit".

Returns

Response codes:

  • 200 — success.
  • default — unexpected error.

Request example

curl https://rpc.ankr.com/http/scrt_cosmos/cosmos/gov/v1beta1/params/{params_type}

Response example

{
"voting_params": {
"voting_period": "string"
},
"deposit_params": {
"min_deposit": [
{
"denom": "string",
"amount": "string"
}
],
"max_deposit_period": "string"
},
"tally_params": {
"quorum": "string",
"threshold": "string",
"veto_threshold": "string"
}
}

/cosmos/gov/v1beta1/proposals

Retrieves all proposals based on given status.

Parameters


  • proposal_status (string; query): defines the status of the proposals; the following statuses are available:
    • PROPOSAL_STATUS_UNSPECIFIED: a default proposal status.
    • PROPOSAL_STATUS_DEPOSIT_PERIOD: a proposal status during the deposit period.
    • PROPOSAL_STATUS_VOTING_PERIOD: a proposal status during the voting period.
    • PROPOSAL_STATUS_PASSED: a proposal status of a proposal that has passed.
    • PROPOSAL_STATUS_REJECTED: a proposal status of a proposal that has been rejected.
    • PROPOSAL_STATUS_FAILED: a proposal status of a proposal that has failed.
  • voter (string; query):
  • depositor (string; query):
  • 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.key or pagination.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.key or pagination.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

Response example

{
"proposals": [
{
"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-02T10:55:55.465Z",
"deposit_end_time": "2023-03-02T10:55:55.465Z",
"total_deposit": [
{
"denom": "string",
"amount": "string"
}
],
"voting_start_time": "2023-03-02T10:55:55.465Z",
"voting_end_time": "2023-03-02T10:55:55.465Z"
}
],
"pagination": {
"next_key": "string",
"total": "string"
}
}