Withdraw
Withdraw Overview
Overview
Withdrawal flows differ by wallet type, and can even differ between address type. Notably, BitGo uses different endpoints to construct and sign transactions, depending on the wallet type. Review the transaction flows below to determine which is best for your use case.
Note
You can only transact from custody wallets in the production environment. BitGo doesn't sign transactions from custody wallets in testnet due to the enhanced security protocols that are required. You can still create testnet custody wallets and initiate transactions, but these transactions remain in an unsigned state.
Manual or Simple
For self-custody wallets, you can use BitGo Express to build, sign, and send transactions, all in one call. However, if your use case needs more control and granularity, BitGo provides additional Express and REST endpoints for more granular transactions, enabling you to manually construct each step. See below for more details.
External-Signing Mode
For self-custody wallets using the manual flow, you can configure an additional instance of your Express server on an air-gapped machine, where you store all your private user keys and sign transactions. External signing is the most secure way to implement BitGo Express, because it enables signers with restricted access or network connectivity to sign transactions.
Note
ECDSA MPC wallets aren't currently compatible with external-signer mode.
Flows
The following shows the specific API calls required to withdraw for each wallet type. For a complete integration guide, including code samples, see the links in the Guides section below.
- Initiate - BitGo uses the data you pass in this call to build an unsigned transaction.
- Approve (Optional) - You can configure a wallet policy to require admin approval for all outgoing transactions, providing an extra layer of security. Transactions remain in a pending-approval status until final approval. Approving a transaction doesn't apply a signature.
- Sign - Conduct video verification with a BitGo operator. Once verified, BitGo does the following:
- Uploads the unsigned transaction to the BitGo Offline Vault Console (OVC).
- Uses the user key to sign the unsigned transaction in the OVC, becoming a half-signed transaction.
- Uses the BitGo key to sign the half-signed transaction in a hardware security module (HSM), creating a fully-signed transaction.
- Broadcast - Using a BitGo node, BitGo broadcasts the transaction to the network for confirmation.
- Request - BitGo uses the data you pass in this call to build an unsigned transaction.
- Approve - Admins must approve all outgoing transactions, providing an extra layer of security. Transactions remain in a pending-approval status until final approval. Approving a transaction doesn't apply a signature.
- Sign - Conduct video verification with a BitGo operator. Once verified, BitGo does the following:
- Uploads the unsigned transaction to the BitGo Offline Vault Console (OVC).
- Uses the user key to sign the unsigned transaction in the OVC, becoming a half-signed transaction.
- Uses the BitGo key to sign the half-signed transaction in a hardware security module (HSM), creating a fully-signed transaction.
- Broadcast - Using a BitGo node, BitGo broadcasts the transaction to the network for confirmation.
Go Accounts are a type of custody multisignature wallet, but they follow a unique transaction flow. To set up trading for your Go Account, see Trading Overview. The following is the manual transaction flow for withdrawing assets from your Go Account:
- Build - BitGo uses the information you pass in this call to build an unsigned transaction.
- Send - You send the unsigned transaction to BitGo to receive signing.
- Approve (Optional) - You can configure a wallet policy to require admin approval for all outgoing transactions, providing an extra layer of security. Transactions remain in a pending-approval status until final approval. Approving a transaction doesn't apply a signature.
- Authorize - Depending on your Go Account policies, you may need to conduct video verification with a BitGo operator. Once verified, or if verification isn't required, BitGo does the following:
- Uploads the unsigned transaction to the BitGo Offline Vault Console (OVC).
- Uses the user key to sign the unsigned transaction in the OVC, becoming a half-signed transaction.
- Uses the BitGo key to sign the half-signed transaction in a hardware security module (HSM), creating a fully-signed transaction.
- Broadcast - Using the BitGo key for the wallet, BitGo signs the half-signed transaction in a hardware security module (HSM), creating a fully-signed transaction. Using a BitGo node, BitGo broadcasts the transaction to the network for confirmation.
Go Accounts are a type of custody multisignature wallet, but they follow a unique transaction flow. To set up trading for your Go Account, see Trading Overview. The following is the Express flow for withdrawing assets from your Go Account:
- Send - You build and send an unsigned transaction to BitGo to receive signing. The SDK invokes the same endpoint as it does for a manual send transaction. However, Express integrations call a different endpoint.
- Send Transaction - Express
- Send Half-Signed Transaction - SDK
- Approve (Optional) - You can configure a wallet policy to require admin approval for all outgoing transactions, providing an extra layer of security. Transactions remain in a pending-approval status until final approval. Approving a transaction doesn't apply a signature. Once approved, you rebuild the transaction, getting the most current on-chain data, such as nonce and fees.
- Authorize - Depending on your Go Account policies, you may need to conduct video verification with a BitGo operator. Once verified, or if verification isn't required, BitGo does the following:
- Uploads the unsigned transaction to the BitGo Offline Vault Console (OVC).
- Uses the user key to sign the unsigned transaction in the OVC, becoming a half-signed transaction.
- Uses the BitGo key to sign the half-signed transaction in a hardware security module (HSM), creating a fully-signed transaction.
- Broadcast - Using the BitGo key for the wallet, BitGo signs the half-signed transaction in a hardware security module (HSM), creating a fully-signed transaction. Using a BitGo node, BitGo broadcasts the transaction to the network for confirmation.
- Build - BitGo uses the data you pass in this call to build an unsigned transaction.
- Sign Offline - Upload the unsigned transaction to the BitGo Offline Vault Console (OVC). Wallet co-signers login to the OVC and sign the transaction, resulting in a partially-signed transaction. Once all required wallet co-signers sign the transaction, it becomes a half-signed transaction.
- Send - You send the half-signed transaction to BitGo to receive the final signature.
- Approve (Optional) - You can configure a wallet policy to require admin approval for all outgoing transactions, providing an extra layer of security. Transactions remain in a pending-approval status until final approval. Approving a transaction doesn't apply a signature. Once approved, you rebuild and re-sign the transaction, getting the most current on-chain data, such as nonce and fees.
- Broadcast - Using the BitGo key for the wallet, BitGo signs the half-signed transaction in a hardware security module (HSM), creating a fully-signed transaction. Using a BitGo node, BitGo broadcasts the transaction to the network for confirmation.
- Build - BitGo uses the data you pass in this call to build an unsigned transaction.
- Sign - Wallet co-signers sign the transaction using their wallet passwords, resulting in a partially-signed transaction. Once all required wallet co-signers sign the transaction, it becomes a half-signed transaction. You can use either of the following two options for signing:
- Sign - Decrypt your private key and sign transactions using REST protocol in a network-connected environment.
- Sign Wallet Transaction - Decrypt your private key and sign transactions using external-signer mode in an air-gapped environment.
- Send - You send the half-signed transaction to BitGo to receive the final signature.
- Approve (Optional) - You can configure a wallet policy to require admin approval for all outgoing transactions, providing an extra layer of security. Transactions remain in a pending-approval status until final approval. Approving a transaction doesn't apply a signature. Once approved, you rebuild and re-sign the transaction, getting the most current on-chain data, such as nonce and fees.
- Broadcast - Using the BitGo key for the wallet, BitGo signs the half-signed transaction in a hardware security module (HSM), creating a fully-signed transaction. Using a BitGo node, BitGo broadcasts the transaction to the network for confirmation.
- Send - You build, sign, and send a half-signed transaction to BitGo to receive the final signature.
- Approve (Optional) - You can configure a wallet policy to require admin approval for all outgoing transactions, providing an extra layer of security. Transactions remain in a pending-approval status until final approval. Approving a transaction doesn't apply a signature. Once approved, you rebuild and re-sign the transaction, getting the most current on-chain data, such as nonce and fees.
- Broadcast - Using the BitGo key for the wallet, BitGo signs the half-signed transaction in a hardware security module (HSM), creating a fully-signed transaction. Using a BitGo node, BitGo broadcasts the transaction to the network for confirmation.
- Request - BitGo uses the data you pass in this call to build an unsigned transaction.
- Approve (Optional) - You can configure a wallet policy to require admin approval for all outgoing transactions, providing an extra layer of security. Transactions remain in a pending-approval status until final approval. Approving a transaction doesn't apply a signature. Once approved, you rebuild and re-sign the transaction, getting the most current on-chain data, such as nonce and fees.
- Sign - Wallet co-signers and BitGo sign the transaction using signature shares - a collection of key shares made up of public shares and encrypted private shares that when combined, create a full signature. Once all required wallet co-signers sign the transaction, it becomes a half-signed transaction and is automatically sent to BitGo. You can use either of the following two options for signing:
- Sign MPC Transaction - Use Express to decrypt your private key shares and sign transactions. This route supports both REST protocol in a network-connected environment or external-signer mode in an air-gapped environment.
- Use the SDK to decrypt your private shares through signature sharing, an orchestrated process that involves the following 3 consecutive API calls:
- Create a Signature Share - You send the 1st key share to BitGo. This enables BitGo to make the 2nd key share and returns the transaction request ID that you use for the rest of the transaction process.
- Get Transaction Requests - You get the 2nd key share from BitGo. This enables you to make the 3rd key share.
- Create a Signature Share - You send the 3rd key share to BitGo. This enables BitGo to create the 4th, and final, key share, completing the signature share and becoming a half-signed transaction request.
- Broadcast - Using the BitGo key for the wallet, BitGo signs the half-signed transaction in a hardware security module (HSM), creating a fully-signed transaction. Using a BitGo node, BitGo broadcasts the transaction to the network for confirmation.
- Send - You build, sign, and send a half-signed transaction to BitGo to receive the final signature. Simple MPC transactions are possible only with the SDK, which invokes the following endpoints:
- Create a Signature Share - You send the 1st key share to BitGo. This enables BitGo to make the 2nd key share and returns the transaction request ID that you use for the rest of the transaction process.
- Get Transaction Requests - You get the 2nd key share from BitGo. This enables you to make the 3rd key share.
- Create a Signature Share - You send the 3rd key share to BitGo. This enables BitGo to create the 4th, and final, key share, completing the signature share and becoming a half-signed transaction request.
- Approve (Optional) - You can configure a wallet policy to require admin approval for all outgoing transactions, providing an extra layer of security. Transactions remain in a pending-approval status until final approval. Approving a transaction doesn't apply a signature. Once approved, you rebuild and re-sign the transaction, getting the most current on-chain data, such as nonce and fees.
- Broadcast - Using the BitGo key for the wallet, BitGo signs the half-signed transaction in a hardware security module (HSM), creating a fully-signed transaction. Using a BitGo node, BitGo broadcasts the transaction to the network for confirmation.
Guides
- Withdraw from Wallet - Custody Multisig
- Withdraw from Wallet - Custody MPC
- Withdraw from Wallet - Go Account (Manual)
- Withdraw from Wallet - Go Account (Simple)
- Withdraw from Wallet - BitGo Offline Vault Multisig
- Withdraw from Wallet - Self-Custody Multisig (Manual)
- Withdraw from Wallet - Self-Custody Multisig (Simple)
- Withdraw from Wallet - Self-Custody MPC (Manual)
- Withdraw from Wallet - Self-Custody MPC (Simple)