Zcash-cli z_getbalance always empty

zcash-cli getinfo
{
"version" : 1000350,
"protocolversion" : 170002,
"walletversion" : 60000,
"balance" : 0.00000000,
"blocks" : 2100,
"timeoffset" : 0,
"connections" : 8,
"proxy" : "",
"difficulty" : 54990.87397591,
"testnet" : false,
"keypoololdest" : 1479741580,
"keypoolsize" : 101,
"paytxfee" : 0.00000000,
"relayfee" : 0.00001000,
"errors" : ""
}

zcash-cli z_getbalance t1ZJQNuop1oytQ7ow4Kq8o9if3astavba5W
0.00000000

zcash-cli listtransactions t1ZJQNuop1oytQ7ow4Kq8o9if3astavba5W
[
]

curl -s "https://api.zcha.in/v1/mainnet/accounts/t1ZJQNuop1oytQ7ow4Kq8o9if3astavba5W"
{"address":"t1ZJQNuop1oytQ7ow4Kq8o9if3astavba5W","balance":268.1919688099997,"firstSeen":1.47910928e+09,"lastSeen":1.479743329e+09,"minedCount":1406,"recvCount":1406,"sentCount":1367,"totalRecv":8571.334657259991,"totalSent":8303.14268844999}

When I run zcash-cli z_getbalance or zcash-cli listtransactions, it appears the output is always zero balance/transactions, yet according to explorer.zcha.in, the balance is present. What am I doing wrong?

The current bock height is 14299 (https://explorer.zcha.in/). Maybe your block chain is not yet synchronized. It might be easier to find out if you use a GUI wallet...

1 Like

Wow! First of all, how did you manage to mine over 8500 ZEC?! Do you have 20,000+ GPUs?

1 Like

I wish. The address is not mine, I used it as an example where I assume there will always be some balance.

The blockchain has been fully synchronized for a few minutes now and I still get the same empty results. Any ideas?

{
"version" : 1000350,
"protocolversion" : 170002,
"walletversion" : 60000,
"balance" : 0.00000000,
"blocks" : 14359,
"timeoffset" : -1,
"connections" : 8,
"proxy" : "",
"difficulty" : 439725.01352718,
"testnet" : false,
"keypoololdest" : 1479745803,
"keypoolsize" : 101,
"paytxfee" : 0.00000000,
"relayfee" : 0.00001000,
"errors" : ""
}

Something is not right. Are you sure you own this address/private key: https://explorer.zcha.in/accounts/t1ZJQNuop1oytQ7ow4Kq8o9if3astavba5W ?
This means you are a wealthy miner :wink:

Try to import and export the private key .. maybe it will work then.

zcashd --reindex might help

So in order to check the balance of some t_address, I also have to own the private key to it? I can't check the balance of t_address that I don't own? Because if that's the case, how is explorer.zcha.in able to do it?

1 Like

There is a way of to find any T address balance by scanning the blockchain... but AFAIK commands like z_getbalance work with addresses already in your wallet only (e.g. created or imported into the wallet).

I've imported my own address and now it shows positive balance, but it's incorrect, it's supposed to be 0 at the moment.

https://explorer.zcha.in/accounts/t1MDVyBvdCd5nsiZf3oHuH6ezcCU8sreuc7

txcount on the explorer.zcha.in is 33, but zcash-cli getwalletinfo shows only 15. Can my zcashd node be somehow out of sync even when the block count is the same as on explorer.zcha.in? The last transaction has been sent hours ago.

I have the same problem.How did you solve this problem? I already have my address in wallet and I can dump out the private key.

A few problems were discussed in this thread. Can you be more specific?