Closed cryptodeveloperin closed 6 years ago
Either use your own Bitcoin Core node and call RPC estimatesmartfee or use a third party service like https://estimatefee.com/api
i have check estimate fee but i want to know how the byte will be calculated for our transaction? means what's the total byte for my transaction? so as per that i can increase my fee. i want to inquire about total byte fro current transaction, so i can pay more but i could not found any way currently.
Use TransactionBuilder
and use SendEstimatedFee(feeRate)
where feeRate is taken from this service.
ok thanks..i will check now.
I have already taken fee from service but my transaction bytes are more then 1000 and so i transaction taken long time to confirm. so i need to check byte before broadcast, and i can upgrade transaction fee for those bytes.
Please help me , how can i make proper fee for my single transaction but as per the byte. i am using fee from "https://bitcoinfees.21.co/api/v1/fees/recommended" also check from above recommendation. But my main problem is Byte of transaction. It was bigger then i am expecting
Money minerFee = new Money(fee, MoneyUnit.BTC);
var keys = new List
transaction.Sign(keys.ToArray(), coinList.ToArray());
var builder = new TransactionBuilder();
NBitcoin.Policy.TransactionPolicyError[] error = null;
builder.AddCoins(coinList.ToArray());
bool verifyTransactionHash = builder.Verify(transaction, out error);
if (verifyTransactionHash == true && error.Length == 0)
{
// Broadcast your transaction to all miners
BroadcastResponse broadcastResponse = client.Broadcast(transaction).Result;
if (!broadcastResponse.Success)
throw new Exception(broadcastResponse.Error.Reason);
}
I got the solution. Thanks.
Is there any way to auto calculate the fee during withdrawn transaction?
Because if i get some thing static then withdrawn take long time. so please assist.
or is there any way to get total number of byte of current transaction?