Accelerate Transaction - Account-Based - cURL
Accelerate a stuck account-based transaction by rebroadcasting with a higher fee using the REST API. Includes flows for Custody MPC, Custody Multisig, Self-Custody MPC, and Self-Custody Multisig wallets. See the Guide.
-
Accelerate a stuck account-based transaction by rebroadcasting with the same nonce but a higher fee. Ethereum and other EVM blockchains allow only one transaction per nonce from a single address, so you can replace a stuck transaction by submitting a new one with higher gas fees.
The endpoint depends on your wallet type:
- Custody MPC and Self-Custody MPC: Use Create Transaction Request with
intentType: "acceleration"and higher values formaxFeePerGasandmaxPriorityFeePerGas. - Custody Multisig: Use Initiate Transaction with
type: "acceleration". Pass the exact recipients array from the original transaction. - Self-Custody Multisig: Use Build Transaction with
type: "acceleration". Pass the exact recipients array from the original transaction.
Prerequisites: Complete Get Started and initiate a withdrawal (see Withdraw Overview).
- Custody MPC and Self-Custody MPC: Use Create Transaction Request with
// 1. Build Acceleration Transaction
export WALLET_ID="<WALLET_ID>"
export ACCESS_TOKEN="<YOUR_ACCESS_TOKEN>"
export MAX_FEE_PER_GAS="<HIGHER_MAX_FEE_PER_GAS>"
export MAX_PRIORITY_FEE_PER_GASE="<HIGHER_MAX_PRIORITY_FEE_PER_GAS>"
export NONCE="<NONCE_OF_STUCK_TRANSACTION>"
curl -X POST \
https://app.bitgo-test.com/api/v2/wallet/$WALLET_ID/txrequests \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-d '{
"idempotencyKey": "string",
"intent": {
"feeOptions": {
"gasLimit": 0,
"maxFeePerGas": "'"$MAX_FEE_PER_GAS"'",
"maxPriorityFeePerGas": "'"$MAX_PRIORITY_FEE_PER_GASE"'"
},
"intentType": "acceleration",
"txid": "string",
"sequenceId": "string",
"nonce": "'"$NONCE"'",
"hopParams": {
"gasPriceMax": 0,
"paymentId": "string",
"userReqSig": "string"
},
"receiveAddress": "string",
"senderAddressIndex": 0
},
"videoApprovers": [
"585951a5df8380e0e3063e9f",
"585951a5df8380e0e304a553"
],
"apiVersion": "lite",
"preview": false
}'
// 1. Build Acceleration Transaction
export COIN="<ASSET_ID>"
export WALLET_ID="<YOUR_WALLET_ID>"
export ACCESS_TOKEN="<YOUR_ACCESS_TOKEN>"
export NONCE="<NONCE_OF_STUCK_TRANSACTION>"
export MAX_FEE_PER_GAS="<HIGHER_MAX_FEE_PER_GAS>"
export MAX_PRIORITY_FEE_PER_GASE="<HIGHER_MAX_PRIORITY_FEE_PER_GAS>"
curl -X POST \
https://app.bitgo-test.com/api/v2/$COIN/wallet/$WALLET_ID/tx/initiate \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-d '{
"type": "acceleration",
"nonce": "'"$NONCE"'",
"eip1559": {
"maxFeePerGas": "'"$MAX_FEE_PER_GAS"'",
"maxPriorityFeePerGas": "'"$MAX_PRIORITY_FEE_PER_GASE"'"
},
"recipients": [...] # Use the exact recipients array from the original transaction
}'
// 1. Build Acceleration Transaction
export WALLET_ID="<WALLET_ID>"
export ACCESS_TOKEN="<YOUR_ACCESS_TOKEN>"
export MAX_FEE_PER_GAS="<HIGHER_MAX_FEE_PER_GAS>"
export MAX_PRIORITY_FEE_PER_GASE="<HIGHER_MAX_PRIORITY_FEE_PER_GAS>"
export NONCE="<NONCE_OF_STUCK_TRANSACTION>"
curl -X POST \
https://app.bitgo-test.com/api/v2/wallet/$WALLET_ID/txrequests \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-d '{
"idempotencyKey": "string",
"intent": {
"feeOptions": {
"gasLimit": 0,
"maxFeePerGas": "'"$MAX_FEE_PER_GAS"'",
"maxPriorityFeePerGas": "'"$MAX_PRIORITY_FEE_PER_GASE"'"
},
"intentType": "acceleration",
"txid": "string",
"sequenceId": "string",
"nonce": "'"$NONCE"'",
"hopParams": {
"gasPriceMax": 0,
"paymentId": "string",
"userReqSig": "string"
},
"receiveAddress": "string",
"senderAddressIndex": 0
},
"videoApprovers": [
"585951a5df8380e0e3063e9f",
"585951a5df8380e0e304a553"
],
"apiVersion": "lite",
"preview": false
}'
// 1. Build Acceleration Transaction
export COIN="<ASSET_ID>"
export WALLET_ID="<WALLET_ID>"
export ACCESS_TOKEN="<YOUR_ACCESS_TOKEN>"
export NONCE="<NONCE_OF_STUCK_TRANSACTION>"
export MAX_FEE_PER_GAS="<HIGHER_MAX_FEE_PER_GAS>"
export MAX_PRIORITY_FEE_PER_GASE="<HIGHER_MAX_PRIORITY_FEE_PER_GAS>"
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 '{
"type": "acceleration",
"nonce": "'"$NONCE"'",
"eip1559": {
"maxPriorityFeePerGas": "'"$MAX_FEE_PER_GAS"'",
"maxPriorityFeePerGas": "'"$MAX_PRIORITY_FEE_PER_GASE"'"
},
"recipients": [...], # Use the exact recipients array from the original transaction
}'
// Build Acceleration Transaction Response (applies to all wallet types)
{
"txRequestId": "string",
"version": 0,
"latest": true,
"walletId": "string",
"walletType": "cold",
"enterpriseId": "string",
"state": "initialized",
"date": {},
"createdDate": {},
"userId": "string",
"initiatedBy": "string",
"updatedBy": "string",
"intent": {
"feeOptions": {
"unit": "baseUnit",
"formula": "fixed",
"feeType": "base",
"gasLimit": 0,
"gasPrice": 0
},
"intentType": "acceleration",
"txid": "string",
"sequenceId": "string",
"comment": "string",
"nonce": "string",
"hopParams": {
"gasPriceMax": 0,
"paymentId": "string",
"userReqSig": "string"
},
"receiveAddress": "string",
"senderAddressIndex": 0
},
"pendingApprovalId": "string",
"isCanceled": true,
"txHashes": [
"string"
]
}