Accelerate Transaction - UTXO CPFP
Accelerate a stuck UTXO transaction using Child-Pays-For-Parent (CPFP). See the Guide.
-
Accelerate a stuck UTXO transaction using 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, so miners are likely to include both in the same block.
Provide the stuck transaction ID in
cpfpTxIds, setcpfpFeeRateto the desired fee rate, and setmaxFeeto cap the fee amount.Prerequisites: Complete Get Started and initiate a withdrawal (see Withdraw Overview).
// 1. Build Acceleration Transaction
export COIN="<ASSET_ID>"
export WALLET_ID="<YOUR_WALLET_ID>"
export ACCESS_TOKEN="<YOUR_ACCESS_TOKEN>"
export TRANSACTION_ID="<STUCK_TX_ID>"
export FEE_RATE="<FEE_RATE>"
export MAX_FEE="<MAX_FEE>"
curl -X POST \
"http://$BITGO_EXPRESS_HOST/api/v2/$COIN/wallet/$WALLET_ID/acceleratetx" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-d '{
"cpfpTxIds": ["'"$TRANSACTION_ID"'"],
"cpfpFeeRate": "'"$FEE_RATE"'",
"maxFee": "'"$MAX_FEE"'"
}'
// 1. Build Acceleration Transaction
// Use the REST API for this step (see cURL tab)
// 1. Build Acceleration Transaction Response
{
"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"
}