Overview

Staking delegates assets to a staking address. Depending on the asset, the staking address could be the validator address, an address linked to your wallet, or a smart-contract address.

When staking from custody or self-custody wallets, you can retrieve the following delegation details:

  • Delegated balances
  • Delegation addresses
  • Delegation IDs
  • Expected APR or APY
  • Rewards accrued
  • Withdrawal addresses (for unstaking)

Depending on the asset, multiple staking requests can result in one or more staking delegations. For example, ETH staking requires multiples of 32, so a staking request for 64 ETH results in two staking delegations. Conversely, if an asset doesn't require staking in multiples, you can create multiple staking requests, from the same wallet, and all the requests result in one staking delegation.

Prerequisites

Cookbook

Need just the steps? Expand the cookbook below to get started:

View Rewards and DelegationsOpen Cookbook

View Rewards

Endpoint: List staking details by wallet

export COIN="<ASSET_ID>"
export WALLET_ID="<YOUR_WALLET_ID>"
export ACCESS_TOKEN="<YOUR_ACCESS_TOKEN>"

curl -X GET \
  "https://app.bitgo-test.com/api/staking/v1/$COIN/wallets/$WALLET_ID" \
  -H 'Content-Type: application/json' \
  -H "Authorization: Bearer $ACCESS_TOKEN"

Step Result

{
  "enterpriseId": "1032e75c451052000436831deb797af1",
  "walletId": "2032e75g451052000636831abd797bd3",
  "walletType": "custodial",
  "coin": "eth",
  "delegated": 6400000000000000000,
  "pendingStake":0,
  "pendingUnstake": 0,
  "rewards": 1000000000000000,
  "apy": 8.2,
  "createdDate": "2022-01-10T14:32:28Z",
  "modifiedDate": "2022-01-10T14:32:28Z"
}

View Delegations

Endpoint: List staking delegations

export COIN="<ASSET_ID>"
export WALLET_ID="<YOUR_WALLET_ID>"
export ACCESS_TOKEN="<YOUR_ACCESS_TOKEN>"
export DELEGATION_IDS="<DELEGATION_IDS>"
export DELEGATION_STATUS="<DELEGATION_STATUS>"

curl -X GET \
  "https://app.bitgo-test.com/api/staking/v1/$COIN/wallets/$WALLET_ID/delegations?delegationIds=$DELEGATION_IDS&delegationStatus=$DELEGATION_STATUS" \
  -H 'Content-Type: application/json' \
  -H "Authorization: Bearer $ACCESS_TOKEN"

Step Result

{
  "page": 1,
  "totalPages": 1,
  "totalElements": 2,
  "delegations": [
    {
      "id": "e0225adbc-66a3-4ccd-9a9d-726a05bca0cf",
      "delegationAddress": "0x5a6406c9710f588ca733360bfa8033d0ef9ecdy5",
      "withdrawalAddress": "0x5a6406c9710f588ca733360bfa8033d0ef9ecd7c",
      "delegated": 3200000000000000000,
      "status": "ACTIVE",
      "rewards": 0,
      "pendingUnstake": 3200000000000000000,
      "apy": 8.3,
      "coin": "hteth",
      "walletId": "2032e75g451052000636831abd797bd3",
      "unstakingFee": 100000000000000,
      "unstakingMin": 0
    },
    {
      "id": "e0225adbc-55b43-5tta-9a9d-726a05bca0ai",
      "delegationAddress": "0x3b6406c9710f588ca733360bfa8033d0ef9ecre4",
      "withdrawalAddress": "0x5a6406c9710f588ca733360bfa8033d0ef9ecd7c",
      "delegated": 3200000000000000000,
      "status": "ACTIVE",
      "rewards": 0,
      "pendingUnstake": 0,
      "apy": 8.3,
      "coin": "hteth",
      "walletId": "2032e75g451052000636831abd797bd3",
      "unstakingFee": 1000000000000000,
      "unstakingMin": 0
    }
  ]
}

Next

Use the delegation ID to Unstake Assets.

See Also