/api/v2/{coin}/wallet/{walletId}/consolidateUnspents
Build a transaction to consolidate unspents in a wallet. Once built, you must sign and sent the transaction. Consolidating unspents is only for UTXO-based assets.
coin
stringRequiredbtc
walletId
stringRequired59cd72485007a239fb00282ed480da1f
^[0-9a-f]{32}$
feeRate
One ofnull
maxFeeRate
One ofnull
^-?\d+$
maxFeePercentage
integer feeTxConfirmTarget
integer bulk
boolean minValue
One of2000000
^-?\d+$
maxValue
One of2000000
^-?\d+$
minHeight
integer minConfirms
integer enforceMinConfirmsForChange
boolean limit
integer numUnspentsToMake
integer targetAddress
string txFormat
string legacy
psbt
psbt-lite
legacy
psbt
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
{ "feeRate": null, "maxFeeRate": null, "maxFeePercentage": 0, "feeTxConfirmTarget": 0, "bulk": true, "minValue": "2000000", "maxValue": "2000000", "minHeight": 0, "minConfirms": 0, "enforceMinConfirmsForChange": true, "limit": 0, "numUnspentsToMake": 0, "targetAddress": "string", "txFormat": "psbt" }
txHex
One of01000000000101d58f82d996dd872012675adadf4606734906b25a413f6e2ee535c0c10aef96020000000000ffffffff028de888000000000017a914c91aa24f65827eecec775037d886f2952b73cbe48740420f000000000017a9149304d18497b9bfe9532778a0f06d9fff3b3befaf870500473044022023d7210ba6d8bbd7a28b8af226f40f7235caab79156f93f9c9969fc459ea7f73022050fbdca788fba3de686b66b3501853695ff9d6f375867470207d233b099576e001000069522103d4788cda52f91c1f6c82eb91491ca76108c9c5f0839bc4f02eccc55fedb3311c210391bcef9dcc89570a79ba3c7514e65cd48e766a8868eca2769fa9242fdcc796662102ef3c5ebac4b54df70dea1bb2655126368be10ca0462382fcb730e55cddd2dd6a53aec8b11400
txInfo
object changeAddresses
array[string] 2MvrwRYBAuRtPTiZ5MyKg42Ke55W3fZJfZS
nOutputs
integer 2
nP2SHInputs
integer 0
nSegwitInputs
integer 1
unspents
array[object] walletAddressDetails
object feeInfo
object size
integer 776
fee
integer 38800
feeRate
One ofnull
payGoFee
integer 0
payGoFeeString
integer 0
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
{ "txHex": "01000000000101d58f82d996dd872012675adadf4606734906b25a413f6e2ee535c0c10aef96020000000000ffffffff028de888000000000017a914c91aa24f65827eecec775037d886f2952b73cbe48740420f000000000017a9149304d18497b9bfe9532778a0f06d9fff3b3befaf870500473044022023d7210ba6d8bbd7a28b8af226f40f7235caab79156f93f9c9969fc459ea7f73022050fbdca788fba3de686b66b3501853695ff9d6f375867470207d233b099576e001000069522103d4788cda52f91c1f6c82eb91491ca76108c9c5f0839bc4f02eccc55fedb3311c210391bcef9dcc89570a79ba3c7514e65cd48e766a8868eca2769fa9242fdcc796662102ef3c5ebac4b54df70dea1bb2655126368be10ca0462382fcb730e55cddd2dd6a53aec8b11400", "txInfo": { "changeAddresses": [ "2MvrwRYBAuRtPTiZ5MyKg42Ke55W3fZJfZS" ], "nOutputs": 2, "nP2SHInputs": 0, "nSegwitInputs": 1, "unspents": [ { "id": "003f688cc349f1fca8ac5ffa21671ca911b6ef351085c60733ed8c2ebf162cb8:2", "address": "2MsKxhhkDo5WaLaYRGA9Cr3iSQPyXsu6Fi2", "value": 0, "valueString": "2000000", "blockHeight": 0, "date": "2017-03-25T23:01:40.248Z", "coinbase": true, "wallet": "59cd72485007a239fb00282ed480da1f", "fromWallet": "59cd72485007a239fb00282ed480da1f", "chain": 0, "index": 0, "redeemScript": "522102f1e990044d2a8be43d5b500bbdcb36277b97a4b07e01c5101ae8ec1568bfd6532103dab7dc82f2fc8c28200c1bdeca9c4cf181e0ca257395829cbd599395048afb57210205422e711827d8356f2fb75334d863941dd7eb45bd5788fa231dc5fa755135b653ae", "witnessScript": "52210351311cd81144e6cbdba561d24dfc22644cb02d053339d4beace03231b3be4f372103a8d0c1a375b9ee1a2411f9f8e18373be7f228b18260f63bbfca48809170ed08b2103c3bd8bd074657bbe9ee6714b31a4a54b6fd5b5cda0e1030122f9bf46b5034f6b53ae", "isSegwit": true } ], "walletAddressDetails": { "id": "59cd72485007a239fb00282ed480da1f", "address": "2MvrwRYBAuRtPTiZ5MyKg42Ke55W3fZJfZS", "chain": 1, "index": 0, "coin": "string", "lastNonce": -1, "wallet": "59cd72485007a239fb00282ed480da1f", "coinSpecific": { "xlm": { "memoId": "1", "rootAddress": "GCTTCPH4IIDK7P72FFAEJ3ZFN6WDHJH6GGMRPHPM56ZWGIQ7B3XTIJAM" }, "txlm": { "memoId": "1", "rootAddress": "GCTTCPH4IIDK7P72FFAEJ3ZFN6WDHJH6GGMRPHPM56ZWGIQ7B3XTIJAM" } }, "balance": { "updated": "2019-08-24T14:15:22Z", "balance": 50000, "balanceString": "50000", "totalReceived": 0, "totalSent": 0, "confirmedBalanceString": "40000", "spendableBalanceString": "40000" }, "label": "Bob's Hot Wallet Address", "addressType": "p2sh" } }, "feeInfo": { "size": 776, "fee": 38800, "feeRate": null, "payGoFee": 0, "payGoFeeString": "0" } }
error
string required requestId
string required context
object name
string required 1 2 3 4 5 6
{ "error": "string", "requestId": "string", "context": {}, "name": "string" }