Skip to main content

Institution Stake API

The Institution Stake API allows institutions to manage and interact with their Ethereum accounts and assets. This guide provides an overview of the available methods.

BaseUrl

https://stake.dxpool.com/api

Authentication

All Methods require a key for authentication. Include the API key in the request headers as follows:

Authorization: {your key}

Note

The key can be obtained by contacting Dxpool Official.

Methods

Create Deposit Data

This Method generates deposit data response which can be externally broadcast to stake for one or more validators.

Request

  • Method: POST

  • Url: /v1/validators/institution/deposits

  • Request Body:

    • num_validators (integer, required): The number of validators to create.
    • amount (integer, required): The amount of ETH for each validator to deposit (An integer between 32 and 2048).
    • eth1_withdrawal_address (string, required): The Ethereum address to which withdrawals will be sent.
    • chain (string, required): The chain name of Ethereum Network (e.g., "mainnet", "hoodi").
  • Response Body:

    • deposits (array): An array of deposit data objects for each validator.
      • Each object contains:
      • pubkey (string): The public key of the validator.
      • withdrawal_credentials (string): The withdrawal credentials.
      • amount (integer): The amount of ETH to be deposited.
      • signature (string): The signature for the deposit.
      • deposit_message_root (string): The root of the deposit message.
      • deposit_data_root (string): The root of the deposit data.
      • network_name: (string): The name of the Ethereum network (e.g., "mainnet", "hoodi").
    • calldata: (string): The calldata for the deposit contract. This can be used to submit the deposit transaction on-chain.
  • Example Request:

{
"num_validators": 2,
"amount": 32,
"eth1_withdrawal_address": "0xYourWithdrawalAddress",
"chain": "mainnet"
}
  • Example Response:
{
"deposits": [
{
"pubkey": "0xValidatorPublicKey1",
"withdrawal_credentials": "0xWithdrawalCredentials1",
"amount": 32,
"signature": "0xSignature1",
"deposit_message_root": "0xDepositMessageRoot1",
"deposit_data_root": "0xDepositDataRoot1",
"network_name": "mainnet"
},
{
"pubkey": "0xValidatorPublicKey2",
"withdrawal_credentials": "0xWithdrawalCredentials2",
"amount": 32,
"signature": "0xSignature2",
"deposit_message_root": "0xDepositMessageRoot2",
"deposit_data_root": "0xDepositDataRoot2",
"network_name": "mainnet"
}
],
"calldata": "0xCalldataForDepositContract"
}

Exit Validator

This Method creates an exit request for specified validators.

Request

  • Method: POST

  • Url: /v1/validators/institution/exit

  • Request Body:

    • validators (array, required): An array of validator public keys to exit.
    • network_type (string, required): The chain name of ethereum Network (e.g., "mainnet", "hoodi").
  • Response Body:

    • validators (array): An array of exit data objects for each validator.
      • Each object contains:
      • public_key (string): The public key of the validator.
      • successful (bool): The result of the validator exit request.
      • reason (string, optional): The reason for the exit failure if the exit was not successful.
  • Example Request:

{
"validators": [
"0xValidatorPublicKey1",
"0xValidatorPublicKey2"
],
"network_type": "mainnet"
}
  • Example Response:
{
"validators": [
{
"public_key": "0xValidatorPublicKey1",
"successful": true
},
{
"public_key": "0xValidatorPublicKey2",
"successful": false,
"reason": "Validator not found"
}
]
}

Create Partial Withdrawal Data

This Method generates partial withdrawal data for a 0x02 validator type - down to a minimum validator balance of 32 ETH.

Request

  • Method: POST

  • Url: /v1/validators/institution/partial-withdrawals

  • Request Body:

    • public_key (string, required): The public key of the validator to withdraw from.
    • amount (integer, required): The amount of ETH to withdraw (An integer between 1 and the maximum withdrawable amount).
    • network_type (string, required): The chain name of ethereum Network (e.g., "mainnet", "hoodi").
  • Response Body:

    • data: (string): The calldata for the withdrawal contract. This can be used to submit the withdrawal transaction on-chain.
  • Example Request:

{
"public_key": "0xValidatorPublicKey",
"amount": 2,
"network_type": "mainnet"
}

  • Example Response:
{
"data": "0xCalldataForWithdrawalContract"
}

Create Top Up Data

This Method generates deposit data for topping up the balance of a 0x02 validator type - up to a maximum validator balance of 2048 ETH.

Request

  • Method: POST

  • Url: /v1/validators/institution/top-up

  • Request Body:

    • public_key (string, required): The public key of the validator to withdraw from.
    • amount (integer, required): The amount of ETH to withdraw (An integer between 1 and the maximum withdrawable amount).
    • network_type (string, required): The chain name of ethereum Network (e.g., "mainnet", "hoodi").
  • Response Body:

    • deposits (object): An object containing the partial withdrawal data.
      • pubkey (string): The public key of the validator.
      • withdrawal_credentials (string): The withdrawal credentials.
      • amount (integer): The amount of ETH to be deposited.
      • signature (string): The signature for the deposit.
      • deposit_message_root (string): The root of the deposit message.
      • deposit_data_root (string): The root of the deposit data.
      • network_name: (string): The name of the Ethereum network (e.g., "mainnet", "hoodi").
    • calldata: (string): The calldata for the withdrawal contract. This can be used to submit the withdrawal transaction on-chain.
  • Example Request:

{
"public_key": "0xValidatorPublicKey",
"amount": 20,
"eth1_withdrawal_address": "0xYourWithdrawalAddress",
"chain": "mainnet"
}
  • Example Response:
{
"deposits": {
"pubkey": "0xValidatorPublicKey",
"withdrawal_credentials": "0xWithdrawalCredentials",
"amount": 20,
"signature": "0xSignature",
"deposit_message_root": "0xDepositMessageRoot",
"deposit_data_root": "0xDepositDataRoot",
"network_name": "mainnet"
},
"calldata": "0xCalldataForDepositContract"
}