Bitcoin Forum
January 16, 2017, 07:21:39 PM *
News: Latest stable version of Bitcoin Core: 0.13.2  [Torrent]. (New!)
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: bitcoind getbalance with minconf = 0  (Read 3522 times)
TAiS46
Full Member
***
Offline Offline

Activity: 223



View Profile WWW
June 19, 2012, 07:48:44 AM
 #1

Hello,

is there a way, to list the total balance (bitcoind getbalance) with minconf = 0 instead of 1?

Have try something like:
bitcoind getbalance * 0

But then it will show me the balance of the account *!

Is there a way?

Greetings
Simon
Each block is stacked on top of the previous one. Adding another block to the top makes all lower blocks more difficult to remove: there is more "weight" above each block. A transaction in a block 6 blocks deep (6 confirmations) will be very difficult to remove.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1484594499
Hero Member
*
Offline Offline

Posts: 1484594499

View Profile Personal Message (Offline)

Ignore
1484594499
Reply with quote  #2

1484594499
Report to moderator
1484594499
Hero Member
*
Offline Offline

Posts: 1484594499

View Profile Personal Message (Offline)

Ignore
1484594499
Reply with quote  #2

1484594499
Report to moderator
Red Emerald
Hero Member
*****
Offline Offline

Activity: 742



View Profile WWW
June 19, 2012, 07:00:10 PM
 #2

Hello,

is there a way, to list the total balance (bitcoind getbalance) with minconf = 0 instead of 1?

Have try something like:
bitcoind getbalance * 0

But then it will show me the balance of the account *!

Is there a way?

Greetings
Simon
I believe Luke-jr's next-test branch shows an "unconfirmed balance" with getinfo.

github.com/luke-jr/bitcoin

Hopefully that will be pulled into the official repo soon.  I can't see how it would introduce any bugs.

mb300sd
Legendary
*
Offline Offline

Activity: 1260

Drunk Posts


View Profile WWW
June 21, 2012, 05:45:56 AM
 #3

Hello,

is there a way, to list the total balance (bitcoind getbalance) with minconf = 0 instead of 1?

Have try something like:
bitcoind getbalance * 0

But then it will show me the balance of the account *!

Is there a way?

Greetings
Simon

If you are not using the accounts feature, all your bitcoins are in the account ""

try

bitcoind getbalance "" 0

1D7FJWRzeKa4SLmTznd3JpeNU13L1ErEco
geebus
Sr. Member
****
Offline Offline

Activity: 258



View Profile WWW
June 21, 2012, 08:07:27 AM
 #4

Also, if not using the command line (i.e. using Python or PHP) you can use "*" as the account name and it actually will wildcard all accounts.

Python: (requires python-jsonrpc package)
Code:
#!/bin/python

from jsonrpc import ServiceProxy
from jsonrpc.proxy import JSONRPCException
from jsonrpc.json import JSONDecodeException

RPC = ServiceProxy("http://%s:%s@%s:%s" % ('yourusername', 'yourpassword', '127.0.0.1', 8332))
try:
print "%s" % RPC.getbalance("*", 0)
except JSONRPCException, e:
print e.error['message']
except:
        pass

PHP: (requires jsonRPCClient Class)
Code:
<?php
         
require_once("jsonRPCClient.php");
         
$RPC = new jsonRPCClient("http://yourusername:yourpassword@127.0.0.1:8332");
         echo 
$RPC->getbalance("*"0);
?>


Feel like donating to me? BTC Address: 14eUVSgBSzLpHXGAfbN9BojXTWvTb91SHJ
TAiS46
Full Member
***
Offline Offline

Activity: 223



View Profile WWW
June 21, 2012, 08:31:47 AM
 #5

YES, thank you Smiley

You can also use the command line with

Code:
bitcoind getbalance "*" 0
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!