Consolidates utxos to a given address.
POST/wallet/utxo-consolidation
Consolidates utxos to a given address.
Request
Header Parameters
Defines the key of the wallet on which the request will be executed.
- application/json
Body
required
Data to consolidate utxos.
Recipient to the consolidated utxos.
Maximum number of utxos to aggregate. Default to MAX_INPUTS (255)
Token to filter the utxos. If not sent, we select only HTR utxos.
Address to filter the utxos.
Maximum limit of utxo amount to filter the utxos list. We will consolidate only utxos that have an amount lower than this value. Integer representation of decimals, i.e. 100 = 1.00.
Minimum limit of utxo amount to filter the utxos list. We will consolidate only utxos that have an amount bigger than this value. Integer representation of decimals, i.e. 100 = 1.00.
Limit the maximum total amount to consolidate summing all utxos. Integer representation of decimals, i.e. 100 = 1.00.
Responses
- 200
Consolidated utxos and consolidation information
- application/json
- Schema
- success
- wallet-not-ready
- no-available-utxos
- invalid-parameter
- no-wallet-id
- invalid-wallet-id
Schema
any
Success
{
"success": true,
"txId": "0000002b145f03de21c841b8e47c019989e16cafa55754bbea8bde00e5170f80",
"total_utxos_consolidated": 8,
"total_amount": 140800,
"utxos": [
{
"address": "HNnK9wgUVL6Cjzs1K3jpoGgqQTXCqpAnW8",
"amount": 96000,
"tx_id": "00dc85e6c5e35525f3e85edebff3905267b48c190c21eaeec6e8e655fcbb5744",
"locked": false,
"index": 0
},
{
"address": "HNnK9wgUVL6Cjzs1K3jpoGgqQTXCqpAnW8",
"amount": 6400,
"tx_id": "0000000330f14db1af211f5f0210b3ccc4cb69bc1e7fff19b1e96e8f6b93292b",
"locked": false,
"index": 0
},
{
"address": "HNnK9wgUVL6Cjzs1K3jpoGgqQTXCqpAnW8",
"amount": 6400,
"tx_id": "00000012442813722351ab01bbc79bba992fffd16fa066764e491ffd0dbfe87e",
"locked": false,
"index": 0
},
{
"address": "HNnK9wgUVL6Cjzs1K3jpoGgqQTXCqpAnW8",
"amount": 6400,
"tx_id": "0000003b34abcb64fcc2999493f66d355bd853110a1a959d35856e598bc80568",
"locked": false,
"index": 0
},
{
"address": "HNnK9wgUVL6Cjzs1K3jpoGgqQTXCqpAnW8",
"amount": 6400,
"tx_id": "000000233f187b10ba54b093e0b4f391b27ce747e70f01d573d75ea31e8678a8",
"locked": false,
"index": 0
},
{
"address": "HNnK9wgUVL6Cjzs1K3jpoGgqQTXCqpAnW8",
"amount": 6400,
"tx_id": "0000000097cf83a6937199ece5d3ac96cfad239fcb142acc083789eb0c31d3e6",
"locked": false,
"index": 0
},
{
"address": "HNnK9wgUVL6Cjzs1K3jpoGgqQTXCqpAnW8",
"amount": 6400,
"tx_id": "0000003b6e6ab2cc751dc736a6a1502eeb2ecca48741f78c52bc27c04bf01412",
"locked": false,
"index": 0
},
{
"address": "HNnK9wgUVL6Cjzs1K3jpoGgqQTXCqpAnW8",
"amount": 6400,
"tx_id": "0000002b145f03de21c841b8e47c019989e16cafa55754bbea8bde00e5170f80",
"locked": false,
"index": 0
}
]
}
Wallet is not ready yet
{
"success": false,
"message": "Wallet is not ready.",
"state": 1
}
No available utxo to consolidate. Check /wallet/utxo-details for available utxos.
{
"success": false,
"error": "No available utxo to consolidate."
}
Invalid parameter
{
"success": false,
"error": [
{
"msg": "Invalid value",
"param": "destination_address",
"location": "body"
}
]
}
No wallet id parameter
{
"success": false,
"message": "Parameter 'wallet-id' is required."
}
Wallet id parameter is invalid
{
"success": false,
"message": "Invalid wallet-id parameter."
}