<p><code>getbalance</code> returns the balance that your node currently considers spendable. According to your console output, the transaction that sent you the output was flagged as <code>"bip125-replaceable"=&gt;"yes"</code>. Since a transaction flagged as replaceable can be amended or retracted by the sender until it gets confirmed, an output from such a transaction will not be considered reliable and not used as an input until confirmed.</p>

CC BY-SA 4.0
2019-11-20T17:20:02.943Z
2019-11-21T23:14:24.120Z
2019-11-21T23:14:24.120Z
Murch
<pre><code>&gt; $bitcoin_rpc.getnewaddress("myaddress", "bech32")
 =&gt; "bc1q9kvfyjxtk9tvkzgpkf4x8zs42sddwlyanz3z6z" 
&gt; $bitcoin_rpc.getbalance
 =&gt; 0.0 
&gt; $bitcoin_rpc.getbalance("*", 0)
 =&gt; 0.0 
&gt; $bitcoin_rpc.listtransactions
 =&gt; [{"address"=&gt;"bc1q9kvfyjxtk9tvkzgpkf4x8zs42sddwlyanz3z6z", "category"=&gt;"receive", "amount"=&gt;0.00025, "label"=&gt;"myaddress", "vout"=&gt;1, "confirmations"=&gt;0, "trusted"=&gt;false, "txid"=&gt;"ad922349668c17c3ab47081f6dbc6e7e8f68473840146bfdd18f35f7d0bca216", "walletconflicts"=&gt;[], "time"=&gt;1574217056, "timereceived"=&gt;1574217056, "bip125-replaceable"=&gt;"yes"}] 
&gt; Time.now.to_i
 =&gt; 1574217344 
</code></pre>

<p>What's the magic behind it? Since <code>confirmation=0</code> is default, I would expect a return value of 0.00025.</p>

CC BY-SA 4.0
2019-11-20T03:17:00.310Z
I suspect it's because the fee paid by that transaction is so low.
David Schwartz
<bitcoin-core><wallet><json-rpc><balance><replace-by-fee>
getbalance says 0 for incoming TX even though 0-conf is allowed
Tim Kretschmer
# getbalance says 0 for incoming TX even though 0-conf is allowed

(Asked by: username_0 on 2019-11-20)

```
> $bitcoin_rpc.getnewaddress("myaddress", "bech32")
 => "bc1q9kvfyjxtk9tvkzgpkf4x8zs42sddwlyanz3z6z" 
> $bitcoin_rpc.getbalance
 => 0.0 
> $bitcoin_rpc.getbalance("*", 0)
 => 0.0 
> $bitcoin_rpc.listtransactions
 => [{"address"=>"bc1q9kvfyjxtk9tvkzgpkf4x8zs42sddwlyanz3z6z", "category"=>"receive", "amount"=>0.00025, "label"=>"myaddress", "vout"=>1, "confirmations"=>0, "trusted"=>false, "txid"=>"ad922349668c17c3ab47081f6dbc6e7e8f68473840146bfdd18f35f7d0bca216", "walletconflicts"=>[], "time"=>1574217056, "timereceived"=>1574217056, "bip125-replaceable"=>"yes"}] 
> Time.now.to_i
 => 1574217344 

```

What's the magic behind it? Since `confirmation=0` is default, I would expect a return value of 0.00025.

**Tags:** bitcoin-core, wallet, json-rpc, balance, replace-by-fee

> **Comments:**
> **username_1**: I suspect it's because the fee paid by that transaction is so low.  

---

## 1 answers

### Answer by username_2 on 2019-11-20. Score: 1 | Accepted answer

`getbalance` returns the balance that your node currently considers spendable. According to your console output, the transaction that sent you the output was flagged as `"bip125-replaceable"=>"yes"`. Since a transaction flagged as replaceable can be amended or retracted by the sender until it gets confirmed, an output from such a transaction will not be considered reliable and not used as an input until confirmed.


---

