Skip to main content
Staking API can be accessed via the CDP SDK, a simple client library for interacting with the Staking API, or through the CDP API, a restful API for direct http requests. For details on getting started with our SDK, see our quickstart.

Authentication

Our REST APIs use JWT tokens for authentication. Find more information on generating a JWT token in the language of your choice here.

Making an API request

  1. Click through any API in the reference here to learn more about its parameters and usage.
  2. Fill in the parameters. For APIs like BuildStakingOperation and GetStakingContext that require custom options, refer to the staking options section below for available options.
    API Input
  3. Select your preferred language on the right to generate a sample request code. Use this as a reference to make a staking API request. For example, for the BuildStakingOperation API, the generated code for a Partial ETH stake of 0.1 ETH will look like this in some of the common languages:
  4. Finally, add the JWT token, obtained from the authentication section above, as a Bearer header in your request. The code will look like this:

Staking Options

Some staking APIs such as BuildStakingOperation and GetStakingContext require additional options to be passed in the request body specific to the staking network. See below to find the options available for each staking network. Once you have identified which options you need, you can add them to the request body under the options field like so:

Shared ETH Staking

Shared ETH staking supports the following BuildStakingOperation actions: stake, unstake and claim_stake. See the tabs below for details on the options that can be used with each one.

Dedicated ETH Staking

Dedicated ETH staking supports the following BuildStakingOperation actions: stake and unstake. See the tabs below for details on the options that can be used with each one.

SOL Staking

SOL staking supports the following BuildStakingOperation actions: stake, unstake and claim_stake. See the tabs below for details on the options that can be used with each one.