sendFrom with fee inclusive

1

0

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

Dipen Chawla

Posted 2018-02-02T11:27:30.703

Reputation: 73

Answers

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

Ajit Soman

Posted 2018-02-02T11:27:30.703

Reputation: 405

question is about sendFrom command not about sendmany. :)Зелёный 2018-02-03T09:01:54.953

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 optionAjit Soman 2018-02-03T09:13:52.937

Thanks Ajit sendmany has subtractfeefromamount option and sendfrom does not have and this helped me to fix my problem.Dipen Chawla 2018-02-03T12:00:32.060