<p><a href="https://chainquery.com/bitcoin-api/sendtoaddress" rel="nofollow noreferrer">https://chainquery.com/bitcoin-api/sendtoaddress</a></p>

<p>You can use last (5th) parameter:</p>

<ol start="5">
<li>subtractfeefromamount  (boolean, optional, default=false) The fee will be deducted from the amount being sent. The recipient will receive less bitcoins than you enter in the amount field.</li>
</ol>

CC BY-SA 3.0
2017-08-11T05:54:20.957Z
`bitcoind` accepts this as well now
Pieter Wuille
CC BY-SA 3.0
2017-08-10T10:34:31.030Z
2017-08-10T10:34:31.030Z
artamonovdev
<p>Transaction fees are taken if you construct a transaction in such a way as to imply that a fee is being paid.</p>

<p>For example </p>

<ul>
<li>You have two unspent transaction out puts of 0.6BTC and 0.4BTC</li>
<li>You use these two outputs as inputs (which total 1BTC) in your transaction
where you pay 1 output address 0.99999BTC.</li>
<li>The fee of 0.00001BTC is implied. It is not sent to any address or
collected by the software.</li>
<li>Your friend receives 0.99999BTC and when the transaction is included
in a block, the miner gets 0.00001BTC.</li>
</ul>

<p>That's basically how it works. You need to consider what is going in to the transaction, as well as what is coming out at the other end.</p>

CC BY-SA 3.0
2014-04-23T15:03:55.787Z
@pyramids agreed. I assumed the OP was trying to work out how it can be done so that they control the fee. In anycase creating a raw transaction would also mean they should consider minimum fees etc...
T9b
CC BY-SA 3.0
2014-04-16T13:11:40.810Z
2014-04-16T13:11:40.810Z
T9b
<p>I am using sendtoaddress API call. 
The problem is that I need to specify amount that includes fees.
For example, if I withdraw 1 btc, I need bitcoind to deduct fees from that amount and in example to send 0.999 as transaction amount and 0.001 as fee (or any other fee amount that recommended for this transaction)</p>

<p>Please, help and tell if that possible to achieve such result.</p>

<transaction-fees>
Deduct fee from transaction amount
murich
# Deduct fee from transaction amount

(Asked by: username_0 on 2014-04-08)

I am using sendtoaddress API call.
The problem is that I need to specify amount that includes fees.
For example, if I withdraw 1 btc, I need bitcoind to deduct fees from that amount and in example to send 0.999 as transaction amount and 0.001 as fee (or any other fee amount that recommended for this transaction)

Please, help and tell if that possible to achieve such result.

**Tags:** transaction-fees


---

## 2 answers

### Answer by username_1 on 2017-08-10. Score: 2

<https://chainquery.com/bitcoin-api/sendtoaddress>

You can use last (5th) parameter:

5. subtractfeefromamount (boolean, optional, default=false) The fee will be deducted from the amount being sent. The recipient will receive less bitcoins than you enter in the amount field.

> **Comments:**
> **username_2**: `bitcoind` accepts this as well now  

---

### Answer by username_3 on 2014-04-16. Score: 0

Transaction fees are taken if you construct a transaction in such a way as to imply that a fee is being paid.

For example

* You have two unspent transaction out puts of 0.6BTC and 0.4BTC
* You use these two outputs as inputs (which total 1BTC) in your transaction
  where you pay 1 output address 0.99999BTC.
* The fee of 0.00001BTC is implied. It is not sent to any address or
  collected by the software.
* Your friend receives 0.99999BTC and when the transaction is included
  in a block, the miner gets 0.00001BTC.

That's basically how it works. You need to consider what is going in to the transaction, as well as what is coming out at the other end.

> **Comments:**
> **username_3**: @pyramids agreed. I assumed the OP was trying to work out how it can be done so that they control the fee. In anycase creating a raw transaction would also mean they should consider minimum fees etc...  

---

