<p>If you want to set the transaction fee manually, then you will need to use the <code>*rawtransaction</code> commands. Those commands give you full control over the inputs and outputs so you can set the fee accordingly (since the fee is the difference between the inputs and outputs).</p>

<p>You can create a raw transaction with no inputs and no change output using <code>createrawtransaction</code>. You do so like this:</p>

<pre><code>bitcoin-cli createrawtransaction '[]' '[{"&lt;address&gt;":&lt;amount}]'
</code></pre>

<p>where <code>&lt;address&gt;</code> is the address you want to send to and <code>&lt;amount&gt;</code> is the amount you want to send. You can then take the resulting raw transaction and use <code>fundrawtransaction</code> with it to get inputs and a change output if necessary. <code>fundrawtransaction</code> allows you to set the fee rate. So if you wanted a transaction with a fee rate of 0.0001 BTC/kB (10 satoshis per byte):</p>

<pre><code>bitcoin-cli fundrawtransaction &lt;raw tx&gt; '{"feeRate":0.0001}'
</code></pre>

<p>The funded transaction is the one in the <code>hex</code> field of the output of that command. You sign this with <code>signrawtransaction</code> and then broadcast it with <code>sendrawtransaction</code>.</p>

CC BY-SA 4.0
2018-09-11T14:25:01.197Z
2018-09-11T14:25:01.197Z
Ava Chow
<p><br>I want to use BitcoinCore for the RPC requests from the site. But I could not find anywhere else how to ask a commission for withdrawal. 
<br> In the <a href="https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_calls_list" rel="nofollow noreferrer">instruction</a> there is only:
<br> <strong>sendtoaddress</strong>: bitcoinaddress amount comment comment-to - there is nowhere to cover the commision. 
<br> <strong>settxfee</strong>: amount - it is assigned to the entire account, not to a specific transaction.
<br>How to implement the conclusion with a manual commission?</p>

CC BY-SA 4.0
2018-09-11T14:12:51.867Z
Welcome @22VOLT, can you explain what you mean by commission, do you mean transaction fee to the miners?
JBaczuk
<bitcoin-core><json-rpc>
Bitcoin core RPC FEE
220VOLT
# Bitcoin core RPC FEE

(Asked by: username_0 on 2018-09-11)

I want to use BitcoinCore for the RPC requests from the site. But I could not find anywhere else how to ask a commission for withdrawal.
  
 In the [instruction](https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_calls_list) there is only:
  
 **sendtoaddress**: bitcoinaddress amount comment comment-to - there is nowhere to cover the commision.
  
 **settxfee**: amount - it is assigned to the entire account, not to a specific transaction.
  
How to implement the conclusion with a manual commission?

**Tags:** bitcoin-core, json-rpc

> **Comments:**
> **username_1**: Welcome @22VOLT, can you explain what you mean by commission, do you mean transaction fee to the miners?  

---

## 1 answers

### Answer by username_2 on 2018-09-11. Score: 1 | Accepted answer

If you want to set the transaction fee manually, then you will need to use the `*rawtransaction` commands. Those commands give you full control over the inputs and outputs so you can set the fee accordingly (since the fee is the difference between the inputs and outputs).

You can create a raw transaction with no inputs and no change output using `createrawtransaction`. You do so like this:

```
bitcoin-cli createrawtransaction '[]' '[{"<address>":<amount}]'

```

where `<address>` is the address you want to send to and `<amount>` is the amount you want to send. You can then take the resulting raw transaction and use `fundrawtransaction` with it to get inputs and a change output if necessary. `fundrawtransaction` allows you to set the fee rate. So if you wanted a transaction with a fee rate of 0.0001 BTC/kB (10 satoshis per byte):

```
bitcoin-cli fundrawtransaction <raw tx> '{"feeRate":0.0001}'

```

The funded transaction is the one in the `hex` field of the output of that command. You sign this with `signrawtransaction` and then broadcast it with `sendrawtransaction`.


---

