I'd like to send bitcoin from the specific address to a address using bitcoin api. I used 'sendfrom' as follows. Each address "mqXhhivMPjeVvdVMR239EVDJiRGQUYcbDZ" and "mknGW629wzSkfWvgXF23d8eTrqibnhTcrf" has bitcoin more than 0.002btc, however it returned the "insufficient funds" error. Could you tell me how to send from the specific address?

bitcoin-cli sendfrom mqXhhivMPjeVvdVMR239EVDJiRGQUYcbDZ mknGW629wzSkfWvgXF23d8eTrqibnhTcrf 0.002

Account has insufficient funds
up vote 1 down vote accepted

You cannot send from an address. All the coins inside a wallet are always treated as a single balance, for privacy reasons.

All sendfrom does is deduct the money you're sending from the virtual local account with that name. You can move money to those accounts using the move command. Received coins are by default credited to the "" account. Still, these accounts have nothing to do with actual coins on the network. This account system is scheduled for deprecation, though.

If you want to manually select the coins to use, look into the listunspent, createrawtransaction, signrawtransaction and sendrawtransaction RPC calls.

The first parameter of 'sendfrom' should be an account.You can use 'setaccount' to set an account name to a particular address, and then use 'sendfrom'

  • Note that accounts are deprecated. – Murch Sep 25 '17 at 3:15

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.