<p>You can, but the process is broken up into multiple RPCs.</p>

<p>First you use the <code>listunspent</code> RPC to find outputs to spend.</p>

<p>Then you use <code>createrawtransaction</code> with the inputs you want, and the outputs (destinations) you want.</p>

<p>If you didn't select all inputs and outputs already (including change, if necessary - any difference between inputs and outputs goes to fees), you can use <code>fundrawtransaction</code> to add more inputs using the normal coin selection algorithm, or to add change.</p>

<p>Then you use <code>signrawtransaction</code> to sign your inputs.</p>

<p>When all is ready, you can broadcast your transaction using <code>sendrawtransaction</code>.</p>

CC BY-SA 3.0
2018-04-27T06:59:19.603Z
Thanks, this really seems to be the only way as of now. Perhaps we'll get a more higher level API someday.
knaperek
CC BY-SA 3.0
2018-04-27T02:33:52.697Z
2018-04-27T02:33:52.697Z
Pieter Wuille
<p>Bitcoin Core introduced nice Coin Control feature accessible via the GUI client. To my surprise though, I don't see any obvious way how to make use of Coin Control via RPC/bitcoin-cli.</p>

<p>How can I pick a particular unspent output when creating a transaction via RPC?</p>

<bitcoin-core><json-rpc><bitcoin-cli><coin-control>
Bitcoin Core coin control via RPC (CLI)
knaperek
# Bitcoin Core coin control via RPC (CLI)

(Asked by: username_0 on 2017-07-07)

Bitcoin Core introduced nice Coin Control feature accessible via the GUI client. To my surprise though, I don't see any obvious way how to make use of Coin Control via RPC/bitcoin-cli.

How can I pick a particular unspent output when creating a transaction via RPC?

**Tags:** bitcoin-core, json-rpc, bitcoin-cli, coin-control


---

## 1 answers

### Answer by username_1 on 2018-04-27. Score: 1 | Accepted answer

You can, but the process is broken up into multiple RPCs.

First you use the `listunspent` RPC to find outputs to spend.

Then you use `createrawtransaction` with the inputs you want, and the outputs (destinations) you want.

If you didn't select all inputs and outputs already (including change, if necessary - any difference between inputs and outputs goes to fees), you can use `fundrawtransaction` to add more inputs using the normal coin selection algorithm, or to add change.

Then you use `signrawtransaction` to sign your inputs.

When all is ready, you can broadcast your transaction using `sendrawtransaction`.

> **Comments:**
> **username_0**: Thanks, this really seems to be the only way as of now. Perhaps we'll get a more higher level API someday.  

---

