Accelerate Bitcoin Transaction

Overview

During periods of high transaction volume, Bitcoin transactions with lower fees might get stuck waiting for confirmation in the mempool. You have 2 options to accelerate a stuck bitcoin transaction:

  1. Replace-By-Fee (RBF) - RBF transactions include a higher fee and replace the lower-fee stuck transaction. To learn more, see the concept topic, Replace-By-Fee (RBF).
  2. Child-Pays-For-Parent (CPFP) - CPFP transactions utilize a stuck transaction output of a lower-fee parent transaction to create a higher-fee child transaction. The parent transaction must be confirmed before the child transaction. Therefore, miners are likely to included both in the same block.

Note: BitGo recommends accelerating using RBF, and by default, enables RBF for all transactions created in the BitGo web UI.

Prerequisites

  • Get Started
  • To accelerate using RBF, ensure your initial transaction was built with isReplaceableByFee set to true. To learn more, see Transact Overview.

1. Build Acceleration Transaction

Endpoint: Accelerate Transaction

  • cURL (RBF)
  • cURL (CPFP)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 export COIN="<ASSET_ID>" export WALLET_ID="<YOUR_WALLET_ID>" export ACCESS_TOKEN="<YOUR_ACCESS_TOKEN>" export TRANSACTION_ID="<STUCK_TX_ID>" export FEE_MULTIPLIER="<FEE_MULTIPLIER>" curl -X POST \ "https://app.bitgo-test.com/api/v2/$COIN/wallet/$WALLET_ID/acceleratetx" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $ACCESS_TOKEN" \ -d '{ "rbfTxIds": ["'"$TRANSACTION_ID"'"], "feeMultiplier": "'"$FEE_MULTIPLIER"'" }'

Step Result

  • JSON
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 { "transfer": { "coin": "btc", "id": "59cd72485007a239fb00282ed480da1f", "wallet": "59cd72485007a239fb00282ed480da1f", "enterprise": "59cd72485007a239fb00282ed480da1f", "txid": "b8a828b98dbf32d9fd1875cbace9640ceb8c82626716b4a64203fdc79bb46d26", "txidType": "transactionHash", "height": 0, "heightId": "string", "date": "2019-08-24T14:15:22Z", "confirmations": 0, "type": "send", "value": 0, "valueString": "2000000", "intendedValueString": "2000000", "baseValue": 0, "baseValueString": "2000000", "baseValueWithoutFees": 0, "baseValueWithoutFeesString": "2000000", "feeString": "string", "payGoFee": 0, "payGoFeeString": "string", "usd": 0, "usdRate": 0, "state": "confirmed", "tags": [ "59cd72485007a239fb00282ed480da1f" ], "history": [ { "date": "2019-08-24T14:15:22Z", "user": "59cd72485007a239fb00282ed480da1f", "action": "created", "comment": "string" } ], "comment": "string", "vSize": 0, "coinSpecific": {}, "sequenceId": "string", "entries": [ { "address": "2NAUwNgXaoFj2VVnSEvNLGuez8CfdU2UCMZ", "wallet": "string", "value": 0, "valueString": "string", "isChange": true, "isPayGo": true, "token": "omg", "label": "string", "failed": true } ], "usersNotified": true, "label": "string", "replaces": [ "string" ], "replacedBy": [ "string" ] }, "txid": "string", "tx": "string", "status": "signed" }

Next

Acceleration transactions follow the transaction flow of their wallet type, and must receive all required signatures and approvals before before broadcasting to the blockchain. To learn more, see Transact Overview

After receiving all required signatures and approvals, BitGo broadcasts the transaction to the blockchain. You can view your completed transaction in BitGo or on a blockchain explorer, which may also identify the transaction with an RBF or CPFP flag. Once your accelerated transaction is confirmed on chain, BitGo updates the status of the original transaction to Replaced.

See Also