Stratos-chain REST APIs

A REST interface to communicate with Stratos-chain for state queries and transaction operations.

Overview

Generally, all the APIs provided here could be grouped into HTTP GET and POST requests. We classified these APIs into sections based on their modules or their operations for an in-depth analysis.

GET Request

The response content type is application/json

POST Request

The response content type is application/json. If it has a request body, the request content is also in application/json format.

A POST request will return an unsigned transaction, which equals to its equivalent stchaincli command with a --generate-only flag.

Comparison between REST API and its equivalent stchaincli` command

Suppose a send transaction that transfers tokens from one account to another. The following comparison demonstrates we can get the same response in both methods.

REST API

Http POST request

http://127.0.0.1:1317/bank/accounts/st1jfv3lyd67w5uywzywlsvgnym0hh9sqlujrw5l6/transfers

Request body

{
  "base_req": {
    "from": "st1xnhfx7c0nev9me835409efjj7whd672xs6d2m2",
    "memo": "Send Tx Example",
    "chain_id": "test-chain",
    "account_number": "0",
    "gas": "200000",
    "gas_adjustment": "1.2",
    "fees": [
      {
        "denom": "ustos",
        "amount": "100"
      }
    ],
    "simulate": false
  },
  "amount": [
    {
      "denom": "ustos",
      "amount": "1000000"
    }
  ]
}

Response

stchaincli command

Output

Stratos-chain REST APIs

As usual, for ease of use, these APIs have been classified by the following modules

Auth

Get the account information on blockchain

GET http://127.0.0.1:1317/auth/accounts/{address}

Example: http://127.0.0.1:1317/auth/accounts/st1l76s0ukw0r77fydhqtqpexax8m64mzaq04830s

Path Parameters

Name
Type
Description

address*

String

wallet address

Bank

Get the account balances

GET http://127.0.0.1:1317/bank/balances/{address}

Example:

http://127.0.0.1:1317/bank/balances/st1l76s0ukw0r77fydhqtqpexax8m64mzaq04830s

Path Parameters

Name
Type
Description

address*

String

wallet address

Send coins from one account to another

POST http://127.0.0.1:1317/bank/accounts/{address}/transfers

Example:

http://127.0.0.1:1317/bank/accounts/st1jfv3lyd67w5uywzywlsvgnym0hh9sqlujrw5l6/transfers

Path Parameters

Name
Type
Description

address*

String

wallet address

Request Body

Name
Type
Description

*

json

{ "base_req": { "from": "st1xnhfx7c0nev9me835409efjj7whd672xs6d2m2", "memo": "Send Tx Example", "chain_id": "test-chain", "account_number": "0", "gas": "200000", "gas_adjustment": "1.2", "fees": [ { "denom": "ustos", "amount": "100" } ], "simulate": false }, "amount": [ { "denom": "ustos", "amount": "1000000" } ] }

Distribution

Get the total rewards balance from all delegations

GET http://127.0.0.1:1317/distribution/delegators/{delegatorAddr}/rewards

Example:

http://127.0.0.1:1317/bank/accounts/st1jfv3lyd67w5uywzywlsvgnym0hh9sqlujrw5l6/transfers

Path Parameters

Name
Type
Description

delegatorAddr*

String

delegator address

Query a delegation reward

GET http://127.0.0.1:1317/distribution/delegators/{delegatorAddr}/rewards/{validatorAddr}

Example:

http://127.0.0.1:1317/distribution/delegators/st1l76s0ukw0r77fydhqtqpexax8m64mzaq04830s/rewards/stvaloper1l76s0ukw0r77fydhqtqpexax8m64mzaqcew3nm

Path Parameters

Name
Type
Description

delegatorAddr*

String

delegator address

validatorAddr*

String

validator address

Get the rewards withdrawal address

GET http://127.0.0.1:1317/distribution/delegators/{delegatorAddr}/withdraw_address

Example:

http://127.0.0.1:1317/distribution/delegators/st1l76s0ukw0r77fydhqtqpexax8m64mzaq04830s/withdraw_address

Path Parameters

Name
Type
Description

delegatorAddr*

String

delegator address

Get validator distribution information

GET http://127.0.0.1:1317/distribution/validators/{validatorAddr}

Example:

http://127.0.0.1:1317/distribution/validators/stvaloper1l76s0ukw0r77fydhqtqpexax8m64mzaqcew3nm

Path Parameters

Name
Type
Description

validatorAddr*

String

validator address

Fee distribution outstanding rewards of a single validator

GET http://127.0.0.1:1317/distribution/validators/{validatorAddr}/outstanding_rewards

Example:

http://127.0.0.1:1317/distribution/validators/stvaloper1l76s0ukw0r77fydhqtqpexax8m64mzaqcew3nm/outstanding_rewards

Path Parameters

Name
Type
Description

validatorAddr*

String

validator address

Commission and self-delegation rewards of a single validator

GET http://127.0.0.1:1317/distribution/validators/{validatorAddr}/rewards

Example:

http://127.0.0.1:1317/distribution/validators/stvaloper1l76s0ukw0r77fydhqtqpexax8m64mzaqcew3nm/rewards

Path Parameters

Name
Type
Description

validatorAddr*

String

validator address

Community pool parameters

GET http://127.0.0.1:1317/distribution/community_pool

Example:

http://127.0.0.1:1317/distribution/community_pool{ "height": "2479", "result": [ { "denom": "ustos", "amount": "1021438537.140000000000000000" } ] } GET /distribution/community_pool Community pool parameters

Fee distribution parameters

GET http://127.0.0.1:1317/distribution/parameters

Example:

http://127.0.0.1:1317/distribution/parameters

Withdraw all the delegator's delegation rewards

POST http://127.0.0.1:1317/distribution/delegators/{delegatorAddr}/rewards

Example:

http://127.0.0.1:1317/distribution/delegators/st1xnhfx7c0nev9me835409efjj7whd672xs6d2m2/rewards

Path Parameters

Name
Type
Description

delegatorAddr*

String

delegator address

Request Body

Name
Type
Description

*

json

{ "base_req": { "from": "st1xnhfx7c0nev9me835409efjj7whd672xs6d2m2", "memo": "Withdraw Rewards Tx Example", "chain_id": "test-chain", "account_number": "0", "gas": "200000", "gas_adjustment": "1.2", "fees": [ { "denom": "ustos", "amount": "1000" } ], "simulate": false } }

Withdraw a delegator's delegation reward from a single validator

POST http://127.0.0.1:1317/distribution/delegators/{delegatorAddr}/rewards/{validatorAddr}

Example:

http://127.0.0.1:1317/distribution/delegators/st1xnhfx7c0nev9me835409efjj7whd672xs6d2m2/rewards/stvaloper1xnhfx7c0nev9me835409efjj7whd672x8ky28p

Path Parameters

Name
Type
Description

delegatorAddr*

String

delegator address

validatorAddr*

String

validator address

Request Body

Name
Type
Description

*

json

{ "base_req": { "from": "st1xnhfx7c0nev9me835409efjj7whd672xs6d2m2", "memo": "Withdraw Rewards From a Single Validator Tx Example", "chain_id": "test-chain", "account_number": "0", "gas": "200000", "gas_adjustment": "1.2", "fees": [ { "denom": "ustos", "amount": "100" } ], "simulate": false } }

Replace the delegations' rewards withdrawal address for a new one

POST http://127.0.0.1:1317/distribution/delegators/{delegatorAddr}/withdraw_address

Example:

http://127.0.0.1:1317/distribution/delegators/st1wkya79c9dvqrwc7um4n9vljc0duds3z5y56j7f/withdraw_address

Path Parameters

Name
Type
Description

delegatorAddr*

String

delegator address

*

json

{ "base_req": { "from": "st1wkya79c9dvqrwc7um4n9vljc0duds3z5y56j7f", "memo": "Replace the Rewards Withdrawal Address Tx Example", "chain_id": "test-chain", "account_number": "0", "gas": "200000", "gas_adjustment": "1.2", "fees": [ { "denom": "ustos", "amount": "100" } ], "simulate": false }, "withdraw_address": "st1xnhfx7c0nev9me835409efjj7whd672xs6d2m2" }

Withdraw the validator's self-delegation and commissions rewards

POST http://127.0.0.1:1317/distribution/validators/{validatorAddr}/rewards

Example:

http://127.0.0.1:1317/distribution/validators/stvaloper1xnhfx7c0nev9me835409efjj7whd672x8ky28p/rewards

Path Parameters

Name
Type
Description

validatorAddr*

String

validator address

Request Body

Name
Type
Description

*

json

{ "base_req": { "from": "st1xnhfx7c0nev9me835409efjj7whd672xs6d2m2", "memo": "Withdraw the Validator's Rewards Tx Example", "chain_id": "test-chain", "account_number": "0", "gas": "200000", "gas_adjustment": "1.2", "fees": [ { "denom": "ustos", "amount": "100" } ], "simulate": false } }


Gov

Query proposals information with parameters

GET http://127.0.0.1:1317/gov/proposals

Example:

http://127.0.0.1:1317/gov/proposals?status=passed

Query Parameters

Name
Type
Description

voter

String

voter address

depositor

String

depositor address

status

String

proposal status, valid values: "deposit_period", "voting_period", "passed", "rejected"

page

int

page number

limit

int

maximum number of items per page

tx.minheight

int64

transactions on blocks with height greater or equal this value

tx.maxheight

int64

transactions on blocks with height less than or equal this value

Query a proposal by id

GET http://127.0.0.1:1317/gov/proposals/{proposalId}

Example:

http://127.0.0.1:1317/gov/proposals/1

Path Parameters

Name
Type
Description

proposalId*

int

proposal Id

Query for the proposer for a proposal

GET http://127.0.0.1:1317/gov/proposals/{proposalId}/proposer

Example:

http://127.0.0.1:1317/gov/proposals/1/proposer

Path Parameters

Name
Type
Description

proposalId

int

proposal Id

Query deposits by proposal-id

GET http://127.0.0.1:1317/gov/proposals/{proposalId}/deposits

Example:

http://127.0.0.1:1317/gov/proposals/1/deposits

Path Parameters

Name
Type
Description

proposalId

int

proposal Id

Query deposit by proposal-id and depositor address

GET http://127.0.0.1:1317/gov/proposals/{proposalId}/deposits/{depositor}

Example:

http://127.0.0.1:1317/gov/proposals/1/deposits/st1xnhfx7c0nev9me835409efjj7whd672xs6d2m2

Path Parameters

Name
Type
Description

proposalId*

int

proposal Id

depositor*

String

depositor address

Query voters information by proposal-id

GET http://127.0.0.1:1317/gov/proposals/{proposalId}/votes

Example:

http://127.0.0.1:1317/gov/proposals/1/votes

Path Parameters

Name
Type
Description

proposalId*

int

proposal Id

Query vote information by proposal Id and voter address

GET http://127.0.0.1:1317/gov/proposals/{proposalId}/votes/{voter}

Example:

http://127.0.0.1:1317/gov/proposals/1/votes/st12adksjsd7gcsn23h5jmvdygzx2lfw5q4kgq5zh

Path Parameters

Name
Type
Description

proposalId*

int

proposal Id

voter*

String

voter address

Get a proposal's tally result at the current time

GET http://127.0.0.1:1317/gov/proposals/{proposalId}/tally

Example:

http://127.0.0.1:1317/gov/proposals/1/tally

Path Parameters

Name
Type
Description

proposalId*

int

proposal Id

Query gov deposit parameters

GET http://127.0.0.1:1317/gov/parameters/deposit

Example:

http://127.0.0.1:1317/gov/parameters/deposit

Query governance tally parameters

GET http://127.0.0.1:1317/gov/parameters/tallying

Example:

http://127.0.0.1:1317/gov/parameters/tallying

Query governance voting parameters

GET http://127.0.0.1:1317/gov/parameters/voting

Example:

http://127.0.0.1:1317/gov/parameters/voting

Send transaction to submit a proposal

POST http://127.0.0.1:1317/gov/proposals

Example:

http://127.0.0.1:1317/gov/proposals

Request Body

Name
Type
Description

*

json

{ "base_req": { "from": "st1g3saypgcxzfzpsx94lmr30gzk0rrfc892guayr", "memo": "Submit Proposal Tx Example", "chain_id": "test-chain", "gas": "200000", "gas_adjustment": "1.2", "fees": [ { "denom": "ustos", "amount": "100" } ], "simulate": false }, "title": "Text Proposal", "description": "This is a text proposal example", "proposal_type": "text", "proposer": "st1g3saypgcxzfzpsx94lmr30gzk0rrfc892guayr", "initial_deposit": [ { "denom": "ustos", "amount": "1000000" } ] }

Generate a parameter change proposal transaction

POST http://127.0.0.1:1317/gov/proposals/param_change

Example:

http://127.0.0.1:1317/gov/proposals/param_change

Request Body

Name
Type
Description

*

json

{ "base_req": { "from": "st1g3saypgcxzfzpsx94lmr30gzk0rrfc892guayr", "memo": "Generate a parameter-change proposal Tx Example", "chain_id": "test-chain", "gas": "200000", "gas_adjustment": "1.2", "fees": [ { "denom": "ustos", "amount": "100" } ], "simulate": false }, "title": "Param-Change Staking MaxValidators to 100", "description": "This is a test to update MaxValidators to 100 in staking Module", "proposer": "st1g3saypgcxzfzpsx94lmr30gzk0rrfc892guayr", "deposit": [ { "denom": "ustos", "amount": "10000000" } ], "changes": [ { "subspace": "staking", "key": "MaxValidators", "value": 100 } ] }

Deposit tokens to a proposal

POST http://127.0.0.1:1317/gov/proposals/{proposalId}/deposits

Example:

http://127.0.0.1:1317/gov/proposals/1/deposits

Path Parameters

Name
Type
Description

proposalId*

int

proposal Id

Request Body

Name
Type
Description

*

json

{ "base_req": { "from": "st1g3saypgcxzfzpsx94lmr30gzk0rrfc892guayr", "memo": "Deposit tokens to Proposal 1 Tx Example", "chain_id": "test-chain", "gas": "200000", "gas_adjustment": "1.2", "fees": [ { "denom": "ustos", "amount": "100" } ], "simulate": false }, "depositor": "st1g3saypgcxzfzpsx94lmr30gzk0rrfc892guayr", "amount": [ { "denom": "ustos", "amount": "10000000" } ] }

Send transaction to vote a proposal

POST http://127.0.0.1:1317/gov/proposals/{proposalId}/votes

Example:

http://127.0.0.1:1317/gov/proposals/1/votes

Path Parameters

Name
Type
Description

proposalId*

int

proposal Id

Request Body

Name
Type
Description

*

json

{ "base_req": { "from": "st1g3saypgcxzfzpsx94lmr30gzk0rrfc892guayr", "memo": "Vote Proposal 1 Tx Example", "chain_id": "test-chain", "gas": "200000", "gas_adjustment": "1.2", "fees": [ { "denom": "ustos", "amount": "100" } ], "simulate": false }, "voter": "st1g3saypgcxzfzpsx94lmr30gzk0rrfc892guayr", "option": "yes" }

Mint

Get mint module parameters

GET http://127.0.0.1:1317/minting/parameters

Example:

http://127.0.0.1:1317/minting/inflation

Get current minting inflation value

GET http://127.0.0.1:1317/minting/inflation

Example:

http://127.0.0.1:1317/minting/inflation

Get current minting annual provisions value

GET http://127.0.0.1:1317 /minting/annual-provisions

Example:

http://127.0.0.1:1317/minting/annual-provisions

Slashing

Get signing info of all validators

GET http://127.0.0.1:1317/slashing/signing_infos

Example:

http://127.0.0.1:1317/slashing/signing_infos

Get the current slashing parameters

GET http://127.0.0.1:1317/slashing/parameters

Example:

http://127.0.0.1:1317/slashing/parameters

Send transaction to unjail a jailed validator

POST http://127.0.0.1:1317/slashing/validators/{validatorAddr}/unjail

Example:

http://127.0.0.1:1317/slashing/validators/stvaloper1xnhfx7c0nev9me835409efjj7whd672x8ky28p/unjail

Path Parameters

Name
Type
Description

validatorAddr*

Sring

validator address

Request Body

Name
Type
Description

*

json

{ "base_req": { "from": "st1xnhfx7c0nev9me835409efjj7whd672xs6d2m2", "memo": "Unjail a Jailed Validator Tx Example", "chain_id": "test-chain", "gas": "200000", "gas_adjustment": "1.2", "fees": [ { "denom": "ustos", "amount": "100" } ], "simulate": false } }

Staking

Get all delegations from a delegator

GET http://127.0.0.1:1317/staking/delegators/{delegatorAddr}/delegations

Example:

http://127.0.0.1:1317/staking/delegators/st1l76s0ukw0r77fydhqtqpexax8m64mzaq04830s/delegations

Path Parameters

Name
Type
Description

delegatorAddr*

String

delegator address

Query the current delegation between a delegator and a validator

GET http://127.0.0.1:1317/staking/delegators/{delegatorAddr}/delegations/{validatorAddr}

Example:

http://127.0.0.1:1317/staking/delegators/st1l76s0ukw0r77fydhqtqpexax8m64mzaq04830s/delegations/stvaloper1l76s0ukw0r77fydhqtqpexax8m64mzaqcew3nm

Path Parameters

Name
Type
Description

delegatorAddr*

String

delegator address

validatorAddr*

String

validator address

Get all redelegations

GET http://127.0.0.1:1317/staking/redelegations

Example:

http://127.0.0.1:1318/staking/redelegations

Get all unbonding delegations from a delegator

GET http://127.0.0.1:1317/staking/delegators/{delegatorAddr}/unbonding_delegations

Example:

http://127.0.0.1:1317/staking/delegators/st1xnhfx7c0nev9me835409efjj7whd672xs6d2m2/unbonding_delegations

Path Parameters

Name
Type
Description

delegatorAddr*

String

delegator address

Query all unbonding delegations between a delegator and a validator

GET http://127.0.0.1:1317/staking/delegators/{delegatorAddr}/unbonding_delegations/{validatorAddr}

Example:

http://127.0.0.1:1317/staking/delegators/st12adksjsd7gcsn23h5jmvdygzx2lfw5q4kgq5zh/unbonding_delegations/stvaloper12adksjsd7gcsn23h5jmvdygzx2lfw5q4pyf57u

Path Parameters

Name
Type
Description

delegatorAddr*

String

delegator address

validatorAddr*

String

validator address

Query all validators that a delegator is bonded to

GET http://127.0.0.1:1317/staking/delegators/{delegatorAddr}/validators

Example:

http://127.0.0.1:1317/staking/delegators/st1l76s0ukw0r77fydhqtqpexax8m64mzaq04830s/validators

Path Parameters

Name
Type
Description

delegatorAddr*

String

delegator address

Query a validator that a delegator is bonded to

GET http://127.0.0.1:1317/staking/delegators/{delegatorAddr}/validators/{validatorAddr}

Example:

http://127.0.0.1:1317/staking/delegators/st1l76s0ukw0r77fydhqtqpexax8m64mzaq04830s/validators/stvaloper1l76s0ukw0r77fydhqtqpexax8m64mzaqcew3nm

Path Parameters

Name
Type
Description

delegatorAddr*

String

delegator address

validatorAddr*

String

validator address

Get all validator candidates

GET http://127.0.0.1:1317/staking/validators

Example:

http://127.0.0.1:1317/staking/validators

By default it returns only the bonded validators

Query the information from a single validator

GET http://127.0.0.1:1317/staking/validators/{validatorAddr}

Example:

http://127.0.0.1:1317/staking/validators/stvaloper1l76s0ukw0r77fydhqtqpexax8m64mzaqcew3nm

Path Parameters

Name
Type
Description

validatorAddr*

String

validator address

Get all delegations from a validator

GET http://127.0.0.1:1317/staking/validators/{validatorAddr}/delegations

Example:

http://127.0.0.1:1317/staking/validators/stvaloper1l76s0ukw0r77fydhqtqpexax8m64mzaqcew3nm/delegations

Path Parameters

Name
Type
Description

validatorAddr*

String

validator address

Get all unbonding delegations from a validator

GET http://127.0.0.1:1317/staking/validators/{validatorAddr}/unbonding_delegations

Example:

http://127.0.0.1:1318/staking/validators/stvaloper12adksjsd7gcsn23h5jmvdygzx2lfw5q4pyf57u/unbonding_delegations

Path Parameters

Name
Type
Description

validatorAddr*

String

validator address

Get the current state of the staking pool

GET http://127.0.0.1:1317/staking/pool

Example:

http://127.0.0.1:1317/staking/pool

Get the current staking parameter values

GET http://127.0.0.1:1317/staking/parameters

Example:

http://127.0.0.1:1317/staking/parameters

Submit a delegation from a delegator

POST http://127.0.0.1:1317/staking/delegators/{delegatorAddr}/delegations

Example:

http://127.0.0.1:1317/staking/delegators/st1xnhfx7c0nev9me835409efjj7whd672xs6d2m2/delegations

Path Parameters

Name
Type
Description

delegatorAddr*

String

delegator address

Request Body

Name
Type
Description

*

json

{ "base_req": { "from": "st1xnhfx7c0nev9me835409efjj7whd672xs6d2m2", "memo": "Submit Delegation Tx Example", "chain_id": "test-chain", "account_number": "0", "gas": "200000", "gas_adjustment": "1.2", "fees": [ { "denom": "ustos", "amount": "100" } ], "simulate": false }, "delegator_address": "st1xnhfx7c0nev9me835409efjj7whd672xs6d2m2", "validator_address": "stvaloper1xnhfx7c0nev9me835409efjj7whd672x8ky28p", "amount": { "denom": "ustos", "amount": "10000" } }

Submit an unbonding delegation

POST http://127.0.0.1:1317/staking/delegators/{delegatorAddr}/unbonding_delegations

Example:

http://127.0.0.1:1317/staking/delegators/st1xnhfx7c0nev9me835409efjj7whd672xs6d2m2/unbonding_delegations

Path Parameters

Name
Type
Description

delegatorAddr*

String

delegator address

Request Body

Name
Type
Description

*

json

{ "base_req": { "from": "st1xnhfx7c0nev9me835409efjj7whd672xs6d2m2", "memo": "Submit Unbonding-delegation Tx Example", "chain_id": "test-chain", "account_number": "0", "gas": "200000", "gas_adjustment": "1.2", "fees": [ { "denom": "ustos", "amount": "100" } ], "simulate": false }, "delegator_address": "st1xnhfx7c0nev9me835409efjj7whd672xs6d2m2", "validator_address": "stvaloper1xnhfx7c0nev9me835409efjj7whd672x8ky28p", "amount": { "denom": "ustos", "amount": "10000" } }

Submit a redelegation

POST http://127.0.0.1:1317/staking/delegators/{delegatorAddr}/redelegations

Example:

http://127.0.0.1:1318/staking/delegators/st15xlpwafgnvvs5hdk8938dp2ve6cjmy4vcf4l76/redelegations

Path Parameters

Name
Type
Description

delegatorAddr*

String

delegator address

Request Body

Name
Type
Description

*

json

{ "base_req": { "from": "st15xlpwafgnvvs5hdk8938dp2ve6cjmy4vcf4l76", "memo": "Submit Re-delegation Tx Example", "chain_id": "test-chain", "account_number": "0", "gas": "200000", "gas_adjustment": "1.2", "fees": [ { "denom": "ustos", "amount": "100" } ], "simulate": false }, "delegator_address": "st15xlpwafgnvvs5hdk8938dp2ve6cjmy4vcf4l76", "validator_src_address": "stvaloper1gamc7ajhzukp08nle9z9asyfx4u4dlz53dquzj", "validator_dst_address": "stvaloper1zgqhnz69jppcwg9z27vtq3zq9r3du5v6vjqvpq", "amount": { "denom": "ustos", "amount": "10000" } }

Supply

Get total supply of coins in the chain

GET http://127.0.0.1:1317/supply/total

Example:

http://127.0.0.1:1317/supply/total

Get total supply of a single coin denomination

GET http://127.0.0.1:1317/supply/total/{denomination}

Example:

http://127.0.0.1:1317/supply/total/ustos

Path Parameters

Name
Type
Description

denomination*

String

coin demon

Register

Query total staking state of all registered resource nodes and indexing nodes

GET http://127.0.0.1:1317/register/staking

Example:

http://127.0.0.1:1317/register/staking

Get params of registered module

GET http://127.0.0.1:1317/register/params

Example:

http://127.0.0.1:1317/register/params

Get info of all registered resource nodes

GET http://127.0.0.1:1317/register/resource-nodes

Example:

http://127.0.0.1:1317/register/resource-nodes

Get info of all registered indexing nodes

GET http://127.0.0.1:1317/register/indexing-nodes

Example:

http://127.0.0.1:1317/register/indexing-nodes

Get staking info of a specific node

GET http://127.0.0.1:1317/register/staking/address/{nodeAddress}

Example:

http://127.0.0.1:1317/register/staking/address/st162xm62m75cjv2529p7yydkxmqfwhknsl60cmu4

Path Parameters

Name
Type
Description

nodeAddress*

String

node address

Query Parameters

Name
Type
Description

query_type

int64

query type number

Get all staking info of a specific owner

GET http://127.0.0.1:1317/register/staking/owner/{ownerAddress}

Example:

http://127.0.0.1:1317/register/staking/owner/st1qzx8na3ujlaxstgcyguudaecr6mpsemflhhzua

Path Parameters

Name
Type
Description

ownerAddress*

String

owner address

Proof of Traffic (PoT)

Query Pot rewards info of all wallet addresses at a specific epoch

GET http://127.0.0.1:1317/pot/rewards/epoch/{epoch}

Example:

http://127.0.0.1:1317/pot/rewards/epoch/1

Path Parameters

Name
Type
Description

epoch*

int64

epoch number

Query Pot rewards info of a wallet_address at a specific epoch

GET http://127.0.0.1:1317/pot/rewards/epoch/{epoch}

Example:

http://127.0.0.1:1317/pot/rewards/epoch/1?wallet_address=st1qzx8na3ujlaxstgcyguudaecr6mpsemflhhzua

Path Parameters

Name
Type
Description

epoch*

int64

epoch number

Query Parameters

Name
Type
Description

wallet_address

String

wallet address

Query owner's Pot rewards info at a specific height

GET http://127.0.0.1:1317/pot/rewards/wallet/{walletAddress}

Example:

http://127.0.0.1:1317/pot/rewards/wallet/st1qzx8na3ujlaxstgcyguudaecr6mpsemflhhzua?height=218

Path Parameters

Name
Type
Description

walletAddress*

String

owner's wallet address

Query Parameters

Name
Type
Description

height

int64

block search height/default: latest height

SDS

Get a simulated prepay result

GET http://127.0.0.1:1317/sds/simulatePrepay/{amtToPrepay}

Example:

http://127.0.0.1:1317/sds/simulatePrepay/8000000000

Path Parameters

Name
Type
Description

amtToPrepay*

int64

prepay amount

Get current uozPrice

GET http://127.0.0.1:1317/sds/uozPrice

Example:

http://127.0.0.1:1317/sds/uozPrice

Get current uozSupply

GET http://127.0.0.1:1317sds/uozSupply

Example:

http://127.0.0.1:1317/sds/uozSupply

Tendermint RPC

Tendermint APIs, such as query blocks, transactions and validator set

Get information about the connected node

GET http://127.0.0.1:1317/node_info

Example:

http://127.0.0.1:1317/node_info

Get a block at a specific {height | latest}

GET http://127.0.0.1:1317/blocks/{height | latest}

Example:

http://127.0.0.1:1317/blocks/latest

Get validator set at certain {height | latest}

GET http://127.0.0.1:1317/validatorsets/{height | latest}

Example:

http://127.0.0.1:1317/validatorsets/28

Syncing state of node

GET http://127.0.0.1:1317/syncing

Example:

http://127.0.0.1:1317/syncing

Transactions

Search, encode, or broadcast transactions.

Retrieve a transaction using its hash

GET http://127.0.0.1:1317/txs/{hash}

Example:

http://127.0.0.1:1317/txs/0CA946EBB823903004056BEA3CFAFE4F184EF616D72F38433763006534AA0E2E

Path Parameters

Name
Type
Description

hash*

Hash String

tx hash

Search transactions using params

GET http://127.0.0.1:1317/txs

Example:

http://127.0.0.1:1317/txs?message.action=send&message.sender=st1l76s0ukw0r77fydhqtqpexax8m64mzaq04830s

Query Parameters

Name
Type
Description

message.action

String

message action type('send')

message.sender

String

message sender address

page

int

page number

limit

int

maximum number of items per page

tx.minheight

int64

transactions on blocks with height greater or equal this value

tx.maxheight

int64

transactions on blocks with height less than or equal this value

Broadcast a signed tx to a full node

POST http://127.0.0.1:1317/txs

Example:

http://127.0.0.1:1317/txs

Request Body

Name
Type
Description

*

json

{ "tx": { "msg": [ { "type": "cosmos-sdk/MsgSend", "value": { "from_address": "st1xnhfx7c0nev9me835409efjj7whd672xs6d2m2", "to_address": "st1jfv3lyd67w5uywzywlsvgnym0hh9sqlujrw5l6", "amount": [ { "denom": "ustos", "amount": "2000000" } ] } } ], "fee": { "amount": [ { "denom": "ustos", "amount": "100" } ], "gas": "200000" }, "signatures": [ { "pub_key": { "type": "tendermint/PubKeySecp256k1", "value": "AolrbtnyTqnxmIjQJTmQfo/Gb2LlN9XPO/Qb2tSI/eRh" }, "signature": "THrgfsKFIVlZvwzI7rHh3nRdC2VXJhaPDMyolZEsWklDmkxI7ecEA4bQgmkgXDpS7suKGvApsUIxeG4Um0vzWw==" } ], "memo": "Send Tx Example" }, "mode": "block" }

The tx must be a signed StdTx. The supported broadcast modes include "block"(return after tx commit), "sync"(return after CheckTx) and "async"(return right away)

Block log

Check this Tx

Response

Check this block

Response

Decode a transaction from the Amino wire format

POST http://127.0.0.1:1317/txs/decode

Example:

http://127.0.0.1:1317/txs/decode

Request Body

Name
Type
Description

*

json

{"tx":"3QEoKBapCkKoo2GaChQ07pN7D55YXeTxpV5cplLzrt15RhIUklkfkbrzqcI4RHfgxEybfe5YA/waEAoFdXN0b3MSBzIwMDAwMDASEgoMCgV1c3RvcxIDMTAwEMCaDBpqCibrWumHIQKJa27Z8k6p8ZiI0CU5kH6Pxm9i5TfVzzv0G9rUiP3kYRJATHrgfsKFIVlZvwzI7rHh3nRdC2VXJhaPDMyolZEsWklDmkxI7ecEA4bQgmkgXDpS7suKGvApsUIxeG4Um0vzWyITRW5jb2RpbmcgVHggRXhhbXBsZQ=="}

Last updated