<blockquote>
  <p>Is there any possible way to create a raw transaction using Bitcoin-cli createrawtransaction API that doesn't require spending the entire input? </p>
</blockquote>

<p>No.  It's an inherent feature of the Bitcoin protocol that inputs must be spent entirely or not at all.  It's a binary state: spent or unspent.  There is no "partially spent".</p>

<blockquote>
  <p>What I'm doing now is consuming that entire input sending 0.01 to the address specified and sending the change back to the address I'm withdrawing from. </p>
</blockquote>

<p>Yes, that's what you have to do (though for privacy reasons it is better to send the change to a freshly generated address instead).</p>

<blockquote>
  <p>If I deposit 0.5 BTC to my wallet and withdraw 0.01 is there any method to be able to work with my 0.49 BTC I have remaining without having it consumed entirely and being sent to the change address</p>
</blockquote>

<p>Nope.</p>

<blockquote>
  <p>because then I'm stuck waiting for it to confirm and it gives off the impression my wallet balance is 0 when it's really 0.49 BTC. </p>
</blockquote>

<p>Yes, that's something you just have to live with.  However, you don't necessarily have to wait for the transaction to confirm before spending the change.  But the second transaction won't confirm until after the first one does.</p>

CC BY-SA 4.0
2018-11-11T19:19:18.303Z
2018-11-11T19:19:18.303Z
Nate Eldredge
<p>Is there any possible way to create a raw transaction using <strong>Bitcoin-cli createrawtransaction API</strong> that doesn't require spending the entire input? </p>

<p>What I'm doing now is consuming that entire input sending 0.01 to the address specified and sending the change back to the address I'm withdrawing from. </p>

<p>If I deposit 0.5 BTC to my wallet and withdraw 0.01 is there any method to be able to work with my 0.49 BTC I have remaining without having it consumed entirely and being sent to the change address because then I'm stuck waiting for it to confirm and it gives off the impression my wallet balance is 0 when it's really 0.49 BTC. </p>

<bitcoin-cli><createrawtransaction>
Bitcoin-cli how to createrawtransaction without spending entire input?
mocode10
# Bitcoin-cli how to createrawtransaction without spending entire input?

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

Is there any possible way to create a raw transaction using **Bitcoin-cli createrawtransaction API** that doesn't require spending the entire input?

What I'm doing now is consuming that entire input sending 0.01 to the address specified and sending the change back to the address I'm withdrawing from.

If I deposit 0.5 BTC to my wallet and withdraw 0.01 is there any method to be able to work with my 0.49 BTC I have remaining without having it consumed entirely and being sent to the change address because then I'm stuck waiting for it to confirm and it gives off the impression my wallet balance is 0 when it's really 0.49 BTC.

**Tags:** bitcoin-cli, createrawtransaction


---

## 1 answers

### Answer by username_1 on 2018-11-11. Score: 3 | Accepted answer

> Is there any possible way to create a raw transaction using Bitcoin-cli createrawtransaction API that doesn't require spending the entire input?

No. It's an inherent feature of the Bitcoin protocol that inputs must be spent entirely or not at all. It's a binary state: spent or unspent. There is no "partially spent".

> What I'm doing now is consuming that entire input sending 0.01 to the address specified and sending the change back to the address I'm withdrawing from.

Yes, that's what you have to do (though for privacy reasons it is better to send the change to a freshly generated address instead).

> If I deposit 0.5 BTC to my wallet and withdraw 0.01 is there any method to be able to work with my 0.49 BTC I have remaining without having it consumed entirely and being sent to the change address

Nope.

> because then I'm stuck waiting for it to confirm and it gives off the impression my wallet balance is 0 when it's really 0.49 BTC.

Yes, that's something you just have to live with. However, you don't necessarily have to wait for the transaction to confirm before spending the change. But the second transaction won't confirm until after the first one does.


---

