I am using Bitcoin JSON RPC 14 version so how can I use sendFrom command in the case of fee inclusive.
sendfrom
has these parameters:
sendfrom "fromaccount" "toaddress" amount , minconf, "comment" "comment_to"
As you can see there is no subtractfeefromamount
boolean parameter.So you can't deduct fee from the amount itself.
You can use sendmany
option with single destination address. sendmany
has these parameter:
sendmany "fromaccount" {"address":amount,...} ,minconf, "comment", subtractfeefrom
Here subtractfeefrom
in above parameter accept array of address from which fee will be deducted.
example:
bitcoin-cli sendmany "1521" "{\"n3jYBjCzgGNydQwf83Hz6GBzGBhMkKfgL1\":0.01}" 1 "" "[\"n3jYBjCzgGNydQwf83Hz6GBzGBhMkKfgL1\"]"
n3jYBjCzgGNydQwf83Hz6GBzGBhMkKfgL1
will get 0.0098(approx) and not 0.01
-
-
Yes you are right. But
sendfrom
has nosubtractfeefromamount
option butsendmany
does.sendmany
with single recipient address is equivalent tosendfrom
. alsosendtoaddress
has nofromaccount
option – Ajit Soman Feb 3 '18 at 9:13 -
Thanks Ajit sendmany has subtractfeefromamount option and sendfrom does not have and this helped me to fix my problem. – Dipen Chawla Feb 3 '18 at 12:00