API Routes
Jump to:
GET /staking/avalanche/chains
Retrieves all the chains that are enabled for the protocol
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
Authorization | header | string | yes | The authentication token. |
Response
Status | Description |
---|---|
200 | The list was retrieved. |
401 | No authentication header found. |
403 | The authorization token is invalid. |
Property | Type | Description |
---|---|---|
(root) | array | The response. |
[] | string | The name of the chain. |
Sample response
GET /staking/avalanche/{chain}/validators
List all of the user's Avalanche validators.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
chain | path | string | yes | The validator's chain: "mainnet" or "fuji". |
Authorization | header | string | yes | The authentication token. |
Sample request
Response
Status | Description |
---|---|
200 | The list was retrieved. |
403 | The authorization token is invalid. |
Property | Type | Description |
---|---|---|
(root) | array | The validator data. |
[].avalancheNodeId | string | The Avalanche Node ID. |
[].chain | string | The validator chain |
[].createdAt | string | The validator creation date. |
[].id | string | The BloqStake id of the validator. |
[].region | string | The validator region. |
[].rewardingStakePercentage | string | Percent of stake which thinks this validator is above the uptime requirement. |
[].stake | string | The current amount staked during this period. |
[].stakingPeriods | array | Array of staking periods of the validator |
[].stakingPeriods[].depositTxId | string | Transaction Id of the deposit operation for staking. |
[].stakingPeriods[].end | string | End date of the staking. |
[].stakingPeriods[].rewardAddresses | string[] | Array of reward addresses. |
[].stakingPeriods[].rewards | string | (Optional). Rewards in nAvax. |
[].stakingPeriods[].stake | string | The amount staked in nAvax during this period. |
[].stakingPeriods[].start | string | Start date of the staking. |
[].updatedAt | string | The validator update date. |
[].user | string | The user Id. |
[].weightedAveragePercentage | string | Stake-weighted average of all observed uptimes for this validator. |
Sample response
POST /staking/avalanche/{chain}/validators
Create a new Avalanche validator.
Request
Name | In | Type | Required | Description |
---|---|---|---|---|
Authorization | header | string | yes | The authentication token. |
chain | path | path | yes | The validator chain: "mainnet" or "fuji". |
region | body | string | no | The region where it will be created. "us-east-2" for EC2, or "k8s" for Kubernetes. Defaults to "us-east-2" |
Sample request
Response
Status | Description |
---|---|
200 | The validator was created. |
403 | The authorization token is invalid. |
Property | Type | Description |
---|---|---|
(root) | object | The validator data. |
.chain | string | The validator chain |
.createdAt | string | The validator creation date. |
.id | string | The BloqStake Id of the validator. |
.user | string | The user Id. |
.region | string | The validator region. |
Sample responses
Successful response:
GET /staking/avalanche/{chain}/validators/{id}
Returns one Avalanche validator by its BloqStake Id.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
chain | path | string | yes | The validator's chain: "mainnet" or "fuji". |
id | path | string | yes | The validator's Id. |
Authorization | header | string | yes | The authentication token. |
Sample request
Response
Status | Description |
---|---|
200 | The validator was retrieved. |
403 | The authorization token is invalid. |
404 | The validator was not found. |
Property | Type | Description |
---|---|---|
(root) | object | The validator data. |
.avalancheNodeId | string | The Avalanche Node ID. |
.chain | string | The validator chain |
.createdAt | string | The validator creation date. |
.id | string | The BloqStake Id of the validator. |
.region | string | The validator region. |
.rewardingStakePercentage | string | Percent of stake which thinks this validator is above the uptime requirement. |
.stake | string | The current amount staked during this period. |
.stakingPeriods | array | Array of staking periods of the validator |
.stakingPeriods[].depositTxId | string | Transaction Id of the deposit operation for staking. |
.stakingPeriods[].end | string | End date of the staking. |
.stakingPeriods[].rewardAddresses | string[] | Array of reward addresses. |
.stakingPeriods[].rewards | string | (Optional). Rewards in nAvax. |
.stakingPeriods[].stake | string | The amount staked during this period in nAvax. |
.stakingPeriods[].start | string | Start date of the staking. |
.updatedAt | string | The validator update date. |
.user | string | The user Id. |
.weightedAveragePercentage | string | Stake-weighted average of all observed uptimes for this validator. |
Sample response
GET /staking/avalanche/billing/report
Returns a billing report of the organization's validators for the period specified, grouped by user. Requires the role auditor
or billing
.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
accept | header | string | no | The format of the report. Accepts "application/json" (default), "text/csv" |
fromDate | query string | string | no | Report's starting date |
organization | query string | string | no | Organization to filter the validators. Only valid for |
toDate | query string | string | no | Report's end date |
Sample request
Response
Status | Description |
---|---|
200 | The report was retrieved. |
403 | The authorization token is invalid or the user has no auditor role. |
If the accept
header is application/json
accept
header is application/json
Property | Type | Description |
---|---|---|
(root) | object | The report data. |
[].organization | string | The organization Id where the user belongs to. |
[].organizationName | string | The organization name the validator belongs to. |
[].reportFrom | string | Report's starting date. |
[].reportTo | string | Report's end date. |
[].user | string | User Id. |
[].userEmail | string | The user email. |
[].userName | string | The user name. |
[].validatorsPerChain | object[] | Validators grouped by chain. |
[].validatorsPerChain[].chain | string | The chain, i.e. "mainnet" or "fuji". |
[].validatorsPerChain[].fees | string | Amount of fees to deduce for the user. |
[].validatorsPerChain[].rewards | string | Amount of rewards in nAvax earned by the user during the period of the report. |
[].validatorsPerChain[].rewardsAfterFees | string | Rewards minus fees for the user. |
[].validatorsPerChain[].staked | string | Amount that is being staked in nAvax at the end of the report for all validators. |
[].validatorsPerChain[].totalActiveValidators | number | Amount of validators that staked during the report period. |
[].validatorsPerChain[].totalCurrentValidators | number | Amount of validators that are currently staking. |
[].validatorsPerChain[].totalInactiveValidators | number | Amount of validators that did not stake during the report period. |
[].validatorsPerChain[].totalWeightedValidators | string | Sum of every day that the validator was staking during the period divided by the number of days of the period. |
[].validatorsPerChain[].validatorsActive | object[] | Array of validators that staked during the report's period. |
[].validatorsPerChain[].validatorsActive[].activeDays | number | Number of days the validator has been staking during the period. |
[].validatorsPerChain[].validatorsActive[].avalancheNodeId | string | Avalanche Id from the network of validators. |
[].validatorsPerChain[].validatorsActive[].createdAt | string | Validator's creation date. |
[].validatorsPerChain[].validatorsActive[].fees | string | Amount of fees to deduce for the validator. |
[].validatorsPerChain[].validatorsActive[].rewards | string | Amount of rewards earned by the validator during the period of the report. |
[].validatorsPerChain[].validatorsActive[].rewardsAfterFees | string | Validator's rewards minus fees. |
[].validatorsPerChain[].validatorsActive[].runningDays | string | Number of days the validator's been running since its creation until the present day or its deletion. |
[].validatorsPerChain[].validatorsActive[].staked | string | Amount that is being staked in nAvax at the end of the report. |
[].validatorsPerChain[].validatorsInactive | object [] | Array of validators that did not stake during the report's period. |
[].validatorsPerChain[].validatorsInactive[].avalancheNodeId | string | Avalanche Id from the network of validators. |
[].validatorsPerChain[].validatorsInactive[].createdAt | string | Validator's creation date. |
[].validatorsPerChain[].validatorsInactive[].deletedAt | string | null | Validator's deletion date. |
[].validatorsPerChain[].validatorsInactive[].runningDays | string | Number of days the validator's been running since its creation until the present day or its deletion. |
Sample response
If the accept
header is text/csv
accept
header is text/csv
Property | Type | Description |
---|---|---|
activeDays | number | Number of days the validator has been staking during the period. |
avalancheNodeId | string | Avalanche Id from the network of validators. |
chain | string | The chain, i.e. "mainnet" or "fuji". |
createdAt | string | Validator's creation date. |
deletedAt | string | null | Validator's deletion date. |
fees | string | Amount of fees to deduce for the validator. |
organization | string | The organization Id where the user belongs to. |
organizationName | string | The organization name the validator belongs to. |
reportFrom | string | Report's starting date. |
reportTo | string | Report's end date. |
rewards | string | Amount of rewards earned by the validator during the period of the report. |
rewardsAfterFees | string | Validator's rewards minus fees. |
runningDays | string | Number of days the validator's been running since its creation until the present day or its deletion. |
staked | string | Amount that is being staked in nAvax at the end of the report. |
user | string | User Id. |
userEmail | string | The user email. |
userName | string | The user name. |
Sample response
DELETE /staking/avalanche/{chain}/validators/{id}
Terminates a validator.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
chain | path | string | yes | The validator's chain: "mainnet" or "fuji". |
id | path | string | yes | The validator's Id. |
Authorization | header | string | yes | The authentication token. |
Sample request
Response
Status | Description |
---|---|
204 | The validator was deleted. |
403 | The authorization token is invalid. |
404 | The validator was not found. |
409 | The validator is actively staking, and cannot be deleted. |
Error responses
All error responses are JSON objects that loosely follow the RFC 7807 specification.
Last updated