Withdraw - Go Account (Manual)
Build, authenticate, and send withdrawals with granular control. See the Guide.
-
This step is required only for withdrawing fiat from your Go Account to a BitGo-approved bank account. Crypto withdrawals skip this step.
-
Build the transaction by specifying transaction details and sending them to BitGo. BitGo constructs an unsigned transaction payload.
-
Use your Go Account passphrase to authenticate the transaction. Use BitGo Express in external-signing mode or the JavaScript SDK to ensure your passphrase isn't sent over the Internet.
-
Send the authenticated transaction to BitGo. If approval isn't required, BitGo processes the withdrawal. If you have policy rules, the transaction remains pending until approved.
-
If your withdrawal requires approval, another admin must approve it — you cannot approve your own transactions.
// 1. Get idHash (Optional)
export ENTERPRISE_ID="<ENTERPRISE_ID>"
export ACCESS_TOKEN="<YOUR_ACCESS_TOKEN>"
curl -X GET \
https://app.bitgo-test.com/api/v2/bankaccounts?enterpriseId=$ENTERPRISE_ID \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $ACCESS_TOKEN"
// 2. Build Transaction
export COIN="<OFC_ASSET_ID>"
export WALLET_ID="<YOUR_WALLET_ID>"
export AMOUNT="<AMOUNT_IN_BASE_UNITS>"
export ADDRESS="<DESTINATION_ADDRESS_OR_ID_HASH>"
curl -X POST \
https://app.bitgo-test.com/api/v2/$COIN/wallet/$WALLET_ID/tx/build \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-d '{
"recipients": [
{
"amount": "'"$AMOUNT"'",
"address": "'"$ADDRESS"'"
}
]
}'
// 3. Authenticate Transaction
export BITGO_EXPRESS_HOST="<YOUR_LOCAL_HOST>"
export WALLET_PASSPHRASE="<YOUR_GO_ACCOUNT_PASSPHRASE>"
curl -X POST \
http://$BITGO_EXPRESS_HOST/api/v2/ofc/signPayload \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-d '{
"walletId": "'"$WALLET_ID"'",
"walletPassphrase": "'"$WALLET_PASSPHRASE"'",
"payload": "<PAYLOAD_FROM_BUILD_STEP>"
}'
// 4. Send Transaction
curl -X POST \
https://app.bitgo-test.com/api/v2/$COIN/wallet/$WALLET_ID/tx/send \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-d '{
"halfSigned": {
"payload": "<PAYLOAD>",
"signature": "<SIGNATURE_FROM_AUTH_STEP>"
}
}'
// 5. Approve Transaction (Optional)
export APPROVAL_ID="<APPROVAL_ID>"
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"'"
}'
// 1. Get idHash (Optional)
// Use REST API to list bank accounts for fiat withdrawals
// 2. Build Transaction
let params = {
recipients: [
{
amount: 1000,
address: '2NFfxvXpAWjKng7enFougtvtxxCJ2hQEMo4',
},
],
};
wallet.prebuildTransaction(params).then(function (transaction) {
console.dir(transaction);
});
// 3. Authenticate Transaction
const wallet = await bitgo.coin('ofc').wallets().get({ id: goAccountId });
const walletPassphrase = "<YOUR_WALLET_PASSPHRASE>";
const tradingAccount = wallet.toTradingAccount();
const signature = await tradingAccount.signPayload({
payload: stringifiedPayload,
walletPassphrase,
});
// 4. Send Transaction
// Use the signature from step 3 with the tx/send endpoint
// 5. Approve Transaction (Optional)
const baseCoin = bitgo.coin(initialPendingApproval.coin);
const pendingApproval = await baseCoin.pendingApprovals().get({ id: initialPendingApproval.id });
const result = await pendingApproval.approve(params);
// 2. Build Transaction Response
{
"payload": "{\"coin\":\"ofctbtc4\",\"recipients\":[{\"address\":\"tb1q...\",\"amount\":\"1\"}],\"fromAccount\":\"62c5b1de8a0c5200071c9a603bdbadc5\",\"nonce\":\"d8e5d930-f827-42b1-ad85-40544dad1be6\",\"timestamp\":\"2025-06-25T17:45:56.394Z\",\"feeString\":\"0\"}",
"feeInfo": { "feeString": "0" },
"coin": "ofc",
"token": "ofctbtc4"
}
// 3. Authenticate Transaction Response
{
"coin": "ofctbtc4",
"payload": "{\"coin\":\"ofctbtc4\",...}",
"signature": "20dda1e9558adb297f69020f94cbf4955fabec73478506347dbb5ac8e73b506fc908bbc48bde75b339b99f5de808ed34b2017055c9df198fd1f8b4e524899f9583"
}
// 4. Send Transaction Response
{
"transfer": {
"id": "613be001f3de560006842d52251d5d49",
"coin": "ofctusd",
"wallet": "603ca8c01b83cb000656311787dab4cd",
"type": "send",
"state": "signed"
},
"status": "signed"
}
// 5. Approve Transaction Response
{
"id": "655686880765186f0b3e9e88e1bdd0f4",
"state": "approved"
}