2

Is it possible using bitcoind JSON-RPC API to receive funds from someone and send it immediately to another third-party address? I do not want to wait for 1 confirmation.

getbalance with minconf=0 shows I have 0.01 BTC, but when I do sentfrom with minconf=0, I get Insufficient funds error.

  • I vaguely remember that bitcoind only let's you use UTXO with at least one confirmation unless it originated from your own address. Don't have a source right now, but that may be it? – Murch Jan 27 '16 at 15:56
1

From the help for the sendfrom RPC/command line command:

Arguments:

  1. "fromaccount" (string, required) The name of the account to send funds from. May be the default account using "".
  2. "tobitcoinaddress" (string, required) The bitcoin address to send funds to.
  3. amount (numeric or string, required) The amount in BTC (transaction fee is added on top).
  4. minconf (numeric, optional, default=1) Only use funds with at least this many confirmations.
  5. "comment" (string, optional) A comment used to store what the transaction is for. This is not part of the transaction, just kept in your wallet.
  6. "comment-to" (string, optional) An optional comment to store the name of the person or organization to which you're sending the transaction. This is not part of the transaction, it is just kept in your wallet.

Parameter 4 is for minconf. You can't just add minconf=0 to the command, though, you have to give arguments for the first 3 parameters and then specify the 4th. For example:

sendfrom "" "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa" 0.1 0

If that still doesn't work, make sure the funds show up in getbalance "" 0. Also note that you need to leave some for a mining fee (you actually need a little bit more than the amount you want to send in order to make a transaction go through, because of the fee).

  • 1
    I call sendfrom with all parameters, of course. And getbalance "" 0 returns not zero. I tried to spend 0.00001 while I have 0.01 in unconfirmed - still not works. Must be sendfrom is unable to send unconfirmed funds and I forced to use createrawtransaction. – Denis Jan 26 '16 at 15:29
  • If you're trying to send 0.00001, then that may be your problem. That's an extremely low amount, and the output it generates would not be worth the fees it takes to spend it. Try sending an amount higher than 0.0005 (20 cents). – morsecoder Jan 26 '16 at 15:32

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.