5

Is there anyway to list all transactions from given address by using API RPC to bitcoind? Actually, I'm using btcd and most non-wallet functions are the same with bitcoind, but I can't find any methods to do that.

Tam Vo
  • 157
  • 1
  • 3
  • 5

3 Answers3

7

Due to the way the transactions are indexed you cannot perform this kind of query with Bitcoind, I'm assuming the case is the same for btcd.

If you would like to get this information, you have a few options:

  • Parse the Blockchain yourself and store the data in a new, more heavily-indexed DB
  • Use a 3rd party service like Chain.com or Blockchain.info
  • Run a different type of node. Toshi is an open source Ruby implementation of Bitcoin by Coinbase. The DB of this node allows for richer queries, but requires an order of magnitude more storage.

Edit: Toshi is no longer maintained and chain.com no longer provides this API afaik.

leishman
  • 1,017
  • 11
  • 7
  • Parsing the blockchain is good in terms of security. Is possible to validate if the output from third party service? Checks like signature and also if the transaction was really accepted (or rejected) in the blockchain. – Gustavo Rodrigues Mar 31 '15 at 18:56
2

btcd recently merged in a feature that creates an address index that can be used to query for specific address

https://github.com/btcsuite/btcd/issues/190

To enable this feature, run btcd with the addrindex flag, like so -

btcd --addrindex

Transactions can queried over RPC using the new searchrawtransactions rpc call. It takes a while to create the address index, so wait until it has completed indexing to be able to use this index

Manan
  • 93
  • 6
0

As I know there is no method to list all transaction from given bitcoin address. But you can use account for that.

You can create one bitcoin address per account. And there is method to list all transactions for given account listtransactions.

Read more about account: https://en.bitcoin.it/wiki/Accounts_explained

Bitcoind API calls list: https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_Calls_list