Author

Topic: bitcoind getbalance with minconf = 0 (Read 3953 times)

full member
Activity: 222
Merit: 100
June 21, 2012, 03:31:47 AM
#5
YES, thank you Smiley

You can also use the command line with

Code:
bitcoind getbalance "*" 0
sr. member
Activity: 258
Merit: 250
June 21, 2012, 03: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:
         require_once("jsonRPCClient.php");
         
$RPC = new jsonRPCClient("http://yourusername:[email protected]:8332");
         echo 
$RPC->getbalance("*"0);
?>

legendary
Activity: 1260
Merit: 1000
Drunk Posts
June 21, 2012, 12: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
hero member
Activity: 742
Merit: 500
June 19, 2012, 02: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.
full member
Activity: 222
Merit: 100
June 19, 2012, 02: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
Jump to: