Sei — Information, Transactions, ABCI, Gaia REST, Staking, Query (3/3)
API reference for Sei. All methods ->
Staking
/staking/delegators/{delegatorAddr}/delegations
Submits a delegation.
Parameters
delegation(body): delegates an amount of liquid coins to a validator.
{
"base_req": {
"from": "cosmos1g9ahr6xhht5rmqven628nklxluzyv8z9jqjcmc",
"memo": "Sent via Cosmos Voyager",
"chain_id": "Cosmos-Hub",
"account_number": "0",
"sequence": "1",
"gas": "200000",
"gas_adjustment": "1.2",
"fees": [
{
"denom": "stake",
"amount": "50"
}
],
"simulate": false
},
"delegator_address": "cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27",
"validator_address": "cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l",
"amount": {
"denom": "stake",
"amount": "50"
}
}
delegatorAddr(string; required): a Bech32 AccAddress of a delegator.
Returns
Submission result codes:
- 200 — OK.
- 400 — Invalid delegator address or delegation request body.
- 401 — Key password is wrong.
- 500 — Internal Server Error.
Request example
curl -X POST https://rpc.ankr.com/premium/YOUR_ANKR_API_KEY-http/sei_cosmos/YOUR_ANKR_API_KEY/staking/delegators/{delegatorAddr}/delegations
Response example
{
"msg": [
"string"
],
"fee": {
"gas": "string",
"amount": [
{
"denom": "stake",
"amount": "50"
}
]
},
"memo": "string",
"signature": {
"signature": "MEUCIQD02fsDPra8MtbRsyB1w7bqTM55Wu138zQbFcWx4+CFyAIge5WNPfKIuvzBZ69MyqHsqD8S1IwiEp+iUb6VSdtlpgY=",
"pub_key": {
"type": "tendermint/PubKeySecp256k1",
"value": "Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH"
},
"account_number": "0",
"sequence": "0"
}
}
/staking/delegators/{delegatorAddr}/unbonding_delegations
Submits an unbonding delegation.
Parameters
delegation(body): unbonds an amount of bonded shares from a validator.
{
"base_req": {
"from": "cosmos1g9ahr6xhht5rmqven628nklxluzyv8z9jqjcmc",
"memo": "Sent via Cosmos Voyager",
"chain_id": "Cosmos-Hub",
"account_number": "0",
"sequence": "1",
"gas": "200000",
"gas_adjustment": "1.2",
"fees": [
{
"denom": "stake",
"amount": "50"
}
],
"simulate": false
},
"delegator_address": "cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27",
"validator_address": "cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l",
"amount": {
"denom": "stake",
"amount": "50"
}
}
delegatorAddr(string; required): a Bech32 AccAddress of a delegator.
cosmos16xyempempp92x9hyzz9wrgf94r6j9h5f06pxxv
Returns
Result codes:
- 200 — OK.
- 400 — Invalid delegator address or unbonding delegation request body.
- 401 — Key password is wrong.
- 500 — Internal Server Error.
Request example
curl -X POST https://rpc.ankr.com/premium/YOUR_ANKR_API_KEY-http/sei_cosmos/YOUR_ANKR_API_KEY/staking/delegators/{delegatorAddr}/unbonding_delegations
Response example
{
"msg": [
"string"
],
"fee": {
"gas": "string",
"amount": [
{
"denom": "stake",
"amount": "50"
}
]
},
"memo": "string",
"signature": {
"signature": "MEUCIQD02fsDPra8MtbRsyB1w7bqTM55Wu138zQbFcWx4+CFyAIge5WNPfKIuvzBZ69MyqHsqD8S1IwiEp+iUb6VSdtlpgY=",
"pub_key": {
"type": "tendermint/PubKeySecp256k1",
"value": "Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH"
},
"account_number": "0",
"sequence": "0"
}
}
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.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/premium-http/sei_cosmos/YOUR_ANKR_API_KEY/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/premium-http/sei_cosmos/YOUR_ANKR_API_KEY/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/premium-http/sei_cosmos/YOUR_ANKR_API_KEY/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"
}
}