Bitcoin Forum
May 27, 2024, 07:10:27 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: cant do bitcoin-cli calls  (Read 432 times)
niokobo (OP)
Full Member
***
Offline Offline

Activity: 182
Merit: 101


View Profile
February 24, 2017, 01:05:44 PM
 #1

i just finished downloading the whole blockhain and when i run

bitcoind

it says
bitcoin server started

but when i nw try to maek calls i dont receive no answers

i can run bitcoin-cli getbalance
and for any bitcoin address i try to check i receive a 0 as blance

how do i know if im connected, what else do i need to do

i also already created a bitcoin.conf which is in my .bitcoin folder

devans
Sr. Member
****
Offline Offline

Activity: 528
Merit: 368


View Profile
February 24, 2017, 01:27:06 PM
 #2

getbalance returns the balance of an account in bitcoind, not of an address.

One way of checking an address's spendable balance is to first import it using importaddress and then add up the unspent outputs to that address returned by listunspent.
niokobo (OP)
Full Member
***
Offline Offline

Activity: 182
Merit: 101


View Profile
February 24, 2017, 01:35:50 PM
 #3

getbalance returns the balance of an account in bitcoind, not of an address.

One way of checking an address's spendable balance is to first import it using importaddress and then add up the unspent outputs to that address returned by listunspent.

i cant just check the balance for an address like that
bitcoin-cli getbalance 162Q35GC13aFaF6XVRpibVddpjSCbsFkaF   


and whats my account how can i create 1??

i assume this is the same account as in bitcoin core right (the GUI wallet)
achow101
Moderator
Legendary
*
Offline Offline

Activity: 3402
Merit: 6659


Just writing some code


View Profile WWW
February 24, 2017, 01:57:31 PM
 #4

The way that getbalance works currently cannot check the balance of an individual address. However the whole accounts system in Bitcoin Core has been deprecated and is being removed, so you will probably be able to do that in a major release or two (after 0.14).

The accounts are the same as the Labels that you see in the Receiving Addresses list. By default, the account is blank, so you would type
Code:
getbalance ""
in order to get the balance of all of your wallets.

For one address, you could assign it its own account by changing the label and callling
Code:
getbalance "<account>"
where <account> is the label you gave the address.

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!