2
1
I want to get list of all address's income transactions since the genesis block
import requests, json
rpcPort = 8332
rpcUser = '[removed]'
rpcPassword = '[removed]'
#Accessing the RPC local server
serverURL = 'http://' + rpcUser + ':' + rpcPassword + '@localhost:' + str(rpcPort)
headers = {'content-type': 'application/json'}
payload = json.dumps({"method": 'listunspent', "params": [0, 999999, ['1KuWLoZuoJgz3N6sLoAwGth9XGm8YuFTGt']], "jsonrpc": "2.0"})
response = requests.post(serverURL, headers=headers, data=payload)
print(response.text)
it returns
{"result":[],"error":null,"id":null}
But according to https://blockchain.info/address/1KuWLoZuoJgz3N6sLoAwGth9XGm8YuFTGt there are a lot of transactions. How to get list of address-related transactions without private key? Can I add address not owned by me to local account to achieve transactions by getreceivedbyaddress command?
okay, how can I add a watch only address to my wallet? – Vassily Vorobyov – 2017-09-25T10:43:27.727
You can use the
– MeshCollider – 2017-09-25T10:51:10.800importaddressRPC: https://bitcoin.org/en/developer-reference#importaddressOk, I've used it, but importing works so slowly? Is there really no other ways to achive same speed as it achived at blockchain.info? – Vassily Vorobyov – 2017-09-25T15:20:31.437
2No, blockchain keeps its own database of transactions and everything, it doesn't query bitcoind every time – MeshCollider – 2017-09-25T22:10:29.170