# Stake Assets

Source: https://developers.bitgo.com/docs/stake-assets

## Overview

To stake assets, you create a staking-request transaction. BitGo uses the request to generate one or more delegation transactions, depending on the asset. Each transaction must abide by your policies, requiring approval, if configured, followed by signing and broadcasting.

> 📘 **Note**
>
> Staking protocols differ by asset. To learn asset-specific staking details, you can call the [List coins available for staking](/reference/v1stakingcoins) endpoint.

## Prerequisites

- [Get Started](/docs/get-started-intro)
- [Create Wallets](/docs/wallets-create-wallets) or set up your [Go Account](/docs/wallet-types#go-account)
- Enable staking in your enterprise by contacting sales@bitgo.com

## Cookbooks

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

<Cookbook slug="stake-assets-custody-wallet" title="Stake Assets - Custody Wallet" />

<Cookbook slug="stake-assets-self-custody-wallet" title="Stake Assets - Self-Custody Wallet" />

<Cookbook slug="stake-assets-go-account" title="Stake Assets - Go Account" />

<Tabs>
<Tab title="Custody Wallet">

## 1. Create Staking Request

Create a staking request by specifying the staking details and sending them to BitGo. The following example shows the minimum required parameters for staking ether.

>Endpoint: [Create staking request](/reference/v1stakingrequestcreate)

```shell cURL
export COIN="<ASSET_ID>"
export WALLET_ID="<YOUR_WALLET_ID>"
export ACCESS_TOKEN="<YOUR_ACCESS_TOKEN>"
export AMOUNT="<AMOUNT_IN_BASE_UNITS>"

curl -X POST \
  https://app.bitgo-test.com/api/staking/v1/$COIN/wallets/$WALLET_ID/requests \
  -H 'Content-Type: application/json' \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -d '{
    "amount": "'"$AMOUNT"'",
    "type": "STAKE"
  }'
```
```js JavaScript
const stakingWallet = wallet.toStakingWallet();
const stakingRequest = await stakingWallet.stake({
  amount: '<AMOUNT_IN_BASE_UNITS>'
});
```

### Step Result

BitGo uses the data you pass to build an unsigned staking request. The following example builds a staking request for 64 HTETH.

```json JSON
{
  "id": "e055adbc-66a3-4ccd-9a9d-726a05bca0cf",
  "clientId": "e055adbc-66a3-4ccd-9a9d-726a05bca0cf",
  "requestUserId": "6092e75c451052000636831deb797bd1",
  "enterpriseId": "1032e75c451052000436831deb797af1",
  "walletId": "2032e75g451052000636831abd797bd3",
  "walletType": "custodial",
  "type": "STAKE",
  "coin": "hteth",
  "createdDate": "2022-01-10T14:32:28Z",
  "statusModifiedDate": "2022-01-10T14:32:28Z",
  "status": "NEW",
  "withdrawalAddress": "0x5a6406c9710f588ca733360bfa8033d0ef9ecd7c",
  "amount": 6400000000000000000,
  "gasPrice": 1000000000000000
}
```

## 2. Get Request Status (Optional)

Validators must process your staking request before the request is ready for approval and signing. To get notified when staking requests are pending approval, you can [Create Webhooks](/docs/webhooks-overview). To get notified when staking requests are pending approval or signature, you can call the following:

>Endpoint: [List staking requests by enterprise](/reference/v1stakingtransactions)

```shell cURL
export ENTERPRISE_ID="<YOUR_ENTERPRISE_ID>"
export ACCESS_TOKEN="<YOUR_ACCESS_TOKEN>"
export WALLET_TYPE="<YOUR_WALLET_TYPE>"
export WALLET_ID="<YOUR_WALLET_ID>"

curl -X GET \
  https://app.bitgo-test.com/api/staking/v1/enterprises/$ENTERPRISE_ID/requests/transactions \
  -H 'Content-Type: application/json' \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -d '{
    "walletType": "'"$WALLET_TYPE"'",
    "walletId": "'"$WALLET_ID"'",
    "requestType": "STAKE",
    "requestStatus": "PENDING_APPROVAL"
  }'
```

### Step Result

```json JSON
{
  "page": 1,
  "totalPages": 1,
  "totalElements": 1,
  "requests": [
    {
      "id": "e055adbc-66a3-4ccd-9a9d-726a05bca0cf",
      "clientId": "f054adbc-26a3-4acd-8a9d-726a05bca0dr",
      "requestUserId": "6092e75c451052000636831deb797bd1",
      "enterpriseId": "1032e75c451052000436831deb797af1",
      "walletId": "2032e75g451052000636831abd797bd3",
      "walletType": "custodial",
      "type": "STAKE",
      "coin": "hteth",
      "createdDate": "2022-01-10T14:32:28.000Z",
      "statusModifiedDate": "2022-01-10T14:32:28.000Z",
      "status": "NEW",
      "withdrawalAddress": "0x5a6406c9710f588ca733360bfa8033d0ef9ecd7c",
      "delegations": [
        {
          "id": "e0225adbc-66a3-4ccd-9a9d-726a05bca0cf",
          "delegationAddress": "0x5a6406c9710f588ca733360bfa8033d0ef9ecdy5",
          "withdrawalAddress": "0x5a6406c9710f588ca733360bfa8033d0ef9ecd7c",
          "delegated": "3200000000000000000",
          "status": "PENDING_APPROVAL",
          "rewards": "0",
          "lockedRewards": "0",
          "pendingUnstake": "3200000000000000000",
          "pendingStake": "0",
          "apy": "8.3",
          "coin": "hteth",
          "walletId": "2032e75g451052000636831abd797bd3",
          "unstakingFee": "100000000000000",
          "unstakingMin": "0"
        }
      ],
      "transactions": [
        {
          "id": "d0355adbc-55b43-5tta-9a9d-726a05bca0ai",
          "stakingRequestId": "e055adbc-66a3-4ccd-9a9d-726a05bca0cf",
          "createdDate": "2022-01-10T14:32:28.000Z",
          "statusModifiedDate": "2022-01-10T14:32:28.000Z",
          "status": "PENDING_APPROVAL",
          "amount": "3200000000000000000",
          "transactionType": "delegate",
          "delegationId": "e0225adbc-66a3-4ccd-9a9d-726a05bca0cf",
          "buildParams": {
            "recipients": {
              "amount": "3200000000000000000",
              "address": "0xff50ed3d0ec03aC01D4C79aAd74928BFF48a7b2b",
              "data": "fds0934rnnio390nw"
            },
            "stakingParams": {
              "requestId": "e055adbc-66a3-4ccd-9a9d-726a05bca0cf",
              "amount": "3200000000000000000",
              "validator": "0x5a6406c9710f588ca733360bfa8033d0ef9ecdy5",
              "actionType": "delegate"
            },
            "gasPrice": "1000000000000000",
            "gasLimit": "3000000000000000"
          }
        }
      ],
      "amount": "6400000000000000000",
      "gasPrice": "1000000000000000"
    }
  ]
}
```

## 3. Approve Request (Optional)

If you have a policy that requires approval, you must approve the staking request before signing and broadcasting.

> 📘 **Note**
>
> If you configure an approval requirement for staking requests, you can't approve your own transactions - another admin must approve them.

>Endpoint: [Update Pending Approval](/reference/v2approvalupdate)

```shell cURL
export APPROVAL_ID="<APPROVAL_ID>"
export ACCESS_TOKEN="<YOUR_ACCESS_TOKEN>"
export OTP="<YOUR_OTP>"

curl -X PUT \
  https://app.bitgo-test.com/api/v2/pendingApprovals/$APPROVAL_ID \
  -H 'Content-Type: application/json' \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -d '{
    "state": "approved",
    "otp": "'"$OTP"'"
  }'
```
```js JavaScript
const baseCoin = this.bitgoSDK.coin(initialPendingApproval.coin);
const pendingApproval = await baseCoin.pendingApprovals().get({ id: initialPendingApproval.id });
const result = await pendingApproval.approve(params);
```

### Step Result

```json JSON
{
  "id": "e055adbc-66a3-4ccd-9a9d-726a05bca0cf",
  "coin": "hteth",
  "wallet": "2032e75g451052000636831abd797bd3",
  "enterprise": "1032e75c451052000436831deb797af1",
  "creator": "62ab90e06dfda30007974f0a52a12995",
  "createDate": "2022-01-10T14:32:28Z",
  "info": {
    "type": "transactionRequest",
    "transactionRequest": {
      "requestedAmount": "3200000000000000000",
      "fee": 20451,
      "sourceWallet": "2032e75g451052000636831abd797bd3",
      "policyUniqueId": "654ec786c07fe8dc0dcfe03f",
      "recipients": [
        {
          "address": "0x5a6406c9710f588ca733360bfa8033d0ef9ecdy5",
          "amount": "3200000000000000000",
          "_id": "65529448bd87efe59c3b0158"
        }
      ],
      "coinSpecific": {}
    }
  },
  "state": "approved",
  "scope": "wallet",
  "userIds": [
    "62ab90e06dfda30007974f0a52a12995",
    "621d08a634ad8a0007fcddffd7c429cc"
  ],
  "approvalsRequired": 1
}
```

## Next

BitGo signs the transaction and broadcasts it to the blockchain. You can view the completed staking request in BitGo or on a blockchain explorer.

</Tab>
<Tab title="Go Account">

For Go Account staking, you can use the BitGo JavaScript SDK to build, sign, and send the staking request, all in one call. However, if your use case needs more control and granularity, BitGo provides additional REST endpoints for more granular transactions, enabling you to manually construct each step.

<Tabs>
<Tab title="Simple">

## 1. Build, Sign, and Send Staking Request

Using the JavaScript SDK, you can build, sign, and send the staking request to BitGo all in one call.

```js JavaScript
const goStakingWallet = wallet.toGoStakingWallet();
const goStakingRequest = await goStakingWallet.stake({
  amount: '<AMOUNT_IN_BASE_UNITS>',
  walletPassphrase: '<PASSPHRASE>',
});
```

### Step Result

If your staking request doesn't require approval, BitGo applies the final signature using the BitGo key and broadcasts the transaction to the blockchain, transferring assets on-chain from your Go Account to the validator. If you [Create Policy Rules](/docs/wallets-whitelists-create) to require approvals, the staking request remains in a `PENDING_APPROVAL` status until an admin approves it.

```json JSON
{
  "id": "5bdeed2f-a173-4ca1-936b-a36399af8152",
  "type": "STAKE",
  "coin": "tsol",
  "status": "NEW",
  "goSpecificStatus": "NEW",
  "statusModifiedDate": "2025-07-25T20:30:57.046379144Z",
  "createdDate": "2025-07-25T20:30:57.046365Z",
  "amount": 1000000,
  "frontTransferSendRequest": {
    "halfSigned": {
      "payload": "{\"coin\":\"ofctsol\",\"recipients\":[{\"address\":\"BpkMFStkryPDkVYqTbEGLqWD3FLoPLCwTV4sdN1XKBPF\",\"amount\":\"1000000\"}],\"fromAccount\":\"62182dc6685f820007002502234b4dfc\",\"nonce\":\"8d819cce-a7e1-4e24-a29d-22f4b003130f\",\"timestamp\":\"2025-07-25T20:26:52.574Z\",\"feeString\":\"0\",\"shortCircuitBlockchainTransfer\":false,\"isIntraJXTransfer\":false}",
      "signature": "1f8e22206d9c95cff29154679f9d0b03bbb33e38b1f801090d0fb4f2e9464b969c263497689af974d13915dc72e00ffb3dfdac05c312ba9711e77014ffe2431c75"
    }
  }
}
```

## 2. Approve Request (Optional)

If you have a policy that requires approval, you must approve the staking request before BitGo adds the final signature with the BitGo key.

> 📘 **Note**
>
> If you configure an approval requirement for staking requests, you can't approve your own transactions - another admin must approve them.

>Endpoint: [Update Pending Approval](/reference/v2approvalupdate)

```shell cURL
export APPROVAL_ID="<APPROVAL_ID>"
export ACCESS_TOKEN="<YOUR_ACCESS_TOKEN>"
export OTP="<YOUR_OTP>"

curl -X PUT \
  https://app.bitgo-test.com/api/v2/pendingApprovals/$APPROVAL_ID \
  -H 'Content-Type: application/json' \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -d '{
    "state": "approved",
    "otp": "'"$OTP"'"
  }'
```
```js JavaScript
const baseCoin = this.bitgoSDK.coin(initialPendingApproval.coin);
const pendingApproval = await baseCoin.pendingApprovals().get({ id: initialPendingApproval.id });
const result = await pendingApproval.approve(params);
```

### Step Result

```json JSON
{
    "id": "e055adbc-66a3-4ccd-9a9d-726a05bca0cf",
    "coin": "hteth",
    "wallet": "2032e75g451052000636831abd797bd3",
    "enterprise": "1032e75c451052000436831deb797af1",
    "creator": "62ab90e06dfda30007974f0a52a12995",
    "createDate": "2022-01-10T14:32:28Z",
    "info": {
        "type": "transactionRequest",
        "transactionRequest": {
            "requestedAmount": "3200000000000000000",
            "fee": 20451,
            "sourceWallet": "2032e75g451052000636831abd797bd3",
            "policyUniqueId": "654ec786c07fe8dc0dcfe03f",
            "recipients": [
                {
                    "address": "0x5a6406c9710f588ca733360bfa8033d0ef9ecdy5",
                    "amount": "3200000000000000000",
                    "_id": "65529448bd87efe59c3b0158"
                }
            ],
            "coinSpecific": {}
        }
    },
    "state": "approved",
    "scope": "wallet",
    "userIds": [
        "62ab90e06dfda30007974f0a52a12995",
        "621d08a634ad8a0007fcddffd7c429cc"
    ],
    "approvalsRequired": 1,
    "singleRunResults": [
        {
            "ruleId": "Custody Enterprise Transaction ID Verification",
            "triggered": false,
            "_id": "65529448bd87efe59c3b0157"
        }
    ],
    "resolvers": [
        {
            "user": "621d08a634ad8a0007fcddffd7c429cc",
            "date": "2022-01-11T13:30:14Z",
            "resolutionType": "pending"
        }
    ]
}
```

</Tab>
<Tab title="Manual">

## 1. Create Staking Request

Create a staking request by specifying the staking details and sending them to BitGo.

>Endpoint: [Generate staking request for Go Account](/reference/v1gostakingrequestpreview)

```shell cURL
export COIN="<ASSET_ID>"
export GO_ACCOUNT_ID="<YOUR_GO_ACCOUNT_ID>"
export ACCESS_TOKEN="<YOUR_ACCESS_TOKEN>"
export AMOUNT="<AMOUNT_IN_BASE_UNITS>"

curl -X POST \
  https://app.bitgo-test.com/api/go-staking/v1/$COIN/accounts/$GO_ACCOUNT_ID/requests/preview \
  -H 'Content-Type: application/json' \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -d '{
    "amount": "'"$AMOUNT"'"
  }'
```
```js JavaScript
const goStakingWallet = wallet.toGoStakingWallet();
const goStakingRequest = await goStakingWallet.previewStake({
  amount: '<AMOUNT_IN_BASE_UNITS>'
});
```

### Step Result

BitGo uses the data you pass to build an unsigned staking request. The following example is the response when previewing a staking request for 0.01 TSOL.

```json JSON
{
  "payload": "{\"coin\":\"ofctsol\",\"recipients\":[{\"address\":\"BpkMFStkryPDkVYqTbEGLqWD3FLoPLCwTV4sdN1XKBPF\",\"amount\":\"1000000\"}],\"fromAccount\":\"62182dc6685f820007002502234b4dfc\",\"nonce\":\"8d819cce-a7e1-4e24-a29d-22f4b003130f\",\"timestamp\":\"2025-07-25T20:26:52.574Z\",\"feeString\":\"0\",\"shortCircuitBlockchainTransfer\":false,\"isIntraJXTransfer\":false}",
  "feeInfo": {
    "feeString": "0"
  },
  "coin": "ofc",
  "token": "ofctsol"
}
```

## 2. Sign Staking Request

Use the BitGo JavaScript SDK to sign the staking-request payload that you received in the previous step.

```js JavaScript
const halfSignedTransaction = (await this.wallet.prebuildAndSignTransaction({
    walletPassphrase: '<WALLET_PASSPHRASE>',
    prebuildTx: {
        payload: '<PAYLOAD_OBJECT>',
    }
}));
```

## 3. Send Staking Request

Send the half-signed staking request to BitGo for final signing with the BitGo key.

>Endpoint: [Finalize staking request for Go Account](/reference/v1gostakingrequestfinalize)

```shell cURL
export COIN="<ASSET_ID>"
export GO_ACCOUNT_ID="<YOUR_GO_ACCOUNT_ID>"
export ACCESS_TOKEN="<YOUR_ACCESS_TOKEN>"
export AMOUNT="<AMOUNT_IN_BASE_UNITS>"
export HALF_SIGNED_PAYLOAD="<HALF_SIGNED_PAYLOAD>"

curl -X POST \
  https://app.bitgo-test.com/api/go-staking/v1/$COIN/accounts/$GO_ACCOUNT_ID/requests/finalize \
  -H 'Content-Type: application/json' \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -d '{
    "type": "STAKE",
    "amount": "'"$AMOUNT"'",
    "frontTransferSendRequest": {
      "halfSigned": "'"$HALF_SIGNED_PAYLOAD"'"
    }
  }'
```
```js JavaScript
const goStakingWallet = wallet.toGoStakingWallet();
const goStakingRequest = await goStakingWallet.finalizeStake({
  amount: '<AMOUNT_IN_BASE_UNITS>',
  frontTransferSendRequest: {
      halfSigned: {
        payload: '<HALF_SIGNED_PAYLOAD>'
      }
  }
});
```

### Step Result

If your staking request doesn't require approval, BitGo applies the final signature using the BitGo key and broadcasts the transaction to the blockchain, transferring assets on-chain from your Go Account to the validator. If you [Create Policy Rules](/docs/wallets-whitelists-create) to require approvals, the staking request remains in a `PENDING_APPROVAL` status until an admin approves it.

```json JSON
{
  "id": "5bdeed2f-a173-4ca1-936b-a36399af8152",
  "type": "STAKE",
  "coin": "tsol",
  "status": "NEW",
  "goSpecificStatus": "NEW",
  "statusModifiedDate": "2025-07-25T20:30:57.046379144Z",
  "createdDate": "2025-07-25T20:30:57.046365Z",
  "amount": 1000000,
  "frontTransferSendRequest": {
    "halfSigned": {
      "payload": "{\"coin\":\"ofctsol\",\"recipients\":[{\"address\":\"BpkMFStkryPDkVYqTbEGLqWD3FLoPLCwTV4sdN1XKBPF\",\"amount\":\"1000000\"}],\"fromAccount\":\"62182dc6685f820007002502234b4dfc\",\"nonce\":\"8d819cce-a7e1-4e24-a29d-22f4b003130f\",\"timestamp\":\"2025-07-25T20:26:52.574Z\",\"feeString\":\"0\",\"shortCircuitBlockchainTransfer\":false,\"isIntraJXTransfer\":false}",
      "signature": "1f8e22206d9c95cff29154679f9d0b03bbb33e38b1f801090d0fb4f2e9464b969c263497689af974d13915dc72e00ffb3dfdac05c312ba9711e77014ffe2431c75"
    }
  }
}
```

## 4. Approve Request (Optional)

If you have a policy that requires approval, you must approve the staking request before BitGo adds the final signature with the BitGo key.

> 📘 **Note**
>
> If you configure an approval requirement for staking requests, you can't approve your own transactions - another admin must approve them.

>Endpoint: [Update Pending Approval](/reference/v2approvalupdate)

```shell cURL
export APPROVAL_ID="<APPROVAL_ID>"
export ACCESS_TOKEN="<YOUR_ACCESS_TOKEN>"
export OTP="<YOUR_OTP>"

curl -X PUT \
  https://app.bitgo-test.com/api/v2/pendingApprovals/$APPROVAL_ID \
  -H 'Content-Type: application/json' \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -d '{
    "state": "approved",
    "otp": "'"$OTP"'"
  }'
```
```js JavaScript
const baseCoin = this.bitgoSDK.coin(initialPendingApproval.coin);
const pendingApproval = await baseCoin.pendingApprovals().get({ id: initialPendingApproval.id });
const result = await pendingApproval.approve(params);
```

### Step Result

```json JSON
{
    "id": "e055adbc-66a3-4ccd-9a9d-726a05bca0cf",
    "coin": "hteth",
    "wallet": "2032e75g451052000636831abd797bd3",
    "enterprise": "1032e75c451052000436831deb797af1",
    "creator": "62ab90e06dfda30007974f0a52a12995",
    "createDate": "2022-01-10T14:32:28Z",
    "info": {
        "type": "transactionRequest",
        "transactionRequest": {
            "requestedAmount": "3200000000000000000",
            "fee": 20451,
            "sourceWallet": "2032e75g451052000636831abd797bd3",
            "policyUniqueId": "654ec786c07fe8dc0dcfe03f",
            "recipients": [
                {
                    "address": "0x5a6406c9710f588ca733360bfa8033d0ef9ecdy5",
                    "amount": "3200000000000000000",
                    "_id": "65529448bd87efe59c3b0158"
                }
            ],
            "coinSpecific": {}
        }
    },
    "state": "approved",
    "scope": "wallet",
    "userIds": [
        "62ab90e06dfda30007974f0a52a12995",
        "621d08a634ad8a0007fcddffd7c429cc"
    ],
    "approvalsRequired": 1,
    "singleRunResults": [
        {
            "ruleId": "Custody Enterprise Transaction ID Verification",
            "triggered": false,
            "_id": "65529448bd87efe59c3b0157"
        }
    ],
    "resolvers": [
        {
            "user": "621d08a634ad8a0007fcddffd7c429cc",
            "date": "2022-01-11T13:30:14Z",
            "resolutionType": "pending"
        }
    ]
}
```

</Tab>
</Tabs>

## Next

You can view all staking requests associated with your Go Account.

>Endpoint: [List staking requests by asset for Go Account](/reference/v1gostakingrequestlistbycoinandaccount)

```shell cURL
export COIN="<ASSET_ID>"
export GO_ACCOUNT_ID="<YOUR_GO_ACCOUNT_ID>"
export ACCESS_TOKEN="<YOUR_ACCESS_TOKEN>"

curl -X GET \
  https://app.bitgo-test.com/api/go-staking/v1/$COIN/accounts/$GO_ACCOUNT_ID/requests \
  -H 'Content-Type: application/json' \
  -H "Authorization: Bearer $ACCESS_TOKEN"
```
```js JavaScript
const goStakingWallet = wallet.toGoStakingWallet();
const goStakingRequest = goStakingWallet.getGoStakingRequests();
```

### Step Result

```json JSON
{
  "requests": [
    {
      "id": "cabc544c-6441-4c97-a809-e2fc77558748",
      "status": "CONFIRMED",
      "goAccountId": "68f93cd87913feb58b5020a0dc481175",
      "amount": 3000000,
      "createdDate": "2025-10-22T21:34:01.644063Z",
      "properties": {
        "amount": 3000000,
        "frontTransferSendRequest": {
          "halfSigned": {
            "payload": "{\"coin\":\"ofctsol\",\"recipients\":[{\"address\":\"6DBzhSbjWFM2r2mqNTFYC1HHBuiS6vsAYSWEHBq4UbMw\",\"amount\":\"3000000\"}],\"fromAccount\":\"68f93cd87913feb58b5020a0dc481175\",\"nonce\":\"fb03699e-55a7-41b2-b19e-7f144ec3560f\",\"timestamp\":\"2025-10-22T20:34:39.511Z\",\"feeString\":\"0\",\"shortCircuitBlockchainTransfer\":false,\"isIntraJXTransfer\":false}",
            "signature": "20b68bf9465f81b67952deb9259b18c6097c5daf7117730f9afc291744454c64011c64acce1b20cde23437f7ae585c51f194aacf0ea3e7a2478b467aef057120c0"
          },
          "sequenceId": "fb03699e-55a7-41b2-b19e-7f144ec3560f",
          "goStakingRequestId": "cabc544c-6441-4c97-a809-e2fc77558748",
          "stakingParams": {
            "requestId": "cabc544c-6441-4c97-a809-e2fc77558748",
            "actionType": "delegate"
          }
        }
      }
    }
  ],
  "page": 1,
  "totalPages": 1,
  "totalElements": 1
}
```

</Tab>
<Tab title="Self-Custody Wallet">

## 1. Create Staking Request

Create a staking request by specifying the staking details and sending them to BitGo. The following example shows the minimum required parameters for staking ether.

>Endpoint: [Create staking request](/reference/v1stakingrequestcreate)

```shell cURL
export COIN="<ASSET_ID>"
export WALLET_ID="<YOUR_WALLET_ID>"
export ACCESS_TOKEN="<YOUR_ACCESS_TOKEN>"
export AMOUNT="<AMOUNT_IN_BASE_UNITS>"

curl -X POST \
  https://app.bitgo-test.com/api/staking/v1/$COIN/wallets/$WALLET_ID/requests \
  -H 'Content-Type: application/json' \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -d '{
    "amount": "'"$AMOUNT"'",
    "type": "STAKE"
  }'
```
```js JavaScript
const stakingWallet = wallet.toStakingWallet();
const stakingRequest = await stakingWallet.stake({
  amount: '<AMOUNT_IN_BASE_UNITS>'
});
```

### Step Result

BitGo uses the data you pass to build an unsigned staking request. The following example builds a staking request for 64 HTETH.

```json JSON
{
  "id": "e055adbc-66a3-4ccd-9a9d-726a05bca0cf",
  "clientId": "e055adbc-66a3-4ccd-9a9d-726a05bca0cf",
  "requestUserId": "6092e75c451052000636831deb797bd1",
  "enterpriseId": "1032e75c451052000436831deb797af1",
  "walletId": "2032e75g451052000636831abd797bd3",
  "walletType": "hot",
  "type": "STAKE",
  "coin": "hteth",
  "createdDate": "2022-01-10T14:32:28Z",
  "statusModifiedDate": "2022-01-10T14:32:28Z",
  "status": "NEW",
  "withdrawalAddress": "0x5a6406c9710f588ca733360bfa8033d0ef9ecd7c",
  "amount": 6400000000000000000,
  "gasPrice": 1000000000000000
}
```

## 2. Get Request Status (Optional)

Validators must process your staking request before the request is ready for approval and signing. To get notified when staking requests are pending approval, you can [Create Webhooks](/docs/webhooks-overview). To get notified when staking requests are pending approval or signature, you can call the following:

>Endpoint: [List staking requests by enterprise](/reference/v1stakingtransactions)

```shell cURL
export ENTERPRISE_ID="<YOUR_ENTERPRISE_ID>"
export ACCESS_TOKEN="<YOUR_ACCESS_TOKEN>"
export WALLET_TYPE="<YOUR_WALLET_TYPE>"
export WALLET_ID="<YOUR_WALLET_ID>"

curl -X GET \
  https://app.bitgo-test.com/api/staking/v1/enterprises/$ENTERPRISE_ID/requests/transactions \
  -H 'Content-Type: application/json' \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -d '{
    "walletType": "'"$WALLET_TYPE"'",
    "walletId": "'"$WALLET_ID"'",
    "requestType": "STAKE",
    "requestStatus": "PENDING_APPROVAL"
  }'
```

### Step Result

```json JSON
{
  "page": 1,
  "totalPages": 1,
  "totalElements": 1,
  "requests": [
    {
      "id": "e055adbc-66a3-4ccd-9a9d-726a05bca0cf",
      "clientId": "f054adbc-26a3-4acd-8a9d-726a05bca0dr",
      "requestUserId": "6092e75c451052000636831deb797bd1",
      "enterpriseId": "1032e75c451052000436831deb797af1",
      "walletId": "2032e75g451052000636831abd797bd3",
      "walletType": "hot",
      "type": "STAKE",
      "coin": "hteth",
      "createdDate": "2022-01-10T14:32:28.000Z",
      "statusModifiedDate": "2022-01-10T14:32:28.000Z",
      "status": "NEW",
      "withdrawalAddress": "0x5a6406c9710f588ca733360bfa8033d0ef9ecd7c",
      "delegations": [
        {
          "id": "e0225adbc-66a3-4ccd-9a9d-726a05bca0cf",
          "delegationAddress": "0x5a6406c9710f588ca733360bfa8033d0ef9ecdy5",
          "withdrawalAddress": "0x5a6406c9710f588ca733360bfa8033d0ef9ecd7c",
          "delegated": "3200000000000000000",
          "status": "PENDING_APPROVAL",
          "rewards": "0",
          "lockedRewards": "0",
          "pendingUnstake": "3200000000000000000",
          "pendingStake": "0",
          "apy": "8.3",
          "coin": "hteth",
          "walletId": "2032e75g451052000636831abd797bd3",
          "unstakingFee": "100000000000000",
          "unstakingMin": "0"
        }
      ],
      "transactions": [
        {
          "id": "d0355adbc-55b43-5tta-9a9d-726a05bca0ai",
          "stakingRequestId": "e055adbc-66a3-4ccd-9a9d-726a05bca0cf",
          "createdDate": "2022-01-10T14:32:28.000Z",
          "statusModifiedDate": "2022-01-10T14:32:28.000Z",
          "status": "PENDING_APPROVAL",
          "amount": "3200000000000000000",
          "transactionType": "delegate",
          "delegationId": "e0225adbc-66a3-4ccd-9a9d-726a05bca0cf",
          "buildParams": {
            "recipients": {
              "amount": "3200000000000000000",
              "address": "0xff50ed3d0ec03aC01D4C79aAd74928BFF48a7b2b",
              "data": "fds0934rnnio390nw"
            },
            "stakingParams": {
              "requestId": "e055adbc-66a3-4ccd-9a9d-726a05bca0cf",
              "amount": "3200000000000000000",
              "validator": "0x5a6406c9710f588ca733360bfa8033d0ef9ecdy5",
              "actionType": "delegate"
            },
            "gasPrice": "1000000000000000",
            "gasLimit": "3000000000000000"
          }
        }
      ],
      "amount": "6400000000000000000",
      "gasPrice": "1000000000000000"
    }
  ]
}
```

## 3. Approve Request (Optional)

If you have a policy that requires approval, you must approve the staking request before signing and broadcasting.

> 📘 **Note**
>
> If you configure an approval requirement for staking requests, you can't approve your own transactions - another admin must approve them.

>Endpoint: [Update Pending Approval](/reference/v2approvalupdate)

```shell cURL
export APPROVAL_ID="<APPROVAL_ID>"
export ACCESS_TOKEN="<YOUR_ACCESS_TOKEN>"
export OTP="<YOUR_OTP>"

curl -X PUT \
  https://app.bitgo-test.com/api/v2/pendingApprovals/$APPROVAL_ID \
  -H 'Content-Type: application/json' \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -d '{
    "state": "approved",
    "otp": "'"$OTP"'"
  }'
```
```js JavaScript
const baseCoin = this.bitgoSDK.coin(initialPendingApproval.coin);
const pendingApproval = await baseCoin.pendingApprovals().get({ id: initialPendingApproval.id });
const result = await pendingApproval.approve(params);
```

### Step Result

```json JSON
{
  "id": "e055adbc-66a3-4ccd-9a9d-726a05bca0cf",
  "coin": "hteth",
  "wallet": "2032e75g451052000636831abd797bd3",
  "enterprise": "1032e75c451052000436831deb797af1",
  "creator": "62ab90e06dfda30007974f0a52a12995",
  "createDate": "2022-01-10T14:32:28Z",
  "info": {
    "type": "transactionRequest",
    "transactionRequest": {
      "requestedAmount": "3200000000000000000",
      "fee": 20451,
      "sourceWallet": "2032e75g451052000636831abd797bd3",
      "policyUniqueId": "654ec786c07fe8dc0dcfe03f",
      "recipients": [
        {
          "address": "0x5a6406c9710f588ca733360bfa8033d0ef9ecdy5",
          "amount": "3200000000000000000",
          "_id": "65529448bd87efe59c3b0158"
        }
      ],
      "coinSpecific": {}
    }
  },
  "state": "approved",
  "scope": "wallet",
  "userIds": [
    "62ab90e06dfda30007974f0a52a12995",
    "621d08a634ad8a0007fcddffd7c429cc"
  ],
  "approvalsRequired": 1
}
```

## 4. Sign and Send Request

```js JavaScript
const transactions = await stakingWallet.getTransactionsReadyToSign(stakingRequest.id);
if (!transactions.allSigningComplete && transactions.transactions.length > 0) {
  transactions.transactions.forEach((transaction: StakingTransaction) => {
    await stakingWallet.buildSignAndSend({ walletPassphrase: 'walletPassphrase' }, transaction);
  });
}
```

### Step Result

The staking request is half-signed and sent to BitGo for final signing and broadcasting to the blockchain.

```json JSON
{
  "id": "e055adbc-66a3-4ccd-9a9d-726a05bca0cf",
  "clientId": "f054adbc-26a3-4acd-8a9d-726a05bca0dr",
  "requestUserId": "6092e75c451052000636831deb797bd1",
  "enterpriseId": "1032e75c451052000436831deb797af1",
  "walletId": "2032e75g451052000636831abd797bd3",
  "walletType": "hot",
  "type": "STAKE",
  "coin": "hteth",
  "createdDate": "2022-01-10T14:32:28Z",
  "statusModifiedDate": "2022-01-10T14:32:28Z",
  "status": "NEW",
  "withdrawalAddress": "0x5a6406c9710f588ca733360bfa8033d0ef9ecd7c",
  "delegations": [
    {
      "id": "e0225adbc-66a3-4ccd-9a9d-726a05bca0cf",
      "delegationAddress": "0x5a6406c9710f588ca733360bfa8033d0ef9ecdy5",
      "delegated": 3200000000000000000,
      "status": "PENDING",
      "rewards": 0,
      "pendingUnstake": 3200000000000000000,
      "apy": 8.3,
      "coin": "hteth",
      "walletId": "2032e75g451052000636831abd797bd3",
      "unstakingFee": 100000000000000,
      "unstakingMin": 0
    }
  ],
  "transactions": [
    {
      "stakingRequestId": "e055adbc-66a3-4ccd-9a9d-726a05bca0cf",
      "createdDate": "2022-01-10T14:32:28Z",
      "statusModifiedDate": "2022-01-10T14:32:28Z",
      "status": "PENDING",
      "amount": 3200000000000000000,
      "transactionType": "delegate",
      "delegationId": "e0225adbc-66a3-4ccd-9a9d-726a05bca0cf",
      "buildParams": {
        "recipients": {
          "amount": 3200000000000000000,
          "address": "0xff50ed3d0ec03aC01D4C79aAd74928BFF48a7b2b",
          "data": "fds0934rnnio390nw"
        },
        "stakingParams": {
          "requestId": "e055adbc-66a3-4ccd-9a9d-726a05bca0cf",
          "amount": 3200000000000000000,
          "validator": "0x5a6406c9710f588ca733360bfa8033d0ef9ecdy5",
          "actionType": "delegate"
        },
        "gasPrice": 1000000000000000,
        "gasLimit": 3000000000000000
      }
    }
  ],
  "amount": 6400000000000000000,
  "gasPrice": 1000000000000000
}
```

## Next

You can view the completed staking request in BitGo or on a blockchain explorer.

</Tab>
</Tabs>

## See Also

- [API Reference: List coins available for staking](/reference/v1stakingcoins)
- [API Reference: List staking requests by enterprise](/reference/v1stakingtransactions)
- [API Reference: Create staking request](/reference/v1stakingrequestcreate)
- [API Reference: Update Pending Approval](/reference/v2approvalupdate)
- [API Reference: View Rewards and Balances](/docs/stake-rewards-delegations)
- [API Reference: Finalize staking request for Go Account](/reference/v1gostakingrequestfinalize)
- [API Reference: Generate staking request for Go Account](/reference/v1gostakingrequestpreview)
- [API Reference: List staking requests by asset for Go Account](/reference/v1gostakingrequestlistbycoinandaccount)
- [Coins and Tokens](/coins)
- [Create Webhooks](/docs/webhooks-overview)
