Transactions been formed with too many pieces of different ages, causing the transaction to have a huge size and therefore require very high fees.
Question
Is there a way to reduce the size of the transaction?
Story
I have a payment system that accepts bitcoins. Therefore my client (the store owner) receives many transactions of relatively small amounts ($30 - $400 amounts). And every now and then he tries to move what he has on his address to exchange that to dollars. We use Blockcypher's API. The problem is that when we construct the transaction, the script gets formed with all the sum of the different pieces, indicating which pieces will form the payment, as I see it, this is done using the age.
An example of how these pieces are in the input list is here:
"inputs": [
{
"prev_hash": "094be5d93ec5a5299fc8f64501855010649e3bb15d56f41ac9b5291d0XXXXX",
"output_index": 0,
"script": "483045022100d73dd1a8499caac0d237f5f2df17786722b4e50120756bc63c4f5f513b4f4244022019d20416762f21870e63fe035e2a0599217bc62323430ca428c2d1c8930b67270121035a3ce00ccf0701a28f124e634f4243ef2b40650aad5b0433eba4feXXXXXXX",
"output_value": 1883692,
"sequence": 4294967295,
"addresses": [
"1Lpua75bYTfeVUaEYDEkzY1vxwaVFvUNNr"
],
"script_type": "pay-to-pubkey-hash",
"age": 498654
},
{
"prev_hash": "1917bb8a51642541f9d4b20beeec02a57193d5ede91e7fc79a6b7aXXXXXXX",
"output_index": 0,
"script": "483045022100d5f54e8b89fe080b16236a742bce0d4512f83d382a683bee96a25d5c1ff41a0802206844d81b0c2d909e4d893733a7f317caaa49a408f69c0414cee0685ac96883850121035a3ce00ccf0701a28f124e634f4243ef2b40650aad5b0433ebaXXXXXXXX",
"output_value": 2470000,
"sequence": 4294967295,
"addresses": [
"1Lpua75bYTfeVUaEYDEkzY1vxwaVFvUNNr"
],
"script_type": "pay-to-pubkey-hash",
"age": 498665
},
Is it really necessary to indicate the age of the pieces used? Is there a way to reduce the size of the transaction script? This is costing too much in fees to my client. We are talking transactions that costs hundreds or more dollars.
Thanks in advance.