1

I am using Bitcoin JSON RPC 14 version so how can I use sendFrom command in the case of fee inclusive.

1

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

  • question is about sendFrom command not about sendmany. :) – Зелёный Feb 3 '18 at 9:01
  • Yes you are right. But sendfrom has no subtractfeefromamount option but sendmany does. sendmany with single recipient address is equivalent to sendfrom . also sendtoaddress has no fromaccount 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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.