All URIs are relative to https://dex-api.coinex.org
Method | HTTP request | Description |
---|---|---|
getDelegations | GET /staking/delegators/{delegatorAddr}/delegations | Get all delegations from a delegator |
getDelegationsOfValidator | GET /staking/validators/{validatorAddr}/delegations | Get all delegations from a validator |
getDelegationsToValidator | GET /staking/delegators/{delegatorAddr}/delegations/{validatorAddr} | Query the current delegation between a delegator and a validator |
getDelegatorTxs | GET /staking/delegators/{delegatorAddr}/txs | Get all staking txs (i.e msgs) from a delegator |
getRedelegations | GET /staking/redelegations | Get all redelegations (filter by query params) |
getStakingParameters | GET /staking/parameters | Get the current staking parameter values |
getStakingPool | GET /staking/pool | Get the current state of the staking pool |
getUndelegationsBetween | GET /staking/delegators/{delegatorAddr}/unbonding_delegations/{validatorAddr} | Query all unbonding delegations between a delegator and a validator |
getUndelegationsOfDelegator | GET /staking/delegators/{delegatorAddr}/unbonding_delegations | Get all unbonding delegations from a delegator |
getUndelegationsOfValidator | GET /staking/validators/{validatorAddr}/unbonding_delegations | Get all unbonding delegations from a validator |
getValidator | GET /staking/validators/{validatorAddr} | Query the information from a single validator |
getValidatorOfDelegator | GET /staking/delegators/{delegatorAddr}/validators/{validatorAddr} | Query a validator that a delegator is bonded to |
getValidators | GET /staking/validators | Get all validator candidates. By default it returns only the bonded validators. |
getValidatorsOfDelegator | GET /staking/delegators/{delegatorAddr}/validators | Query all validators that a delegator is bonded to |
submitDelegation | POST /staking/delegators/{delegatorAddr}/delegations | Submit delegation |
submitRedelegation | POST /staking/delegators/{delegatorAddr}/redelegations | Submit a redelegation |
undelegate | POST /staking/delegators/{delegatorAddr}/unbonding_delegations | Submit an unbonding delegation |
InlineResponse2005 getDelegations(delegatorAddr)
Get all delegations from a delegator
import DexApiNodejs from 'dex-api-nodejs';
let apiInstance = new DexApiNodejs.StakingApi();
let delegatorAddr = coinex167w96tdvmazakdwkw2u57227eduula2cy572lf; // String | Bech32 AccAddress of Delegator
apiInstance.getDelegations(delegatorAddr).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
delegatorAddr | String | Bech32 AccAddress of Delegator |
No authorization required
- Content-Type: Not defined
- Accept: application/json
InlineResponse2005 getDelegationsOfValidator(validatorAddr)
Get all delegations from a validator
import DexApiNodejs from 'dex-api-nodejs';
let apiInstance = new DexApiNodejs.StakingApi();
let validatorAddr = coinexvaloper1qwl879nx9t6kef4supyazayf7vjhennyh568ys; // String | Bech32 OperatorAddress of validator
apiInstance.getDelegationsOfValidator(validatorAddr).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
validatorAddr | String | Bech32 OperatorAddress of validator |
No authorization required
- Content-Type: Not defined
- Accept: application/json
InlineResponse2006 getDelegationsToValidator(delegatorAddr, validatorAddr)
Query the current delegation between a delegator and a validator
import DexApiNodejs from 'dex-api-nodejs';
let apiInstance = new DexApiNodejs.StakingApi();
let delegatorAddr = coinex167w96tdvmazakdwkw2u57227eduula2cy572lf; // String | Bech32 AccAddress of Delegator
let validatorAddr = coinexvaloper1qwl879nx9t6kef4supyazayf7vjhennyh568ys; // String | Bech32 OperatorAddress of validator
apiInstance.getDelegationsToValidator(delegatorAddr, validatorAddr).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
delegatorAddr | String | Bech32 AccAddress of Delegator | |
validatorAddr | String | Bech32 OperatorAddress of validator |
No authorization required
- Content-Type: Not defined
- Accept: application/json
[PaginatedQueryTxs] getDelegatorTxs(delegatorAddr)
Get all staking txs (i.e msgs) from a delegator
import DexApiNodejs from 'dex-api-nodejs';
let apiInstance = new DexApiNodejs.StakingApi();
let delegatorAddr = coinex167w96tdvmazakdwkw2u57227eduula2cy572lf; // String | Bech32 AccAddress of Delegator
apiInstance.getDelegatorTxs(delegatorAddr).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
delegatorAddr | String | Bech32 AccAddress of Delegator |
No authorization required
- Content-Type: Not defined
- Accept: application/json
InlineResponse2009 getRedelegations(opts)
Get all redelegations (filter by query params)
import DexApiNodejs from 'dex-api-nodejs';
let apiInstance = new DexApiNodejs.StakingApi();
let opts = {
'delegator': "delegator_example", // String | Bech32 AccAddress of Delegator
'validatorFrom': "validatorFrom_example", // String | Bech32 ValAddress of SrcValidator
'validatorTo': "validatorTo_example" // String | Bech32 ValAddress of DstValidator
};
apiInstance.getRedelegations(opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
delegator | String | Bech32 AccAddress of Delegator | [optional] |
validatorFrom | String | Bech32 ValAddress of SrcValidator | [optional] |
validatorTo | String | Bech32 ValAddress of DstValidator | [optional] |
No authorization required
- Content-Type: Not defined
- Accept: application/json
InlineResponse20014 getStakingParameters()
Get the current staking parameter values
import DexApiNodejs from 'dex-api-nodejs';
let apiInstance = new DexApiNodejs.StakingApi();
apiInstance.getStakingParameters().then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
This endpoint does not need any parameter.
No authorization required
- Content-Type: Not defined
- Accept: application/json
InlineResponse20013 getStakingPool()
Get the current state of the staking pool
import DexApiNodejs from 'dex-api-nodejs';
let apiInstance = new DexApiNodejs.StakingApi();
apiInstance.getStakingPool().then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
This endpoint does not need any parameter.
No authorization required
- Content-Type: Not defined
- Accept: application/json
InlineResponse2008 getUndelegationsBetween(delegatorAddr, validatorAddr)
Query all unbonding delegations between a delegator and a validator
import DexApiNodejs from 'dex-api-nodejs';
let apiInstance = new DexApiNodejs.StakingApi();
let delegatorAddr = coinex167w96tdvmazakdwkw2u57227eduula2cy572lf; // String | Bech32 AccAddress of Delegator
let validatorAddr = coinexvaloper1qwl879nx9t6kef4supyazayf7vjhennyh568ys; // String | Bech32 OperatorAddress of validator
apiInstance.getUndelegationsBetween(delegatorAddr, validatorAddr).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
delegatorAddr | String | Bech32 AccAddress of Delegator | |
validatorAddr | String | Bech32 OperatorAddress of validator |
No authorization required
- Content-Type: Not defined
- Accept: application/json
InlineResponse2007 getUndelegationsOfDelegator(delegatorAddr)
Get all unbonding delegations from a delegator
import DexApiNodejs from 'dex-api-nodejs';
let apiInstance = new DexApiNodejs.StakingApi();
let delegatorAddr = coinex167w96tdvmazakdwkw2u57227eduula2cy572lf; // String | Bech32 AccAddress of Delegator
apiInstance.getUndelegationsOfDelegator(delegatorAddr).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
delegatorAddr | String | Bech32 AccAddress of Delegator |
No authorization required
- Content-Type: Not defined
- Accept: application/json
InlineResponse20012 getUndelegationsOfValidator(validatorAddr)
Get all unbonding delegations from a validator
import DexApiNodejs from 'dex-api-nodejs';
let apiInstance = new DexApiNodejs.StakingApi();
let validatorAddr = coinexvaloper1qwl879nx9t6kef4supyazayf7vjhennyh568ys; // String | Bech32 OperatorAddress of validator
apiInstance.getUndelegationsOfValidator(validatorAddr).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
validatorAddr | String | Bech32 OperatorAddress of validator |
No authorization required
- Content-Type: Not defined
- Accept: application/json
InlineResponse20011 getValidator(validatorAddr)
Query the information from a single validator
import DexApiNodejs from 'dex-api-nodejs';
let apiInstance = new DexApiNodejs.StakingApi();
let validatorAddr = coinexvaloper1qwl879nx9t6kef4supyazayf7vjhennyh568ys; // String | Bech32 OperatorAddress of validator
apiInstance.getValidator(validatorAddr).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
validatorAddr | String | Bech32 OperatorAddress of validator |
No authorization required
- Content-Type: Not defined
- Accept: application/json
InlineResponse20011 getValidatorOfDelegator(delegatorAddr, validatorAddr)
Query a validator that a delegator is bonded to
import DexApiNodejs from 'dex-api-nodejs';
let apiInstance = new DexApiNodejs.StakingApi();
let delegatorAddr = coinex167w96tdvmazakdwkw2u57227eduula2cy572lf; // String | Bech32 AccAddress of Delegator
let validatorAddr = coinexvaloper1qwl879nx9t6kef4supyazayf7vjhennyh568ys; // String | Bech32 ValAddress of Delegator
apiInstance.getValidatorOfDelegator(delegatorAddr, validatorAddr).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
delegatorAddr | String | Bech32 AccAddress of Delegator | |
validatorAddr | String | Bech32 ValAddress of Delegator |
No authorization required
- Content-Type: Not defined
- Accept: application/json
InlineResponse20010 getValidators(opts)
Get all validator candidates. By default it returns only the bonded validators.
import DexApiNodejs from 'dex-api-nodejs';
let apiInstance = new DexApiNodejs.StakingApi();
let opts = {
'status': bonded, // String | The validator bond status. Must be either 'bonded', 'unbonded', or 'unbonding'.
'page': 1, // Number | The page number.
'limit': 1 // Number | The maximum number of items per page.
};
apiInstance.getValidators(opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
status | String | The validator bond status. Must be either 'bonded', 'unbonded', or 'unbonding'. | [optional] |
page | Number | The page number. | [optional] |
limit | Number | The maximum number of items per page. | [optional] |
No authorization required
- Content-Type: Not defined
- Accept: application/json
InlineResponse20010 getValidatorsOfDelegator(delegatorAddr)
Query all validators that a delegator is bonded to
import DexApiNodejs from 'dex-api-nodejs';
let apiInstance = new DexApiNodejs.StakingApi();
let delegatorAddr = coinex167w96tdvmazakdwkw2u57227eduula2cy572lf; // String | Bech32 AccAddress of Delegator
apiInstance.getValidatorsOfDelegator(delegatorAddr).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
delegatorAddr | String | Bech32 AccAddress of Delegator |
No authorization required
- Content-Type: Not defined
- Accept: application/json
BroadcastTxCommitResult submitDelegation(delegatorAddr, opts)
Submit delegation
import DexApiNodejs from 'dex-api-nodejs';
let apiInstance = new DexApiNodejs.StakingApi();
let delegatorAddr = "delegatorAddr_example"; // String | Bech32 AccAddress of Delegator
let opts = {
'delegation': new DexApiNodejs.InlineObject6() // InlineObject6 |
};
apiInstance.submitDelegation(delegatorAddr, opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
delegatorAddr | String | Bech32 AccAddress of Delegator | |
delegation | InlineObject6 | [optional] |
No authorization required
- Content-Type: application/json
- Accept: application/json
StdTx submitRedelegation(delegatorAddr, opts)
Submit a redelegation
import DexApiNodejs from 'dex-api-nodejs';
let apiInstance = new DexApiNodejs.StakingApi();
let delegatorAddr = coinex167w96tdvmazakdwkw2u57227eduula2cy572lf; // String | Bech32 AccAddress of Delegator
let opts = {
'delegation': new DexApiNodejs.InlineObject8() // InlineObject8 |
};
apiInstance.submitRedelegation(delegatorAddr, opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
delegatorAddr | String | Bech32 AccAddress of Delegator | |
delegation | InlineObject8 | [optional] |
No authorization required
- Content-Type: application/json
- Accept: application/json
BroadcastTxCommitResult undelegate(delegatorAddr, opts)
Submit an unbonding delegation
import DexApiNodejs from 'dex-api-nodejs';
let apiInstance = new DexApiNodejs.StakingApi();
let delegatorAddr = "delegatorAddr_example"; // String | Bech32 AccAddress of Delegator
let opts = {
'delegation': new DexApiNodejs.InlineObject7() // InlineObject7 |
};
apiInstance.undelegate(delegatorAddr, opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
delegatorAddr | String | Bech32 AccAddress of Delegator | |
delegation | InlineObject7 | [optional] |
No authorization required
- Content-Type: application/json
- Accept: application/json