API and needed amount


I have installed platform on our server and ran some codes successfully based on its Wallet APIs. Regarding to what is said here, as we are testing this platform, we charged the created wallet with .00000546 BTC. But while using payment API, we received this result:

  "error": "Insufficient funds",
  "available": 0.00000546,
  "needed": 0.00001092,
  "sweep_amount_satoshi": 0,
  "sweep_fee_satoshi": 678

I can't understand why am I getting this error, and specially, how the amount of needed variable is calculated? May you help me please?

Mohammad Saberi

Posted 2019-10-09T07:10:43.013

Reputation: 137

2If you have the .00000546 BTC inside the wallet, you can not create a new transaction because, if your transaction will have needed the fee, so with your reference in this post, you can not send the 0.00000546 with the because of the 0.00000546 + FEE < YOUR_AMMOUNT – vincenzopalazzo – 2019-10-09T08:02:44.157

That's correct and we understand it. But the mentioned needed value is strange. Based on, miners fee is 0.0001. So we need 0.0001+0.00000546 BTC. I don't know what is sweep_fee_satoshi for. But even if we should add it too (0.00000678 BTC), the final result will be 0.00011224 BTC which is different with the needed value!

– Mohammad Saberi – 2019-10-09T08:59:29.927

No answers