1

Can I download the blockchain onto a cloud service then build an api to search it? maybe put it on a noSQl database?

What would be the best way?

Or even better, is there a way to not download the whole blockchain but, build an api that uses SPV to get just the transactions of a certain public address?

I have been trying to use the apis out there such as blockchain, block.io, insightpay, etc, but they all limit me in terms of API usage and I they are all bad at dealing with transactions where there are hundreds of inputs. Not sure how common this is, but it is a problem.

Thanks

1 Answer 1

1

There are open-source projects available that make building your own query service possible. A good example would be Libbitcoin, see their github and official website.

You need to install libbitcoin server - this is a full bitcoin node with a database, and libbitcoin explorer - a set of tools among which you will find one for querying the server about addresses (balances and whatnot).

Be aware that the server will download the whole blockchain. It is not possible to have your own query server without having the blockchain on hand.

2
  • I was hoping to have a serverless function run every 10 minutes and download the blockchain like so. Can I not tell it, that I already have upto block N somewhere and I would like to start downloading from block N+1 ? Mar 15, 2018 at 14:27
  • Perhaps you could run Bitcoin Core (you can have it without GUI), download the whole blockchain, install and run bitcoin-abe or some other software that would just query Bitcoin Core API to build its own database and after that enable pruning in Bitcoin Core to get rid of the most of the blockchain and save space. However, you would have to research that further, I have not done it, so I cannot give you step-by-step instructions. Mar 15, 2018 at 20:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.