2

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
1

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.

0

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 agree to our terms of service, privacy policy and cookie policy

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