Jump to:
GET /staking/avalanche/chains
Retrieves all the chains that are enabled for the protocol
Parameters
Copy curl -X GET https://api.bloq.com/staking/avalanche/chains \
-H 'Authorization: Bearer <auth-token>'
Response
Sample response
GET /staking/avalanche/{chain}/validators
List all of the user's Avalanche validators.
Parameters
Sample request
Copy curl -X GET https://api.bloq.com/staking/avalanche/fuji/validators \
-H 'Authorization: Bearer <auth-token>'
Response
Sample response
Copy [
{
"avalancheNodeId" : "NodeID-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" ,
"chain" : "mainnet" ,
"createdAt" : "2022-08-23T20:21:17.725Z" ,
"id" : "node-0000000-0000-0000-0000-000000000000" ,
"region" : "us-east-2" ,
"rewardingStakePercentage" : "45.1234" ,
"stake" : "0" ,
"stakingPeriods" : [
{
"depositTxId" : "aMQx5eMng21SxwXozxikRcMymmts3cRACJhrAEJeruLJpRzgZ" ,
"end" : "2022-09-30T20:29:13.000Z" ,
"rewardAddresses" : [ "P-fuji1vy5ttya00gkq5h7hlvt6lkpsee8vur0qkjmgkc" ] ,
"rewards" : "10000000" ,
"stake" : "3000000000" ,
"start" : "2022-09-05T20:19:44.000Z"
}
] ,
"updatedAt" : "2022-08-24T10:04:16.142Z" ,
"user" : "user-00000000-0000-0000-0000-000000000000" ,
"weightedAveragePercentage" : "45.1234"
}
]
POST /staking/avalanche/{chain}/validators
Create a new Avalanche validator.
Request
Sample request
Copy curl -X POST https://api.bloq.com/staking/avalanche/mainnet/validators \
-H 'Authorization: Bearer <auth-token>'
--data { "region" : "us-east-2" }
Response
Sample responses
Successful response:
Copy {
"chain" : "mainnet" ,
"createdAt" : "2022-08-23T20:21:17.725Z" ,
"id" : "node-00000000-0000-0000-0000-000000000000" ,
"user" : "user-00000000-0000-0000-0000-000000000000" ,
"region" : "us-east-2"
}
GET /staking/avalanche/{chain}/validators/{id}
Returns one Avalanche validator by its BloqStake Id.
Parameters
Sample request
Copy curl -X GET https://api.bloq.com/staking/avalanche/fuji/validators/node-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx \
-H 'Authorization: Bearer <auth-token>'
Response
Sample response
Copy {
"avalancheNodeId" : "NodeID-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" ,
"chain" : "mainnet" ,
"createdAt" : "2022-08-23T20:21:17.725Z" ,
"id" : "node-0000000-0000-0000-0000-000000000000" ,
"region" : "us-east-2" ,
"rewardingStakePercentage" : "45.1234" ,
"stake" : "0" ,
"stakingPeriods" : [
{
"depositTxId" : "aMQx5eMng21SxwXozxikRcMymmts3cRACJhrAEJeruLJpRzgZ" ,
"end" : "2022-09-30T20:29:13.000Z" ,
"rewardAddresses" : [ "P-fuji1vy5ttya00gkq5h7hlvt6lkpsee8vur0qkjmgkc" ] ,
"rewards" : "10000000" ,
"stake" : "3000000000" ,
"start" : "2022-09-05T20:19:44.000Z"
}
] ,
"updatedAt" : "2022-08-24T10:04:16.142Z" ,
"user" : "user-00000000-0000-0000-0000-000000000000" ,
"weightedAveragePercentage" : "45.1234"
}
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
Sample request
Copy curl -X GET https://api.bloq.com/staking/avalanche/billing/report/user?fromDate=2023-01-15 & toDate = 2023-02-25 \
-H 'Authorization: Bearer <auth-token>'
Response
Sample response
Copy [
{
"organization" : "org-00000000-0000-5000-b000-000000000000" ,
"organizationName" : "Org test" ,
"reportFrom" : "2023-01-27" ,
"reportTo" : "2023-02-25" ,
"user" : "user-00000000-0000-4000-00000000000000000" ,
"userEmail" : "test@bloq.com" ,
"userName" : "Test user" ,
"validatorsPerChain" : [
{
"chain" : "mainnet" ,
"fees" : "28703148" ,
"rewards" : "717578700" ,
"rewardsAfterFees" : "688875552" ,
"staked" : "2000000000" ,
"totalActiveValidators" : 1 ,
"totalCurrentValidators" : 0 ,
"totalInactiveValidators" : 0 ,
"totalWeightedValidators" : 0.6 ,
"validatorsActive" : [
{
"activeDays" : 15 ,
"avalancheNodeId" : "NodeID-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" ,
"createdAt" : "2022-12-29T18:07:27.364Z" ,
"fees" : "28703148" ,
"rewards" : "717578700" ,
"rewardsAfterFees" : "688875552" ,
"runningDays" : 60 ,
"staked" : "2000000000"
}
] ,
"validatorsInactive" : []
} ,
{
"chain" : "fuji" ,
"fees" : "0" ,
"rewards" : "23331848" ,
"rewardsAfterFees" : "23331848" ,
"staked" : "2500000000" ,
"totalActiveValidators" : 1 ,
"totalCurrentValidators" : 1 ,
"totalInactiveValidators" : 1 ,
"totalWeightedValidators" : 0.5 ,
"validatorsActive" : [
{
"activeDays" : 14 ,
"avalancheNodeId" : "NodeID-yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy" ,
"createdAt" : "2023-01-04T20:59:35.909Z" ,
"fees" : "0" ,
"rewards" : "23331848" ,
"rewardsAfterFees" : "23331848" ,
"runningDays" : 54 ,
"staked" : "2500000000"
}
] ,
"validatorsInactive" : [
{
"avalancheNodeId" : "NodeID-zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz" ,
"createdAt" : "2023-01-04T20:59:35.909Z" ,
"runningDays" : 54
}
]
}
]
}
]
Sample response
Copy activeDays,avalancheNodeId,chain,createdAt,deletedAt,fees,organization,organizationName,reportFrom,reportTo,rewards,rewardsAfterFees,runningDays,staked,user,userEmail,userName
15,NodeID-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx,mainnet,2022-12-29T18:07:27.364Z,,28703148,org-00000000-0000-5000-b000-000000000000,Org test,2023-01-27,2023-02-25,717578700,688875552,60,2000000000,user-00000000-0000-4000-00000000000000000,test@bloq.com,Test user
14,NodeID-yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy,fuji,2023-01-04T20:59:35.909Z,,0,org-00000000-0000-5000-b000-000000000000,Org test,2023-01-27,2023-02-25,23331848,23331848,54,2500000000,user-00000000-0000-4000-00000000000000000,test@bloq.com,Test user
,NodeID-zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz,fuji,2023-01-04T20:59:35.909Z,,0,org-00000000-0000-5000-b000-000000000000,Org test,2023-01-27,2023-02-25,,,54,,user-00000000-0000-4000-00000000000000000,test@bloq.com,Test user
DELETE /staking/avalanche/{chain}/validators/{id}
Terminates a validator.
Parameters
Sample request
Copy curl -X DELETE https://api.bloq.com/staking/avalanche/fuji/validators/node-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx \
-H 'Authorization: Bearer <auth-token>'
Response
Error responses
All error responses are JSON objects that loosely follow the RFC 7807 specification.
Copy {
"status" : 403 ,
"title" : "Forbidden" ,
"detail" : "The authorization token is expired."
}
Last updated 7 months ago