Blockdaemon Staking API - Overview

The Blockdaemon Staking API simplifies and streamlines institutional cryptocurrency staking. This API allows developers to interact with blockchain networks and perform staking-related operations in a unified interface, such as delegating and undelegating tokens.

It provides a simple, programmatic way of interacting with multiple blockchain networks and performing staking-related actions. The API supports various blockchain networks and is accessible via RESTful API endpoints.

With the Staking API, you can quickly and easily build and deploy applications that automate staking activities and increase efficiency in your blockchain operations.

API Limits

Please note that there is an API limit of 240 requests per minute on all Staking API endpoints.

Use Cases

The Staking API generates rewards faster and with more control, simplifying and accelerating your business processes while helping the underlying blockchain protocols. It gives you a single API for core staking services. Here are a few of its use cases:

Requests containing two or more validators will be routed through the Blockdaemon batch deposit to reduce gas costs.

Get Started

Step 1. Onboarding the Staking Configuration

A staking configuration is a set of validators dedicated to your organization deployed based on the parameters set in the associated configuration. It's created on your behalf initially once KYB has been performed.

  1. Provide the following information to your Customer Success Manager:
    1. Network: Mainnet or Hoodi testnet.
    2. MEV: (Maximal Extractable Value) enabled or disabled.
    3. Geolocation Preference.
    4. Default Fee Recipient Address for Blockdaemon to set for all validators in the staking configuration (this value can be overridden at stake time).
  2. Once you have provided this information, Blockdaemon will create a staking configuration with the above configuration.

Step 2. Generate Your Staking API Key

  1. Select Staking APIs from the app's left-hand menu.

  2. Click the Create API Key button to initiate key creation.

  3. A pop-up window will appear, enter a "Key Name".

    1. Key names must be unique.
    2. Key names must be at least 3 characters long and max 30 characters.
    3. Only alphanumeric characters and spaces are allowed.
  4. Click Create to generate your new API key.

  5. A new API key will be generated. Copy and store the key.

Step 3. Authenticate Your Request

After you get your API key, you can use it to authenticate your requests. There are three methods to authenticate Staking API requests. Here’s a quick overview of each.

3.1. Using Your API Key as a Query Parameter

To authenticate a Staking API request, you can use your API key as a query parameter:

Add ?apiKey=YOUR_API_KEY to the end of the Staking API endpoint. For example, to retrieve details of a stake by stake ID, use:

https://svc.blockdaemon.com/boss/v1/stakes/{stake_id}?apiKey=YOUR_API_KEY

You can use this method with any tool without needing extra steps.

3.2. Using Your API Key as a Bearer Token

You can authenticate DeFi API requests by using YOUR_API_KEY as a bearer token in the authorization header.

cURL

--header 'Authorization: Bearer YOUR_API_KEY'

For example, to get details of a stake, use the following code:

cURL

curl --request GET 'https://svc.blockdaemon.com/boss/v1/stakes/{stake_id}' \
--header 'Authorization: Bearer YOUR_API_KEY'

3.3. Using Your API Key as an X-API-Key

You can authenticate DeFi API requests by including your API key in the X-API-Key header.

cURL

--header 'X-API-Key: YOUR_API_KEY'

For example, to retrieve details of a stake, use the following code:

cURL

curl --request GET 'https://svc.blockdaemon.com/boss/v1/stakes/{stake_id}' \
--header 'X-API-KEY: YOUR_API_KEY'

Step 4. Start Staking Using the API

Check out our Staking APIs docs to access staking information across multiple protocols and streamline institutional staking.

Avalanche
Binance
Cardano
Cosmos
Ethereum
NEAR
Polkadot
Polygon
Solana

Copy the code snippet to the terminal of your choice or any API platform such as Postman and start staking.

Step 5. Get the Result

Your request will be authorized if your API key is correct. For example, the requests from the Solana - Post Stake Intent returns the details of the stake ID as shown below.

JSON

{
  "stake_intent_id": "stake_intent_Wgx98Rbi8nQuL9ddn3mTk1",
  "customer_id": "SatoshiNakamoto-xUYJbPw9hw",
  "plan_id": "plan_Wgx98Rbi8nQuL9ddn3mTk1",
  "protocol": "solana",
  "network": "mainnet",
  "solana": {
    "stake_id": "stake_Wgx98Rbi8nQuL9ddn3mTk1",
    "amount": "100",
    "validator_public_key": "0xa1d1ad0714035353258038e964ae9675dc0252ee22cea896825c01458e1807bfad2f9969338798548d9858a571f7425c",
    "staking_authority": "5xot9PVkphiX2adznghwrAuxGs2zeWisNSxMW6hU6Hkj",
    "withdrawal_authority": "0xa1d1ad0714035353258038e964ae9675dc0252ee22cea896825c01458e1807bfad2f9969338798548d9858a571f7425c",
    "stake_account_public_key": "5xot9PVkphiX2adznghwrAuxGs2zeWisNSxMW6hU6Hkj",
    "unsigned_transaction": "0x22895118000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000120087fed394b43849eebef1e88873cd9efdbe33136656e5148e659b8b2f33625d40000000000000000000000000000000000000000000000000000000000000030b81748644e23c4d950f9dd709f3eb73d5eacd9657997e1d9dde7c4ebd8a6519ecb9d0a7fb603d3b68e023278f9650122000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020010000000000000000000000c509bb854c526af4cee5e037089f7aa8e091d8870000000000000000000000000000000000000000000000000000000000000060b36b79b4b206c0310472c117fa40c05342b5dc3e89f98f42c9da3ce6450d4c603cad55248017fd4eca3ab277cca64569193e4d487f5b2ea78a2bcdc81926c313c05842a3af318967a775783bba22519e8b8886587efa99aa7dab5784f792b187\n",
    "expiration_time": 1689939023
  }
}

If the key is incorrect or missing, you will get this error:

JSON

{
    "status": 401,
    "type": "unauthorized",
    "title": "Invalid Token"
}