Bitcoin Forum
December 09, 2016, 09:40:34 PM *
News: To be able to use the next phase of the beta forum software, please ensure that your email address is correct/functional.
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: bitcoind getbalance with minconf = 0  (Read 3505 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
1481319634
Hero Member
*
Offline Offline

Posts: 1481319634

View Profile Personal Message (Offline)

Ignore
1481319634
Reply with quote  #2

1481319634
Report to moderator
1481319634
Hero Member
*
Offline Offline

Posts: 1481319634

View Profile Personal Message (Offline)

Ignore
1481319634
Reply with quote  #2

1481319634
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1481319634
Hero Member
*
Offline Offline

Posts: 1481319634

View Profile Personal Message (Offline)

Ignore
1481319634
Reply with quote  #2

1481319634
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: 1232

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!