<p>The simplest thing for you is to just use <code>sendtoaddress</code>. This will use your bitcoind's wallet to select which coins to use, construct the transaction, sign it, and send it. Everything happens internally to the wallet so all you need is to have some Bitcoin in your wallet, an address to send to, and the amount you want to send.</p>

<p>The syntax for <code>sendtoaddress</code> is</p>

<pre><code>sendtoaddress &lt;address&gt; &lt;amount&gt;
</code></pre>

<p>where <code>&lt;address&gt;</code> is the address you are sending to and <code>&lt;amount&gt;</code> is the amount.</p>

CC BY-SA 4.0
2020-04-14T20:52:58.017Z
Thanks. So its the short way of doing it. If I did it with those rawtransactions, would be it same outcome but I would need to do everything manually, like form, sign and then send? 
EDIT: How do I set fee I need to pay or maybe you could explain a bit how it works?
Mortelity
CC BY-SA 4.0
2020-04-14T21:52:12.660Z
Yes, with the other commands you are doing those yourself. With those RPCs you also have to deal with the transaction fees. `sendtoaddress` does the fee calculations for you. Since what really matters with fees is the fee rate (and not the absolute fee), you need to know what inputs are going to be in your transaction. `sendtoaddress` deals with this for you. The fee rate it uses comes from the fee estimator. You don't need to calculate or set the fee yourself, bitcoind will handle that for you.
Ava Chow
CC BY-SA 4.0
2020-04-15T09:53:30.650Z
What if I want to have fixed fee? How do I do it?
Mortelity
CC BY-SA 4.0
2020-04-15T16:31:42.430Z
You cannot choose to use a fixed fee. If you want to use a fixed fee, then you need to construct the transaction yourself using the `*rawtransaction` RPCs.
Ava Chow
CC BY-SA 4.0
2020-04-14T19:11:46.057Z
2020-04-14T19:11:46.057Z
Ava Chow
<p>Probably been asked a lot, but I'm unable to find answer. I wanted to ask, how to do I send from btc rpc to another address inside or outside rpc. </p>

<p>I been looking at these calls <code>sendtoaddress</code> , <code>createrawtransaction</code> , <code>signrawtransaction</code> and <code>sendrawtransaction</code> and I'm a bit clueless... </p>

<p>On side of that, how do I get amount of fee I need to pay when doing transaction.</p>

<transactions><transaction-fees><json-rpc>
How to make transaction in btc rpc
Mortelity
# How to make transaction in btc rpc

(Asked by: username_0 on 2020-04-14)

Probably been asked a lot, but I'm unable to find answer. I wanted to ask, how to do I send from btc rpc to another address inside or outside rpc.

I been looking at these calls `sendtoaddress` , `createrawtransaction` , `signrawtransaction` and `sendrawtransaction` and I'm a bit clueless...

On side of that, how do I get amount of fee I need to pay when doing transaction.

**Tags:** transactions, transaction-fees, json-rpc


---

## 1 answers

### Answer by username_1 on 2020-04-14. Score: 0 | Accepted answer

The simplest thing for you is to just use `sendtoaddress`. This will use your bitcoind's wallet to select which coins to use, construct the transaction, sign it, and send it. Everything happens internally to the wallet so all you need is to have some Bitcoin in your wallet, an address to send to, and the amount you want to send.

The syntax for `sendtoaddress` is

```
sendtoaddress <address> <amount>

```

where `<address>` is the address you are sending to and `<amount>` is the amount.

> **Comments:**
> **username_0**: Thanks. So its the short way of doing it. If I did it with those rawtransactions, would be it same outcome but I would need to do everything manually, like form, sign and then send?  EDIT: How do I set fee I need to pay or maybe you could explain a bit how it works?  
> **username_1**: Yes, with the other commands you are doing those yourself. With those RPCs you also have to deal with the transaction fees. `sendtoaddress` does the fee calculations for you. Since what really matters with fees is the fee rate (and not the absolute fee), you need to know what inputs are going to be in your transaction. `sendtoaddress` deals with this for you. The fee rate it uses comes from the fee estimator. You don't need to calculate or set the fee yourself, bitcoind will handle that for you.  
> **username_0**: What if I want to have fixed fee? How do I do it?  
> **username_1**: You cannot choose to use a fixed fee. If you want to use a fixed fee, then you need to construct the transaction yourself using the `*rawtransaction` RPCs.  

---

