<p><strong>Please don't use bitcoin cores accounting system anymore (especially for new projects). It has been deprecated (<a href="https://github.com/bitcoin/bitcoin/issues/3816" rel="nofollow">and might be removed in near future</a>).</strong></p>

<p>A way of solving your issue would be by calling <code>getaddressesbyaccount</code> (get addresses of a specific account) and then use <code>listunspent</code> with these addresses.
Then you could create your own coin selection and use <code>createrawtransaction</code> <code>singrawtransaction</code> and <code>sendrawtransaction</code>.</p>

CC BY-SA 3.0
2015-08-21T06:23:41.627Z
2015-08-21T06:23:41.627Z
Jonas Schnelli
<p>I am writing an application that uses bitcoin wallet accounts to specify what addresses belong to what user. I have been reading the documentation trying to find a way to spend Bitcoins specifying the <strong>account from</strong>, <strong>address to</strong>, and <strong>miners fee</strong>.</p>

<p>After reading the documentation, I think that is impossible, because there are only two ways:</p>

<ul>
<li><p>The first one is using <code>sendFrom</code>, but you can't set the fee with this command. You could use <code>settxfee</code> but that is a changing number depending on the Kb's of the tx.</p></li>
<li><p>The second one is using <code>CreateRawTransaction</code> and <code>SendRawTransaction</code>, but in order to specify the inputs, there is no way to get the inputs, other than calling <code>listunspent</code>, but that returns the inputs for all wallets, and there is no way to tell that command to only return the unspent inputs for a <strong>specific account</strong>.</p></li>
</ul>

<p>Is there really no way to send bitcoins from account specifying the fee?</p>

CC BY-SA 3.0
2015-08-20T15:20:42.537Z
Are you querying the Bitcoin core software?
Wizard Of Ozzie
CC BY-SA 3.0
2015-08-20T17:17:35.197Z
@WizardOfOzzie sorry but I dont understand your question. Please post it again thanks!!
mesafria
<bitcoind><json-rpc><transaction-fees><bitcoin-core-accounts><coin-selection>
How to spend bitcoins From Account and specify Fee
mesafria
# How to spend bitcoins From Account and specify Fee

(Asked by: username_0 on 2015-08-20)

I am writing an application that uses bitcoin wallet accounts to specify what addresses belong to what user. I have been reading the documentation trying to find a way to spend Bitcoins specifying the **account from**, **address to**, and **miners fee**.

After reading the documentation, I think that is impossible, because there are only two ways:

* The first one is using `sendFrom`, but you can't set the fee with this command. You could use `settxfee` but that is a changing number depending on the Kb's of the tx.
* The second one is using `CreateRawTransaction` and `SendRawTransaction`, but in order to specify the inputs, there is no way to get the inputs, other than calling `listunspent`, but that returns the inputs for all wallets, and there is no way to tell that command to only return the unspent inputs for a **specific account**.

Is there really no way to send bitcoins from account specifying the fee?

**Tags:** bitcoind, json-rpc, transaction-fees, bitcoin-core-accounts, coin-selection

> **Comments:**
> **username_1**: Are you querying the Bitcoin core software?  
> **username_0**: @WizardOfOzzie sorry but I dont understand your question. Please post it again thanks!!  

---

## 1 answers

### Answer by username_2 on 2015-08-21. Score: 2 | Accepted answer

**Please don't use bitcoin cores accounting system anymore (especially for new projects). It has been deprecated ([and might be removed in near future](https://github.com/bitcoin/bitcoin/issues/3816)).**

A way of solving your issue would be by calling `getaddressesbyaccount` (get addresses of a specific account) and then use `listunspent` with these addresses.
Then you could create your own coin selection and use `createrawtransaction` `singrawtransaction` and `sendrawtransaction`.


---

